tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-1042.Stop re-routing stdout, stderr for tasks and AM. (sseth)
Date Tue, 17 Jun 2014 22:12:54 GMT
Repository: incubator-tez
Updated Branches:
  refs/heads/master ca4ec1896 -> aed87d2db


TEZ-1042.Stop re-routing stdout, stderr for tasks and AM. (sseth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/aed87d2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/aed87d2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/aed87d2d

Branch: refs/heads/master
Commit: aed87d2dbf1ce99a53eb2e919934dff9b8517e01
Parents: ca4ec18
Author: Siddharth Seth <sseth@apache.org>
Authored: Tue Jun 17 15:12:30 2014 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Tue Jun 17 15:12:30 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/tez/common/TezUtils.java    | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/aed87d2d/tez-common/src/main/java/org/apache/tez/common/TezUtils.java
----------------------------------------------------------------------
diff --git a/tez-common/src/main/java/org/apache/tez/common/TezUtils.java b/tez-common/src/main/java/org/apache/tez/common/TezUtils.java
index 3e3f5eb..9158f52 100644
--- a/tez-common/src/main/java/org/apache/tez/common/TezUtils.java
+++ b/tez-common/src/main/java/org/apache/tez/common/TezUtils.java
@@ -266,16 +266,14 @@ public class TezUtils {
   }
 
   public static void updateLoggers(String addend) throws FileNotFoundException {
-    String containerLogDir = null;
 
-    LOG.info("Redirecting log files based on addend: " + addend);
+    LOG.info("Redirecting log file based on addend: " + addend);
 
     Appender appender = Logger.getRootLogger().getAppender(
         TezConfiguration.TEZ_CONTAINER_LOGGER_NAME);
     if (appender != null) {
       if (appender instanceof TezContainerLogAppender) {
         TezContainerLogAppender claAppender = (TezContainerLogAppender) appender;
-        containerLogDir = claAppender.getContainerLogDir();
         claAppender.setLogFileName(constructLogFileName(
             TezConfiguration.TEZ_CONTAINER_LOG_FILE_NAME, addend));
         claAppender.activateOptions();
@@ -287,17 +285,6 @@ public class TezUtils {
       LOG.warn("Not configured with appender named: " + TezConfiguration.TEZ_CONTAINER_LOGGER_NAME
           + ". Cannot reconfigure logger output");
     }
-
-    if (containerLogDir != null) {
-      PrintStream temp = System.out;
-      System.setOut(new PrintStream(new File(containerLogDir, constructLogFileName(
-          TezConfiguration.TEZ_CONTAINER_OUT_FILE_NAME, addend))));
-      temp.close();
-      temp = System.err;
-      System.setErr(new PrintStream(new File(containerLogDir, constructLogFileName(
-          TezConfiguration.TEZ_CONTAINER_ERR_FILE_NAME, addend))));
-      temp.close();
-    }
   }
 
   private static String constructLogFileName(String base, String addend) {


Mime
View raw message