0

出于某种原因,每次我运行这个程序(在 eclipse 和 EMR 上)我都会收到消息 13/07/18 13:22:23 WARN mapred.JobClient: No job jar file set。可能找不到用户类。请参阅 JobConf(Class) 或 JobConf#setJar(String)。一些打印语句之后我发现我的 jarfile 顽固地保持为空。我究竟做错了什么?

public static void main(String[] args) throws Exception {
            Job job = new Job();
            job.setJarByClass(Driver.Map.class);


             FileInputFormat.addInputPath(job, new Path(args[0]));
             FileOutputFormat.setOutputPath(job, new Path(args[1]));

            MultithreadedMapper.setMapperClass(job, Driver.Map.class);
            MultithreadedMapper.setNumberOfThreads(job, 64);

            job.setMapperClass(MultithreadedMapper.class);

            System.out.println(job.getJar());
            System.out.println(MultithreadedMapper.getNumberOfThreads(job) + "  "
                    + MultithreadedMapper.getMapperClass(job));

            job.setOutputKeyClass(Text.class);
            job.setOutputValueClass(Text.class);
            job.setNumReduceTasks(0);
            Config.LoggerProvider = LoggerProvider.DISABLED;


            job.waitForCompletion(true);


        }
4

0 回答 0