1

I am trying to export data from HBase table 'mytable' which rowkey starts with 'abc'.

scan 'mytable', {ROWPREFIXFILTER => 'abc'}

The above exported data need to be imported into the another cluster by changing the rowkey prefix from 'abc' to 'def'

Old Data:

hbase(main):002:0> scan 'mytable', {ROWPREFIXFILTER => 'abc'}
ROW               COLUMN+CELL                                                                                                                                
abc-6535523   column=track:aid, timestamp=1339121507633, value=some stream/pojos

New Data: (In another cluster)

hbase(main):002:0> get 'mytable', 'def-6535523'
    ROW               COLUMN+CELL                                                                                                                                
    def-6535523   column=track:aid, timestamp=1339121507633, value=some stream/pojos

Only part of the row key needs to be modified. Other data needs to be as same.

Tried to use bin/hbase org.apache.hadoop.hbase.mapreduce.Export table_name file:///tmp/db_dump/

In the Export there is no provision to specify start row and end row.

But don't know how to import it with changed rowkey.

Also is there any inbuilt available in HBase/Hadoop to achie

Please help.

Roshan
  • 2,019
  • 8
  • 36
  • 56

0 Answers0