Author: omalley
Date: Fri Mar  4 03:37:48 2011
New Revision: 1077074

URL: http://svn.apache.org/viewvc?rev=1077074&view=rev
Log:
commit 031b0fd4175db8c534f5a8a69ca89cd1b5febded
Author: Arun C Murthy <[email protected]>
Date:   Fri Dec 11 14:16:29 2009 +0530

    MAPREDUCE-1068. Added a verbose error message when user specifies an 
incorrect -file parameter. Contributed by Amareshwari Sriramadasu.
    
    From 
https://issues.apache.org/jira/secure/attachment/12423898/patch-1068-1.txt
    
    +++ b/YAHOO-CHANGES.txt
    +    MAPREDUCE-1068. Added a verbose error message when user specifies an
    +    incorrect -file parameter. (Amareshwari Sriramadasu via acmurthy)
    +

Modified:
    
hadoop/common/branches/branch-0.20-security-patches/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java

Modified: 
hadoop/common/branches/branch-0.20-security-patches/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java?rev=1077074&r1=1077073&r2=1077074&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-0.20-security-patches/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
 (original)
+++ 
hadoop/common/branches/branch-0.20-security-patches/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
 Fri Mar  4 03:37:48 2011
@@ -118,6 +118,8 @@ public class StreamJob implements Tool {
       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;
     }
   }
@@ -342,13 +344,13 @@ public class StreamJob implements Tool {
     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."); 
       }
     }
   }


Reply via email to