写MR Job的时候遇到一个坑爹的异常: LongWritable cannot be cast to org.apache.hadoop.io.IntWritable 当写Map的时候,key的默认输入就是LongWritable. 因为LongWritable指代Block中的数据偏移量. 所以把它强行转换成Text当然就Error了.. public static class TempMapper extends Mapper<LongWritable, Text, IntWritable…