-
- Question: The number of reducetask regardless of the setting are a few final execution in cdh in.
- The reason: two versions of the local execution environment api changed
- Note: Two versions of the api in yarn cluster mode it is the same.
localJobRunner: cdh: int numReduceTasks = this.job.getNumReduceTasks(); if (numReduceTasks > 1 || numReduceTasks < 0) { numReduceTasks = 1; this.job.setNumReduceTasks(1); } Apache : int numReduceTasks = job.getNumReduceTasks(); 用户设置为几 程序就启动几个 可以直接显示出执行效果
x1localJobRunner :
23cdh :
45int numReduceTasks = this.job.getNumReduceTasks();
6if (numReduceTasks > 1 || numReduceTasks < 0) {
7numReduceTasks = 1;
8this . job . setNumReduceTasks ( 1 );
9}
1011Apache :
12int numReduceTasks = job.getNumReduceTasks();
13Users set a few program started a few can directly reflect the implementation of the results
2.6.0 Differences local execution environment cdh and apache 2.7.x version.
Guess you like
Origin www.cnblogs.com/TiePiHeTao/p/2bafe37e92fbcabae3ce8122c33f65d9.html
Ranking