將HBase表數據導出到hdfs的一個指定目錄中,具體命令如下:
bin/hbase org.apache.hadoop.hbase.mapreduce.Export test_table file:///data/test_table
bin/hadoop fs -ls /data/test_table
去hbase中創建相應的表
create 'test_table','info'
接下來,執行導入命令。具體的命令如下:
bin/hbase org.apache.hadoop.hbase.mapreduce.Import test_copy file:///data/test_table