- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on
09-01-2020
08:40 AM
- edited on
09-03-2020
04:13 AM
by
VidyaSargur
There are several options available to achieve this use case. The easiest and the best approach would be HBase snapshots method to transfer the data.
Note: All actions need to be performed as the HBase user only, to ensure correct permissions.
- On source cluster:
#hbase shell> snapshot ‘Test’_Table’, ‘Test_Table_SS’ #hbase org.apache.hadoop.hbase.snapshot.SnapshotInfo -snapshot ‘Test_Table_SS’ -files -stats #hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot -snapshot 'Test_Table_SS' -copy-to hdfs://<Destination_NN_hostname>:8020/hbase -mappers 16 -bandwidth 200
- On destination cluster:
#hbase org.apache.hadoop.hbase.snapshot.SnapshotInfo -snapshot ‘Test_Table_SS’ -files -stats #hbase shell> clone_snapshot ‘Test_Table_SS’, ‘Test_Table’ #hbase shell> major_compact 'Test_Table'
- Once done, you can choose to delete the snapshots on both ms05 and as05:
#hbase shell> delete_snapshot 'Test_Table_SS'
- But If you plan to use CopyTable, this will not work without additional configuration.
Communication between an older client and a newer server is not guaranteed, there is currently a workaround to allow this to work by adding the following property to your client configuration:
On the client being used to launch the CopyTable, you can do either:
Command Line:
-Dhbase.meta.replicas.use=true
OR
hbase-site.xml:
hbase.meta.replicas.use
true