Reputation: 13
I know there are two ways to copy a table from hbase, clone snapshot and copyTable. What is the difference between the two methods?
// clone_snapshot
snapshot 'sourceTable', 'sourceTable-snapshot'
clone_snapshot 'sourceTable-snapshot', 'newTable'
// copyTable
$ hbase org.apache.hadoop.hbase.mapreduce.CopyTable --new.name=newTable sourceTable
Upvotes: 0
Views: 309
Reputation: 4948
The internal workings are different. CopyTable is a Map Reduce Job that is submitted that will do the data copy. Snapshotting will take the metadata + the hfile structures and then use that to clone the new table. As a result , there is no impact on the RS.
You can read more on this thread : https://community.cloudera.com/t5/Support-Questions/hbase-table-copy-from-one-cluster-to-other/td-p/157248
Upvotes: 1