hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: How can I see the right format data content when I export the table content from Hbase?
Date Sat, 17 Mar 2012 21:09:26 GMT
On Sat, Mar 17, 2012 at 1:06 AM, yonghu <yongyong313@gmail.com> wrote:
> Hello,
> I have used the command ./hbase
> org.apache.hadoop.hbase.mapreduce.Export 'test'
> http://localhost:8020/test to export the data content from the test
> table. And I can see the exported content from my hdfs folder,
> hdfs://localhost/test/part-m-00000. I have tried 2 commands to read
> the content in the part-m-00000. One is -cat, the other is -text. But
> both of them show me some garbled message. Can anyone tell me that how
> to rightly read the content from the exported file?

The export produces hadoop sequencefiles where the key is a the row is
a serialized instance of ImmutableBytesWritable and the value a
serialized instance of the hbase Result object.  See
where the mapreduce job is set up.

To read the content, you need one of these:
 Study the SequenceFileInputFormat for sample code.


View raw message