hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Shi <s...@gopivotal.com>
Subject Re: how to read custom writable object from hdfs use java api?
Date Wed, 26 Mar 2014 05:38:15 GMT
Since you know the format of your output, write something to read from it
should be very easy.
What's your outputformat? If you didn't set it, please refer to the class
you can use the class
"org.apache.hadoop.mapreduce.lib.input.TextInputFormat" to read each record
from you output file.

*Stanley Shi,*

On Tue, Mar 25, 2014 at 9:07 PM, Li Li <fancyerii@gmail.com> wrote:

> I have map-reduce job to output my custom writable objects, how can I
> read it using pure java api?
> I don't want to serialize it to string(Text) and deserialize using java.
> map reduce codes..
> ..
> job.setOutputKeyClass(IntWritable.class);
> job.setOutputValueClass(MyWritable.class);

View raw message