取得hbase 0.94.x 的系統資訊(1)

(問題)
在hbase 0.94.x版本中,如何取得hbase叢集的現況?

(方法)
在hbase 0.94.x中,可以透過兩種方法取得hbase叢集的現狀.
第一個方法是透過hbase shell的方式.

假設hbase的安裝目錄在/opt/hbase之下,且權限設定正確.
我們可以透過下列指令開啟hbase:
$ /opt/hbase/bin/hbase shell

進入hbase shell中,我們可以用status來觀察hbase叢集的狀況:
> status
3 servers, 0 dead, 7.3333 average load

此時輸出的資訊是最基本的hbase叢集資訊,
其中 average load所指的是一個Region Server上平均有幾個Region.

status一共有三個不同的層級,分別是:'simple', 'summary' 和 'detailed'
(可以透過> help 'status'取得shell指令的詳細說明)
我們分別對於這些指令進行操作.

status 'summary'和status一樣,只會顯示RegionServer的平均負載
> status 'summary'
3 servers, 0 dead, 7.3333 average load

status 'simple'顯示所有的Region和RegionServer資訊,
包括Region的分配,可用的記憶體容量與已使用的記憶體容量,
也包括每秒的請求次數.
> status 'simple'
3 live servers
    192.168.2.131:60020 1421555129371
        requestsPerSecond=6, numberOfOnlineRegions=7, usedHeapMB=65, maxHeapMB=197
    master.hbase.mbwcl.nctu.edu.tw:60020 1421555072314
        requestsPerSecond=0, numberOfOnlineRegions=8, usedHeapMB=71, maxHeapMB=197
    192.168.2.132:60020 1421555194309
        requestsPerSecond=0, numberOfOnlineRegions=7, usedHeapMB=59, maxHeapMB=197
0 dead servers
Aggregate load: 6, regions: 22

status 'detailed'顯示了最詳細的資訊,
為了方便閱讀,我對顯示內容作了一些修改,
黑色粗體部分是RegionServer的資訊,包含status 'simple'的所有資訊,
底下的資訊,則用來表示Region的狀態,包括記憶體的使用讀寫需求和其他資訊,
> status 'detailed'
version 0.94.2
0 regionsInTransition
master coprocessors: []
3 live servers
    192.168.2.131:60020 1421555129371
        requestsPerSecond=13, numberOfOnlineRegions=7, usedHeapMB=65, maxHeapMB=197
        .META.,,1
            numberOfStores=1, numberOfStorefiles=0, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=380, writeRequestsCount=22, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
        [... 5 regions ...]
        myHBaseTable,400000,1421555788486.c6925ededb672e320d3202143ee0a3c9.
            numberOfStores=1, numberOfStorefiles=0, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=5, storefileIndexSizeMB=0, readRequestsCount=0, writeRequestsCount=2222, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
    master.hbase.mbwcl.nctu.edu.tw:60020 1421555072314
        requestsPerSecond=0, numberOfOnlineRegions=8, usedHeapMB=73, maxHeapMB=197
        -ROOT-,,0
            numberOfStores=1, numberOfStorefiles=1, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=82, writeRequestsCount=1, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
        [... 6 regions ...]
        myHBaseTable,800000,1421555788486.ef396086abbaa134f2581b7193b435a5.
            numberOfStores=1, numberOfStorefiles=0, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=5, storefileIndexSizeMB=0, readRequestsCount=0, writeRequestsCount=2218, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
    192.168.2.132:60020 1421555194309
        requestsPerSecond=0, numberOfOnlineRegions=7, usedHeapMB=61, maxHeapMB=197
        myHBaseTable,,1421555788481.fddda2cf46220d2a28aae2c4166ca3a0.
            numberOfStores=1, numberOfStorefiles=0, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=0, writeRequestsCount=6, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
        [... 5 regions ...]
        myHBaseTable,600000,1421555788486.e31e072442a5c4cf51eaf3d36a4e123b.
            numberOfStores=1, numberOfStorefiles=0, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=5, storefileIndexSizeMB=0, readRequestsCount=0, writeRequestsCount=2222, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
0 dead servers

留言

熱門文章

LTE筆記: RSRP, RSSI and RSRQ

[WiFi] WiFi 網路的識別: BSS, ESS, SSID, ESSID, BSSID

LTE筆記: 5G NR Measurement Events