hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r433327 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/util/RunJar.java
Date Mon, 21 Aug 2006 19:03:58 GMT
Author: cutting
Date: Mon Aug 21 12:03:58 2006
New Revision: 433327

URL: http://svn.apache.org/viewvc?rev=433327&view=rev
Log:
Improved error message when job jar not found.  Contributed by Michel.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=433327&r1=433326&r2=433327&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Aug 21 12:03:58 2006
@@ -58,6 +58,9 @@
     class, for improved handling of UTF-8 data.
     (Milind Bhandarkar via cutting)
 
+14. HADOOP-464.  Improved error message when job jar not found.
+    (Michel Tourn via cutting)
+
 
 Release 0.5.0 - 2006-08-04
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java?rev=433327&r1=433326&r2=433327&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java Mon Aug 21 12:03:58 2006
@@ -75,7 +75,14 @@
     File file = new File(fileName);
     String mainClassName = null;
 
-    JarFile jarFile = new JarFile(fileName);
+    JarFile jarFile;
+    try {
+      jarFile = new JarFile(fileName);
+    } catch(IOException io) {
+      throw new IOException("Error opening job jar: " + fileName)
+        .initCause(io);
+    }
+
     Manifest manifest = jarFile.getManifest();
     if (manifest != null) {
       mainClassName = manifest.getMainAttributes().getValue("Main-Class");



Mime
View raw message