MapReduce作业配置-无法设置超级模式

时间:2019-04-10 14:40:43

标签: java hadoop mapreduce

我试图将MapReduce作业设置为在uber mode中运行,但是无论我做什么,控制台仍每次注销uber mode: false

19/04/10 17:07:13 INFO mapreduce.Job: Job job_1554301089905_0055 running in uber mode : false

我的驱动程序类如下:

public class Driver extends Configured implements Tool {
    private static String generateName() {
        Timestamp timestamp = new Timestamp(System.currentTimeMillis());
        return "BRANDS" + "-" + timestamp.getTime();
    }

    @Override
    public int run(String[] args) throws Exception {
        Configuration configuration = getConf();
        configuration.set("mapreduce.job.ubertask.enable", "true");

        Job job = Job.getInstance(getConf(), generateName());
        job.setJarByClass(Driver.class);
        job.setMapperClass(Map.class);
        job.setReducerClass(Reduce.class);

        // ...
        // Other things regarding the input/output
        // ...

        return job.waitForCompletion(true) ? 0 : 1;
    }

    public static void main(String[] args) throws Exception {
        int exitCode = ToolRunner.run(new Driver(), args);
        System.exit(exitCode);
    }
}

我还尝试了不使用configuration.set("mapreduce.job.ubertask.enable", "true");行,而只使用-D mapreduce.job.ubertask.enable=true参数运行作业。但是,它仍然不起作用。

“优化”工作的正确方法是什么?

谢谢!

0 个答案:

没有答案