hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r835237 - in /hadoop/mapreduce/trunk: CHANGES.txt src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
Date Thu, 12 Nov 2009 05:19:35 GMT
Author: sharad
Date: Thu Nov 12 05:19:34 2009
New Revision: 835237

URL: http://svn.apache.org/viewvc?rev=835237&view=rev
Log:
MAPREDUCE-1068. Fix streaming job to show proper message if file is is not present. Contributed
by Amareshwari Sriramadasu.

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=835237&r1=835236&r2=835237&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Thu Nov 12 05:19:34 2009
@@ -875,3 +875,6 @@
     MAPREDUCE-1178. Fix ClassCastException in MultipleInputs by adding 
     a DelegatingRecordReader. (Amareshwari Sriramadasu and Jay Booth 
     via sharad)
+
+    MAPREDUCE-1068. Fix streaming job to show proper message if file is 
+    is not present. (Amareshwari Sriramadasu via sharad)

Modified: hadoop/mapreduce/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java?rev=835237&r1=835236&r2=835237&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
(original)
+++ hadoop/mapreduce/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
Thu Nov 12 05:19:34 2009
@@ -126,6 +126,8 @@
       return submitAndMonitorJob();
     }catch (IllegalArgumentException ex) {
       //ignore, since log will already be printed
+      // print the log in debug mode.
+      LOG.debug("Error in streaming job", ex);
       return 1;
     }
   }
@@ -351,13 +353,13 @@
     return OptionBuilder.withDescription(desc).create(name);
   }
   
-  private static void validate(final List<String> values) 
+  private void validate(final List<String> values) 
   throws IllegalArgumentException {
     for (String file : values) {
       File f = new File(file);  
       if (!f.canRead()) {
-        throw new IllegalArgumentException("File : " + f.getAbsolutePath() 
-                                           + " is not readable."); 
+        fail("File: " + f.getAbsolutePath() 
+          + " does not exist, or is not readable."); 
       }
     }
   }



Mime
View raw message