MultiThreadedMapper拒绝查找Jar

时间:2013-07-18 17:26:17

标签: java multithreading hadoop emr

出于某种原因,每次我运行这个程序(在eclipse和EMR上)我得到消息13/07/18 13:22:23 WARN mapred.JobClient:没有工作jar文件集。可能找不到用户类。请参阅JobConf(Class)或JobConf#setJar(String)。稍后我发现一些打印语句我发现我的jar文件仍然是空的。我做错了什么?

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);


        }

0 个答案:

没有答案