You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Lin Guo <gu...@yahoo.com> on 2008/06/03 12:17:21 UTC
how to deserialize the contents of hadoop output (sequencefileoutputformat)
I am wondering whether it is possible to deserialize the keys and values in a hadoop output file where the output format is SequenceFileOutputFormat.
many thanks!
Re: how to deserialize the contents of hadoop output (sequencefileoutputformat)
Posted by Stuart Sierra <ma...@stuartsierra.com>.
On Tue, Jun 3, 2008 at 6:17 AM, Lin Guo <gu...@yahoo.com> wrote:
> I am wondering whether it is possible to deserialize the keys and values in a hadoop output file where the output format is SequenceFileOutputFormat.
I wrote some code to do this, samples attached.
-Stuart
RE: how to deserialize the contents of hadoop output (sequencefileoutputformat)
Posted by "Chen, Young" <yo...@intel.com>.
Do you mean read output file which create by SequenceFile.createWriter? If so, maybe below code part will be useful. It reads out long integer number out from sequence file.
SequenceFile.Reader reader = new SequenceFile.Reader(fileSys, inFile, jobConf);
LongWritable numInside = new LongWritable();
LongWritable numOutside = new LongWritable();
reader.next(numInside, numOutside);
-----Original Message-----
From: Lin Guo [mailto:guolin2001@yahoo.com]
Sent: 2008年6月3日 18:17
To: core-user@hadoop.apache.org
Subject: how to deserialize the contents of hadoop output (sequencefileoutputformat)
I am wondering whether it is possible to deserialize the keys and values in a hadoop output file where the output format is SequenceFileOutputFormat.
many thanks!
Re: how to deserialize the contents of hadoop output (sequencefileoutputformat)
Posted by Chris Douglas <ch...@yahoo-inc.com>.
If your keys and values have meaningful toString methods, hadoop fs -
text <path> will print the contents to stdout. -C
On Jun 3, 2008, at 3:17 AM, Lin Guo wrote:
> I am wondering whether it is possible to deserialize the keys and
> values in a hadoop output file where the output format is
> SequenceFileOutputFormat.
>
> many thanks!
>
>
>