You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by he...@apache.org on 2011/12/15 08:53:18 UTC

svn commit: r1214647 - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java ql/src/test/queries/clientpositive/sample_islocalmode_hook.q

Author: heyongqiang
Date: Thu Dec 15 07:53:18 2011
New Revision: 1214647

URL: http://svn.apache.org/viewvc?rev=1214647&view=rev
Log:
HIVE-2651 [jira] The variable hive.exec.mode.local.auto.tasks.max should be
changed
(Namit Jain via Yongqiang He)

Summary:
HIVE-2651

It should be called hive.exec.mode.local.auto.input.files.max instead.
The number of input files are checked currently.

Test Plan: EMPTY

Reviewers: JIRA, heyongqiang

Reviewed By: heyongqiang

CC: heyongqiang

Differential Revision: 861

Modified:
    hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java
    hive/trunk/ql/src/test/queries/clientpositive/sample_islocalmode_hook.q

Modified: hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
URL: http://svn.apache.org/viewvc/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=1214647&r1=1214646&r2=1214647&view=diff
==============================================================================
--- hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (original)
+++ hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java Thu Dec 15 07:53:18 2011
@@ -192,7 +192,7 @@ public class HiveConf extends Configurat
     LOCALMODEMAXBYTES("hive.exec.mode.local.auto.inputbytes.max", 134217728L),
     // run in local mode only if number of tasks (for map and reduce each) is
     // less than this
-    LOCALMODEMAXTASKS("hive.exec.mode.local.auto.tasks.max", 4),
+    LOCALMODEMAXINPUTFILES("hive.exec.mode.local.auto.input.files.max", 4),
     // if true, DROP TABLE/VIEW does not fail if table/view doesn't exist and IF EXISTS is
     // not specified
     DROPIGNORESNONEXISTENT("hive.exec.drop.ignorenonexistent", true),

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java?rev=1214647&r1=1214646&r2=1214647&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java Thu Dec 15 07:53:18 2011
@@ -513,7 +513,7 @@ public class MapRedTask extends ExecDriv
                                               long inputFileCount) {
 
     long maxBytes = conf.getLongVar(HiveConf.ConfVars.LOCALMODEMAXBYTES);
-    long maxTasks = conf.getIntVar(HiveConf.ConfVars.LOCALMODEMAXTASKS);
+    long maxInputFiles = conf.getIntVar(HiveConf.ConfVars.LOCALMODEMAXINPUTFILES);
 
     // check for max input size
     if (inputLength > maxBytes) {
@@ -525,10 +525,10 @@ public class MapRedTask extends ExecDriv
     // in the absence of an easy way to get the number of splits - do this
     // based on the total number of files (pessimistically assumming that
     // splits are equal to number of files in worst case)
-    if (inputFileCount > maxTasks) {
+    if (inputFileCount > maxInputFiles) {
       return "Number of Input Files (= " + inputFileCount +
         ") is larger than " +
-        HiveConf.ConfVars.LOCALMODEMAXTASKS.varname + "(= " + maxTasks + ")";
+        HiveConf.ConfVars.LOCALMODEMAXINPUTFILES.varname + "(= " + maxInputFiles + ")";
     }
 
     // since local mode only runs with 1 reducers - make sure that the

Modified: hive/trunk/ql/src/test/queries/clientpositive/sample_islocalmode_hook.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/sample_islocalmode_hook.q?rev=1214647&r1=1214646&r2=1214647&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/sample_islocalmode_hook.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/sample_islocalmode_hook.q Thu Dec 15 07:53:18 2011
@@ -20,7 +20,7 @@ create table sih_src2 as select key, val
 
 set hive.exec.post.hooks = org.apache.hadoop.hive.ql.hooks.VerifyIsLocalModeHook ;
 set mapred.job.tracker=does.notexist.com:666;
-set hive.exec.mode.local.auto.tasks.max=1;
+set hive.exec.mode.local.auto.input.files.max=1;
 
 -- sample split, running locally limited by num tasks
 select count(1) from sih_src tablesample(1 percent);
@@ -31,7 +31,7 @@ set mapred.job.tracker=does.notexist.com
 select count(1) from sih_src tablesample(1 percent)a join sih_src2 tablesample(1 percent)b on a.key = b.key;
 
 set hive.exec.mode.local.auto.inputbytes.max=1000;
-set hive.exec.mode.local.auto.tasks.max=4;
+set hive.exec.mode.local.auto.input.files.max=4;
 set mapred.job.tracker=does.notexist.com:666;
 
 -- sample split, running locally limited by max bytes