Class HRegion

java.lang.Object
org.apache.hadoop.hbase.regionserver.HRegion
All Implemented Interfaces:
ConfigurationObserver, PropagatingConfigurationObserver, HeapSize, Region

@Private public class HRegion extends Object implements HeapSize, PropagatingConfigurationObserver, Region
Regions store data for a certain region of a table. It stores all columns for each row. A given table consists of one or more Regions.

An Region is defined by its table and its key extent.

Locking at the Region level serves only one purpose: preventing the region from being closed (and consequently split) while other operations are ongoing. Each row level operation obtains both a row lock and a region read lock for the duration of the operation. While a scanner is being constructed, getScanner holds a read lock. If the scanner is successfully constructed, it holds a read lock until it is closed. A close takes out a write lock and consequently will block for ongoing operations and will block new operations from starting while the close is in progress.