HBase single table migration from one cluster to another cluster:
Here will be shown about Hbase single data table migration existing cluster to a new cluster simple steps:
Step 1: First export the hbase table data into the local hdfs path (Hadoop Distributed File System)
Step 2: After that copy the HBase table data from the source cluster to destination cluster by using the distcp command. (mostly distcp is a copy command for one cluster data to another cluster)
Step 3: Then create an Hbase table in the destination cluster (target cluster)
Step 4: After that import the Hbase table data from local to HBase table in the destination cluster.
1. hbase.org.apache.hadoop.hbase.mapreduce.Driver export <hbase _table _name > < source _hdfs _path >
2. hbase distcp hdfs :// <source_cluster_ipaddress:8020> to </source _hdfs _path>
3.hdfs: // < destination_cluster_ipaddress: 8020 > to <destination _hdfs _path>
1.hbase org.hadoop.hbase.mapreduce.import < hbase _ table_ name > to < hbase _table _hdfs _path >
HBase multiple table migration from one cluster to another cluster:
We know how to Hbase single table migration then coming to multiple table migration from one cluster to another cluster in simple manner by below steps.
We have script files then simply multiple Hbase data migrations happening to go through below steps:
Step 1: First step place the hbase-export.sh and hbase-table.txt in the source cluster
Step 2: After that place the hbase -import.sh and hbase-table.txt in the destination cluster.
Step 3: Mention all the table list in the hbase-table.txt file
Step 4: Create all the HBase table on the destination cluster
Step 5: Execute the hbase-export-generic.sh in the source cluster
Step 6: Execute the hbase-import.sh in the destination cluster.
Summary: I tried in Cloudera Distribute Hadoop environment for Hbase data migration from one cluster to another cluster. For Hbase single table data and multiple table data migration in very simple for Hadoop administrator as well as Hadoop developers. It is the same as Hortonword Distribution also.