代码缺少这一行:job.setInputFormatClass(KeyValueTextInputFormat.class); 转载于:https://www.cnblogs.com/Mandylover/p/5123242.html