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.

Hbase add table meta

Hbase add table meta

Expert Contributor
Hi, everyone: i am testing HBASE backup and restore, but so disappoint about hbase hbck. my testing is below: 1. backup hbase table hadoop fs -copyToLocal hdfs://10.32.87.9:8020/hbase/data/default/db_slow_query_hbasecopy /tmp/db_slow_query_hbasecopy 2.drop hbase table disable 'db_slow_query_hbasecopy' drop 'db_slow_query_hbasecopy' 3. restore backup table to hbase hadoop fs -copyFromLocal /tmp/db_slow_query_hbasecopy hdfs://10.32.87.9:8020/hbase/data/default/db_slow_query_hbasecopy after that, we can say the data already restore to HBASE, but the meta should be fixed. i have search from google, many peoples say using command like : " hbase org.jruby.Main add_table.rb " can fix meta problem, but i didn't find any executable file add_table.rb. then i am going to fix this problem by "hbase hbck -repairehole or hbase hbck -repair", but the it's always zookeeper timeout, the errors like below: Exception in thread "main" java.io.IOException: Region {ENCODED => 9e2cabdfd2eec5a1d419297897224d9b, NAME => 'db_slow_query_hbasecopy,,1445571407832.9e2cabdfd2eec5a1d419297897224d9b.', STARTKEY => '', ENDKEY => ''} failed to move out of transition within timeout 120000ms everyone who can you give some advises to me? thanks.
1 REPLY 1
Highlighted

Re: Hbase add table meta

Master Guru
If your goal is to take backups of a HTable, please use the recommended approach of taking a Snapshot and then using ExportSnapshot to copy it to an exterior location. Use of any other method to "replace" tables is not a good solution nor is recommended.

You can consider also the OfflineMetaRepair but this will require a downtime of the cluster.