How to copy an existing hbase table

user1586205 picture user1586205 · Jan 3, 2014 · Viewed 25.6k times · Source

I have a Hbase table X and I want to create an exact copy of it and name it Y. Could someone let me know how it is possible?

Thanks

Answer

Arnon Rotem-Gal-Oz picture Arnon Rotem-Gal-Oz · Jan 4, 2014

Assuming you want to copy the table on the same cluster you can use HBase snapshots in the hbase shell you can

snapshot 'sourceTable', 'sourceTable-snapshot'
clone_snapshot 'sourceTable-snapshot', 'newTable'