tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject git commit: TEZ-549. Fix logging in pre-warmed containers. (hitesh)
Date Thu, 10 Oct 2013 23:23:50 GMT
Updated Branches:
  refs/heads/master 2f207c0d8 -> 2ca90b6fc


TEZ-549. Fix logging in pre-warmed containers. (hitesh)


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

Branch: refs/heads/master
Commit: 2ca90b6fcb9055e8980a763cd710903c66167012
Parents: 2f207c0
Author: Hitesh Shah <hitesh@apache.org>
Authored: Thu Oct 10 16:23:13 2013 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Thu Oct 10 16:23:13 2013 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/tez/dag/app/DAGAppMaster.java    | 10 +++++++++-
 .../java/org/apache/tez/mapreduce/hadoop/MRHelpers.java   |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/2ca90b6f/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
index 4877f35..0957885 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
@@ -123,6 +123,7 @@ import org.apache.tez.dag.history.HistoryEventHandler;
 import org.apache.tez.dag.history.avro.HistoryEventType;
 import org.apache.tez.dag.history.events.AMStartedEvent;
 import org.apache.tez.dag.records.TezDAGID;
+import org.apache.tez.mapreduce.hadoop.MRHelpers;
 import org.apache.tez.runtime.library.common.security.JobTokenSecretManager;
 import org.apache.tez.runtime.library.processor.SleepProcessor;
 
@@ -1221,11 +1222,18 @@ public class DAGAppMaster extends AbstractService {
 
     sleepVertex.setTaskEnvironment(environment);
 
+    List<String> javaOpts = new ArrayList<String>(4);
+    MRHelpers.addLog4jSystemProperties("INFO", javaOpts);
     if (null != amConf.get(
       TezConfiguration.TEZ_SESSION_PRE_WARM_CONTAINER_JAVA_OPTS)) {
-      sleepVertex.setJavaOpts(amConf.get(
+      javaOpts.add(amConf.get(
         TezConfiguration.TEZ_SESSION_PRE_WARM_CONTAINER_JAVA_OPTS));
     }
+    StringBuilder sb = new StringBuilder();
+    for (String s : javaOpts) {
+      sb.append(s).append(" ");
+    }
+    sleepVertex.setJavaOpts(sb.toString());
 
     preWarmContainersDAG.addVertex(sleepVertex);
 

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/2ca90b6f/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/MRHelpers.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/MRHelpers.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/MRHelpers.java
index cc61a9a..8e025e9 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/MRHelpers.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/MRHelpers.java
@@ -423,7 +423,7 @@ public class MRHelpers {
    * @param vargs
    *          the argument list to append to
    */
-  private static void addLog4jSystemProperties(String logLevel,
+  public static void addLog4jSystemProperties(String logLevel,
       List<String> vargs) {
     vargs.add("-Dlog4j.configuration="
         + TezConfiguration.TEZ_CONTAINER_LOG4J_PROPERTIES_FILE);


Mime
View raw message