I have a Map function and a Reduce funtion outputting kep-value pairs
of class Text and IntWritable.. This is just the gist of the Map part
in the Main function :

TableMapReduceUtil.initTableMapperJob(
  tablename,        // input HBase table name
  scan,             // Scan instance to control CF and attribute selection
  AnalyzeMapper.class,   // mapper
  Text.class,             // mapper output key
  IntWritable.class,             // mapper output value
  job);

And here's my Reducer part in the Main function which writes the output to HDFS

job.setReducerClass(AnalyzeReducerFile.class);
job.setNumReduceTasks(1);
FileOutputFormat.setOutputPath(job, new
Path("hdfs://localhost:54310/output_file"));

How do i make the reducer write to a Sequence File instead?

I've tried the following code but doesn't work

job.setReducerClass(AnalyzeReducerFile.class);
job.setNumReduceTasks(1);
job.setOutputFormatClass(SequenceFileOutputFormat.class);
SequenceFileOutputFormat.setOutputPath(job, new
Path("hdfs://localhost:54310/sequenceOutput"));

Any help appreciated!




-- 
Regards-
Pavan

Reply via email to