Created on 11-21-2023 12:33 AM - edited on 11-21-2023 01:35 AM by VidyaSargur
There is an easy way to check Meta Region Server info from HMaster webUI > System Tables > hbase:meta. However, anyone can check the same from the command line, or the HMaster UI might not be accessible due to security restrictions. This article explains how to find the Meta Region Server info from the command line.
Option 01:
The status 'detailed' shell command can be useful since it has all the hosted region’s info per RS separately along with other useful info.
#hbase shell
hbase(main):033:0> status 'detailed'
version 2.1.0-cdh6.3.x-SNAPSHOT
0 regionsInTransition
active master: cdh-63x-ie-3.cdh-63x-ie.root.hwx.site:22001 1699505011260
0 backup masters
master coprocessors: [AccessController, MasterAuditCoProcessor]
3 live servers
cdh-63x-ie-1.cdh-63x-ie.root.hwx.site:22101 1699505010867
requestsPerSecond=0.0, numberOfOnlineRegions=1, usedHeapMB=894, maxHeapMB=31552, numberOfStores=3, numberOfStorefiles=3, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeKB=0, readRequestsCount=2344, filteredReadRequestsCount=0, writeRequestsCount=18, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=36, currentCompactedKVs=36, compactionProgressPct=1.0, coprocessors=[AccessController, MultiRowMutationEndpoint, RegionAuditCoProcessor, SecureBulkLoadEndpoint, TokenProvider]
"hbase:meta,,1"
numberOfStores=3, numberOfStorefiles=3, storefileUncompressedSizeMB=0, lastMajorCompactionTimestamp=1699505025619, storefileSizeMB=0, memstoreSizeMB=0, readRequestsCount=2344, writeRequestsCount=18, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=36, currentCompactedKVs=36, compactionProgressPct=1.0, completeSequenceId=53, dataLocality=1.0
cdh-63x-ie-2.cdh-63x-ie.root.hwx.site:22101 1699505010821
requestsPerSecond=0.0, numberOfOnlineRegions=2, usedHeapMB=119, maxHeapMB=31552, numberOfStores=2, numberOfStorefiles=2, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeKB=0, readRequestsCount=0, filteredReadRequestsCount=0, writeRequestsCount=0, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[AccessController, RegionAuditCoProcessor, SecureBulkLoadEndpoint, TokenProvider]
"hbase:namespace,,1699502887290.85900ae7561b85446e7032426c667be7."
numberOfStores=1, numberOfStorefiles=1, storefileUncompressedSizeMB=0, lastMajorCompactionTimestamp=0, storefileSizeMB=0, memstoreSizeMB=0, readRequestsCount=0, writeRequestsCount=0, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, completeSequenceId=-1, dataLocality=1.0
"t1,,1699542084016.ed188627605fbd163114cafa12ebe74c."
numberOfStores=1, numberOfStorefiles=1, storefileUncompressedSizeMB=0, lastMajorCompactionTimestamp=0, storefileSizeMB=0, memstoreSizeMB=0, readRequestsCount=0, writeRequestsCount=0, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, completeSequenceId=-1, dataLocality=0.0
cdh-63x-ie-4.cdh-63x-ie.root.hwx.site:22101 1699505007650
requestsPerSecond=0.0, numberOfOnlineRegions=2, usedHeapMB=2053, maxHeapMB=31386, numberOfStores=2, numberOfStorefiles=2, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeKB=0, readRequestsCount=2, filteredReadRequestsCount=0, writeRequestsCount=2, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[AccessController, RegionAuditCoProcessor, SecureBulkLoadEndpoint, TokenProvider]
"hbase:acl,,1699502889909.58d1b4a8e4007207266fb294ecc5c7f2."
numberOfStores=1, numberOfStorefiles=1, storefileUncompressedSizeMB=0, lastMajorCompactionTimestamp=0, storefileSizeMB=0, memstoreSizeMB=0, readRequestsCount=2, writeRequestsCount=2, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, completeSequenceId=-1, dataLocality=0.0
"t2,,1699542101345.84cb672416b9bf2eac1a8ea8ce5879a3."
numberOfStores=1, numberOfStorefiles=1, storefileUncompressedSizeMB=0, lastMajorCompactionTimestamp=0, storefileSizeMB=0, memstoreSizeMB=0, readRequestsCount=0, writeRequestsCount=0, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, completeSequenceId=-1, dataLocality=0.0
0 dead servers
Took 0.0111 seconds
Option 02:
#hbase zkcli
[zk:2181(CONNECTED) 1] get /hbase/meta-region-server
?master:22001O?????YPBUF2
%cdh-63x-ie-1.cdh-63x-ie.root.hwx.site???????1
Note: There are some dirty characters [that’s because it is a protobuf message] along with the RS hostname.
OR:
#zkCli.sh -server myzoo get /hbase/meta-region-server
Best Way:
locate_region : Locate the region given a table name and a row-key
SYNTAX:- hbase> locate_region ‘tableName’, ‘key0’
And since meta don’t have any rowkey, passing empty value works also.
hbase(main):003:0* locate_region 'hbase:meta', ''
HOST REGION
cdh-63x-ie-1.cdh-63x-ie.root.hwx.site:22101 {ENCODED => 1588230740, NAME => 'hbase:meta,,1', STARTKEY => '', ENDKEY => ''}
1 row(s)
Took 4.2780 seconds