浏览代码

HADOOP-1971. Warn when job does not specify a jar. Contributed by Enis.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@582412 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父节点
当前提交
85625f015f
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 3 0
      CHANGES.txt
  2. 3 0
      src/java/org/apache/hadoop/mapred/JobClient.java

+ 3 - 0
CHANGES.txt

@@ -360,6 +360,9 @@ Trunk (unreleased changes)
     HADOOP-1906. Warn the user if they have an obsolete madred-default.xml
     file in their configuration directory. (acmurthy via omalley)
 
+    HADOOP-1971.  Warn when job does not specify a jar. (enis via cutting)
+
+
 Release 0.14.2 - unreleased
 
   BUG FIXES

+ 3 - 0
src/java/org/apache/hadoop/mapred/JobClient.java

@@ -377,6 +377,9 @@ public class JobClient extends Configured implements MRConstants, Tool  {
       job.setJar(submitJarFile.toString());
       fs.copyFromLocalFile(new Path(originalJarPath), submitJarFile);
       fs.setReplication(submitJarFile, replication);
+    } else {
+      LOG.warn("No job jar file set.  User classes may not be found. "+
+               "See JobConf(Class) or JobConf#setJar(String).");
     }
 
     // Set the user's name and working directory