Reputation: 577
I want to if its possible to migrate from standalone mode to fully distributed mode in Hbase.I have some data in standalone mode which i would like to persist during migration. Please help.
Upvotes: 0
Views: 672
Reputation: 186
Quite old question but recently I encountered same problem and solved it using following steps:
In standalone mode
Export table you want to migrate:
bin/hbase org.apache.hadoop.hbase.mapreduce.Driver export table_name /local/path/table_name_backup
In pseudodistributed/distributed mode
Copy table in hdfs using hadoop:
./bin/hadoop fs -copyFromLocal /local/path/table_name_backup/ table_name_backup
Import data using hbase:
./bin/hbase org.apache.hadoop.hbase.mapreduce.Driver import table_name table_name_backup
Remove old data from hdfs using hadoop:
./bin/hadoop dfs -rmr table_name_backup
U might want to check number of rows before and after migration to check if everything went according to plan:
./bin/hbase org.apache.hadoop.hbase.mapreduce.Driver rowcounter table_name
Upvotes: 4