Big Data 7 min read

HBase Region State Machine and Transition Details

The article explains how HBase tracks each region's lifecycle states in hbase:meta and ZooKeeper, lists all possible states with their color codes, and describes the master‑region server interactions for opening, closing, splitting, and merging regions.

Big Data Technology Architecture
Big Data Technology Architecture
Big Data Technology Architecture
HBase Region State Machine and Transition Details

HBase maintains a state for each Region and stores this state in hbase:meta; the overall Region state in hbase:meta is kept in ZooKeeper. The Region transition states can be viewed in the Master Web UI. The following is the list of possible Region states.

1. The state machine includes the following states:

offline: region is offline and not started.

opening: region is being opened.

open: region is opened and the region server has notified the master.

failed_open: region server failed to open the region.

closing: region is being closed.

closed: region server has closed the region and notified the master.

failed_close: region server failed to close the region.

splitting: region server notifies the master that the region is being split.

split: region server notifies the master that the region has been split.

splitting_new: the newly created files during the split process.

merging: region server notifies the master that the region is being merged.

merged: region server notifies the master that the merge is complete.

merging_new: the new region created during merging.

2. Different colors indicate different meanings:

Brown: offline state, a transient or initialization state.

Green: normal state, can serve requests.

Blue: short‑lived state.

Red: failure state.

Yellow: merging or splitting state.

Gray: initial state.

3. Each numbered item represents a different operational scenario:

Master requests a region to move from offline to opening; if the region server does not receive the request, the master retries. Upon receipt, the region state becomes opening.

If the master’s open request exceeds the retry limit, the master commands the region server to close the region, changing the state to closing.

When the region server successfully opens a region, it notifies the master, which updates the state to open.

If the region server fails to open the region, it notifies the master; the master changes the state to closed and tries another region server.

If the master cannot open the region after several attempts, the state becomes failed_open.

The master instructs the region server to close the region; if there is no response, it retries.

If the region server is not online, an exception is thrown and the state changes to closing.

If the region server is online but repeatedly unresponsive, the state is updated to failed_close.

When the region server closes the region, it notifies the master, which changes the state to closed and reassigns the region to another server.

Before reassignment, the master changes the region state from closed to offline.

During a split, the region server notifies the master; the master changes the region state from open to splitting and creates two new regions in the splitting_new state.

If the split succeeds, the original region state becomes split, and the two new regions change from splitting_new to open.

If the split fails, the state reverts from splitting to open, and the new regions become offline.

When merging two regions, the region server notifies the master; the master changes both regions from open to merging and creates a new region in merging_new.

If the merge succeeds, the old regions become merged and the new region changes from merging_new to open.

If the merge fails, the regions revert from merging to open and the new region becomes offline.

If an administrator uses the HBase shell to assign a region, the master attempts to change a failed state back to closed.

4. Reference

http://hbase.apache.org/2.2/book.html#regions.arch

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

databaseHBasebigdataHadoopRegionState
Big Data Technology Architecture
Written by

Big Data Technology Architecture

Exploring Open Source Big Data and AI Technologies

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.