Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to check HBase replication is working

Highlighted

How to check HBase replication is working

Hello,

I have created a second Hadoop cluster for replication purposes. I have configured everything and, apparently, replication is working between some of the tables I have in production. Due to I activated replication in those tables after some data already existed in them, I copied existing data using mapreduce job "CopyTable".

My problem is that I don't know how to verify if both processes ("Replication" and "CopyTable") are working correctly:

- I have read replication can be verified looking for "Considering 1 rs, with ratio 0.1" in any RegiosServer logs, but I can't find this anywhere

- I know I can verify CopyTable job using mapreduce job "hadoop jar "${HBASE_HOME}/hbase-server-VERSION.jar" verifyrep" but when I executed CopyTable some errors appeared(maybe I need more memory in HBase in destination cluster)

How can I proceed?

Best regards,

Silvio

4 REPLIES 4
Highlighted

Re: How to check HBase replication is working

Contributor

Hi @Silvio del Val,

As far as I know, the only way to verify the replicated data(Replication and CopyTable together) is to use 'verifyrep' tool. You can run it on master cluster, supplying it with the peer ID and table name to use for validation. You can also limit the verification further by specifying a time range or specific families.

There is no way to verify the Replication and CopyTable separately as the data are probably overlapped.

http://hbase.apache.org/book.html#_verifying_replicated_data

Highlighted

Re: How to check HBase replication is working

Thanks for your answer. So, where can I find string "Considering 1 rs, with ratio 0.1" all documentation I have consulted show as method of checking replication?

Anyway, with "hbase > status 'replication'" I can check replication too (I think checking "Replication Lag=0")

Highlighted

Re: How to check HBase replication is working

Contributor

I searched HBase-1.1.2, 0.98, 0.96 and 0.94 but can't find any source code in relation to 'Considering 1 rs, with ratio 0.1'. This comment only exists in the replication package html file, so I think it might be outdated.

'hbase> status replication' (as well as checking zk node directly) could be a way to check current progress of hbase replication. However, I think the most important thing to do after enabling replication is to verify data integrity. 'verifyrep' tool is designed for that purpose.

Highlighted

Re: How to check HBase replication is working

So, maybe a combination of both: monitoring every few minutes current progress using "status replication" and run a "verifyrep" everyday (for example) to verify integrity :-)

Thank you very much for your help :-)

Don't have an account?
Coming from Hortonworks? Activate your account here