2017-02-16 167 views
0

我有一個名爲A和B 2 HBase的集羣,每個集羣有3臺機器,我想啓用2集羣之間的複製,這裏是一步HBase的複製無法複製數據

添加配置到HBase的現場。 XML

<property> 
    <name>hbase.replication</name> 
    <value>true</value> 
</property> 

在主羣集A,增加對

add_peer '2',"wxmaster1,wxmaster2,wxslave1:2181:/hbase2" 

這個返回成功,因爲我可以在日誌中看到,集羣的主日誌已初始化的S與集羣B區域服務器的連接。

創建集羣一個相同的表和B

create 'test_replication', {NAME => 'cf', REPLICATION_SCOPE => '1', VERSIONS => '2', KEEP_DELETED_CELLS => 'TRUE'} 

那麼我認爲一切都應該是好的,在A簇表「test_replication」將複製到集B的任何變化,而它沒有,也沒有任何錯誤日誌。

這裏是status 'replication' enter image description here

2017-02-16 18:31:34,570 WARN [regionserver/wxmaster2/172.16.178.78:16021.logRoller] regionserver.ReplicationSource: Queue size: 3 exceeds value of replication.source.log.queue.warn: 2 
2017-02-16 18:31:34,572 INFO [regionserver/wxmaster2/172.16.178.78:16021.logRoller] wal.FSHLog: Archiving hdfs://cluster1/hbase/WALs/wxmaster2,16021,1487233892284/wxmaster2%2C16021%2C1487233892284.default.1487233894071 to hdfs://cluster1/hbase/oldWALs/wxmaster2%2C16021%2C1487233892284.default.1487233894071 
2017-02-16 18:31:34,586 INFO [regionserver/wxmaster2/172.16.178.78:16021.logRoller] wal.FSHLog: Archiving hdfs://cluster1/hbase/WALs/wxmaster2,16021,1487233892284/wxmaster2%2C16021%2C1487233892284.default.1487237494395 to hdfs://cluster1/hbase/oldWALs/wxmaster2%2C16021%2C1487233892284.default.1487237494395 
2017-02-16 18:36:33,914 INFO [LruBlockCacheStatsExecutor] hfile.LruBlockCache: totalSize=1.65 MB, freeSize=1.57 GB, max=1.57 GB, blockCount=0, accesses=0, hits=0, hitRatio=0, cachingAccesses=0, cachingHits=0, cachingHitsRatio=0,evictions=749, evicted=0, evictedPerRun=0.0 
2017-02-16 18:36:34,394 INFO [wxmaster2:16021Replication Statistics #0] regionserver.Replication: Normal source for cluster 2: Total replicated edits: 0, currently replicating from: null at position: 0 

任何結果能幫助我嗎?

而且,我使用

Hadoop的2.5.2
HBase的-1.0.1
飼養員-3.4.6

回答

0

finnaly我解決了這個問題,因爲我add_peer命令錯誤, znode不存在,應該是

add_peer'2',「wxmaster1,wxmaster2,wxslave1:2181:/ hbase」