Hadoop 报错: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache

Error: java.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.FileSplit

包引入错误,mapreduce包下的类是新版API,mapred是旧版API,换成mapreduce包下的类就可以了