-Re: How can I see the right format data content when I export the table content from Hbase?
Thanks for your response.
On Sat, Mar 17, 2012 at 10:09 PM, Stack <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 17, 2012 at 1:06 AM, yonghu <[EMAIL PROTECTED]> wrote:
>> 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.