hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yonghu <yongyong...@gmail.com>
Subject Re: How can I see the right format data content when I export the table content from Hbase?
Date Sun, 18 Mar 2012 16:08:14 GMT
Thanks for your response.



On Sat, Mar 17, 2012 at 10:09 PM, Stack <stack@duboce.net> wrote:
> 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
> http://hbase.apache.org/xref/org/apache/hadoop/hbase/mapreduce/Export.html#99
> where the mapreduce job is set up.
> To read the content, you need one of these:
> http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/io/SequenceFile.Reader.html
>  Study the SequenceFileInputFormat for sample code.
> St.Ack

View raw message