我有2个名为a和b的hbase集群,每个集群有3台机器,我想在2个集群之间启用复制,下面是步骤
将配置添加到hbase-site.xml
<property>
<name>hbase.replication</name>
<value>true</value>
</property>
在主集群a中,添加对等节点
add_peer '2',"wxmaster1,wxmaster2,wxslave1:2181:/hbase2"
这个返回成功,正如我在日志中看到的,集群a主日志已经初始化到集群b区域服务器的会话连接。
在集群a和b中创建相同的表
create 'test_replication', {NAME => 'cf', REPLICATION_SCOPE => '1', VERSIONS => '2', KEEP_DELETED_CELLS => 'TRUE'}
然后我认为一切都应该正常,集群a表“test\u replication”中的任何更改都将复制到集群b,而不是,并且没有任何错误日志。
这是我们的调查结果 status 'replication'
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版
Zookeeper-3.4.6
1条答案
按热度按时间ecr0jaav1#
最后我解决了这个问题,由于我的add\u peer命令错误,znode不存在,应该是
添加对等点“2”,“wxmaster1,wxmaster2,wxslave1:2181:/hbase”