Explorar o código

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 %!s(int64=18) %!d(string=hai) anos
pai
achega
85625f015f
Modificáronse 2 ficheiros con 6 adicións e 0 borrados
  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
     HADOOP-1906. Warn the user if they have an obsolete madred-default.xml
     file in their configuration directory. (acmurthy via omalley)
     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
 Release 0.14.2 - unreleased
 
 
   BUG FIXES
   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());
       job.setJar(submitJarFile.toString());
       fs.copyFromLocalFile(new Path(originalJarPath), submitJarFile);
       fs.copyFromLocalFile(new Path(originalJarPath), submitJarFile);
       fs.setReplication(submitJarFile, replication);
       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
     // Set the user's name and working directory