2.6.0 Differences local execution environment cdh and apache 2.7.x version.

    • 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();
       用户设置为几 程序就启动几个 可以直接显示出执行效果
       
       
       
      x
       
       
       
       
      1
      localJobRunner :
      2
       
                    
      3
      cdh :
      4
       
                    
      5
      int numReduceTasks = this.job.getNumReduceTasks();
      6
                    if (numReduceTasks > 1 || numReduceTasks < 0) {
      7
                        numReduceTasks = 1;
      8
                        this . job . setNumReduceTasks ( 1 );
      9
                    }
      10
                     
      11
      Apache :
      12
       int numReduceTasks = job.getNumReduceTasks();
      13
       Users set a few  program started a few  can directly reflect the implementation of the results
       
       



Guess you like

Origin www.cnblogs.com/TiePiHeTao/p/2bafe37e92fbcabae3ce8122c33f65d9.html