1

I have two HDFS clusters with HBase on top of it, cluster_1 and cluster_2.

On cluster_1 (All nodes) I have edited the hbase-site.xml adding this:

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

And then in cluster_1 I altered the table foo column family bar like this:

disable 'foo'
alter 'foo', NAME => 'bar', REPLICATION_SCOPE => 'my_peer'
enable 'foo'

Then created the peer my_peer like this:

add_peer 'my_peer', 'cluster_2-zookeeper:2181:/my_hbase_znode'
start_replication

No data from foo is replicated in foo table in cluster_2.

Am I missing anything? The zk_dump in cluster_1 says that replication is enabled with peer my_peer.

EDIT-1

After adding the hbase.replication=true in cluster_2, I have been able to replicate tables where I am manually putting data with HBase shell. No luck with the others.

Navarro
  • 187
  • 6

2 Answers2

0

Please find the possible issues and their solutions https://debugginghadoop.blogspot.com/2023/07/all-possible-hbase-replication-issues.html

0

It looks like your table attribute REPLCATION_SCOPE is not set properly,

change from,
disable 'foo'
alter 'foo', NAME => 'bar', REPLICATION_SCOPE => 'my_peer'
enable 'foo'

to

disable 'foo'
alter 'foo', NAME => 'bar', REPLICATION_SCOPE => '1'
enable 'foo'

The attribute "REPLICATION_SCOPE" takes either 0 (replication=false) or 1 (replication=true).

Use the below command whether table is enabled for replication or not, list_replicated_tables

Let me know if this helps!!

alexander.polomodov
  • 1,068
  • 3
  • 10
  • 14