pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From knogu...@apache.org
Subject svn commit: r1842133 - in /pig/trunk: CHANGES.txt src/org/apache/pig/tools/parameters/PreprocessorContext.java
Date Thu, 27 Sep 2018 18:03:43 GMT
Author: knoguchi
Date: Thu Sep 27 18:03:42 2018
New Revision: 1842133

URL: http://svn.apache.org/viewvc?rev=1842133&view=rev
Log:
PIG-5349: Log stderr output when shell command fail (knoguchi)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1842133&r1=1842132&r2=1842133&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Thu Sep 27 18:03:42 2018
@@ -26,6 +26,8 @@ PIG-5282: Upgade to Java 8 (satishsaley
  
 IMPROVEMENTS
 
+PIG-5349: Log stderr output when shell command fail (knoguchi)
+
 PIG-3038: Support for Credentials for UDF,Loader and Storer (satishsaley via rohini)
 
 PIG-5358: Remove hive-contrib jar from lib directory (szita)

Modified: pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java?rev=1842133&r1=1842132&r2=1842133&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java (original)
+++ pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java Thu Sep 27 18:03:42
2018
@@ -274,6 +274,7 @@ public class PreprocessorContext {
         } catch (InterruptedException e) {
             throw new RuntimeException("InterruptedException while executing shell command
: " + e.getMessage() , e);
         } catch (ExecutionException e) {
+            log.warn("Stderr output from command: \"" + cmd + "\" was - " + streamError);
             throw new RuntimeException("ExecutionException while executing shell command
: " + e.getMessage(), e);
         } finally {
             executorService.shutdownNow();
@@ -288,6 +289,7 @@ public class PreprocessorContext {
         }
 
         if (exitVal != 0) {
+            log.warn("Stderr output from command: \"" + cmd + "\" was - " + streamError);
             RuntimeException rte = new RuntimeException("Error executing shell command: "
+ cmd + ". Command exit with exit code of " + exitVal );
             throw rte;
         }



Mime
View raw message