hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasan Ary <voicesnthed...@yahoo.com>
Subject Map/Reduce Type Mismatch error
Date Fri, 07 Mar 2008 23:50:02 GMT
  Hi All,
  I am running a Map/Reduce on a textfile.
  Map takes <Text,Text> as (key,value) input pair , and outputs <Text,IntWritable>
as (key,value) output pair.
  Reduce takes <Text,IntWritable> as (key,value) input pair, and outputs <Text,Text>
as (key,value) output pair.
  I am getting a type mismatch error.
  Any suggestion?
  JobConf job = new JobConf(..............
  public static class Map extends MapReduceBase implements Mapper<Text, Text, Text, IntWritable>
    public void map(Text key, Text value, OutputCollector<Text, IntWritable> output,
Reporter reporter) throws IOException { ......
  output.collect(key,new IntWritable(1));
  public static class Reduce extends MapReduceBase implements Reducer<Text, IntWritable,
Text, Text> { 
  public void reduce(Text key, Iterator<IntWritable> values, OutputCollector<Text,Text>
output, Reporter reporter) throws IOException {  ..............
  output.collect(key, new Text("SomeText");

Never miss a thing.   Make Yahoo your homepage.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message