hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Young" <young.c...@intel.com>
Subject RE: how to deserialize the contents of hadoop output (sequencefileoutputformat)
Date Tue, 03 Jun 2008 12:18:31 GMT
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!


View raw message