我定义了Mapper
,KEYOUT
类型为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
?