org.apache.hadoop.io.LongWritable cannot be cast to org.apache.hadoop.io.Text 代码缺少这一行:job.setInputFormatClass(KeyValueTextInputFormat.class);