Hadoop写需要Text,但我给它IntWritable

时间:2014-01-14 05:43:25

标签: hadoop

我定义了MapperKEYOUT类型为IntWritable

   public static class Map extends Mapper<LongWritable, Text, IntWritable, IntArrayWritable>

Mapper的{​​{1}}类型为Context。 当我将鼠标移到我的org.apache.hadoop.mapreduce.Mapper.Context<LongWritable, Text, IntWritable, IntArrayWritable>函数上时,它会告诉我context.write期望write,但在同一行上,我得到了这个hadoop错误:

(IntWritable arg0, IntArrayWritable arg1)

为什么java.io.IOException: Type mismatch in key from map: expected org.apache.hadoop.io.Text, recieved org.apache.hadoop.io.IntWritable 期望值为Context

0 个答案:

没有答案