简体   繁体   中英

How Hbase split the records in multiple regionServer?

I have cluster setup of Hbase :

1 HMaster Node and 3 Region Servers

I would like to know that: When we insert the multiple rows in table, than how Hbase split the records across multiple regionServer ?

Does Hfile has sorted key value records( rowKey:cf:TimeStamp ) ?

If yes than How Hbase maintain the sorted key order in Transaction Table.

I read that META table mentain the table information like (Table_name, Region(StartKey-EndKey)) is it correct ?

I'm a bit confused by your questions, but when you insert multiple rows into tables, lookups are made to the .META. table to find which region should get the mutations and the client then sends it to the corresponding hbase regionserver.

HFiles are indeed sorted files with keyvalues, which look more like

<keylength> <valuelength> <rowlength> <row> <columnfamilylength> <columnfamily> <columnqualifier> <timestamp> <keytype> <value>

http://hbase.apache.org/book/hfilev2.html

http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/KeyValue.html

Sorting occurs in all compactions ie when you add a row it is added to the memtable , which once filled with enough rows in the memtable it will sort them and dump them to a HFile (ie Merge compaction). When multiple HFiles exist for a region HBase will merge them all together in a sorted fashion (called Major Compaction).

The META Table maintains Region information, such as table name, region start key, end key, and which server is serving it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM