tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject tez git commit: TEZ-2798. NPE when executing TestMemoryWithEvents::testMemoryScatterGather. (sseth)
Date Fri, 11 Dec 2015 19:43:26 GMT
Repository: tez
Updated Branches:
  refs/heads/master 0c5ccb66a -> aeb7038c3


TEZ-2798. NPE when executing TestMemoryWithEvents::testMemoryScatterGather. (sseth)


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

Branch: refs/heads/master
Commit: aeb7038c35a5214d1ca5fe738da9bdeaf6e4a850
Parents: 0c5ccb6
Author: Siddharth Seth <sseth@apache.org>
Authored: Fri Dec 11 11:43:04 2015 -0800
Committer: Siddharth Seth <sseth@apache.org>
Committed: Fri Dec 11 11:43:04 2015 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../dag/app/ContainerLauncherContextImpl.java   |  3 +++
 .../apache/tez/dag/app/MockDAGAppMaster.java    | 22 ++++++++++----------
 3 files changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/aeb7038c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 80e6fcd..cc5ff5a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -9,6 +9,7 @@ INCOMPATIBLE CHANGES
   TEZ-2949. Allow duplicate dag names within session for Tez.
 
 ALL CHANGES:
+  TEZ-2798. NPE when executing TestMemoryWithEvents::testMemoryScatterGather.
   TEZ-2963. RecoveryService#handleSummaryEvent exception with HDFS transparent encryption
+ kerberos authentication.
   TEZ-2966. Tez does not honor mapreduce.task.timeout
   TEZ-2979. FlakyTest: org.apache.tez.history.TestHistoryParser.

http://git-wip-us.apache.org/repos/asf/tez/blob/aeb7038c/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerLauncherContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerLauncherContextImpl.java
b/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerLauncherContextImpl.java
index 20bfd13..a2e0dd6 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerLauncherContextImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerLauncherContextImpl.java
@@ -14,6 +14,7 @@
 
 package org.apache.tez.dag.app;
 
+import com.google.common.base.Preconditions;
 import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.tez.common.TezUtilsInternal;
@@ -37,6 +38,8 @@ public class ContainerLauncherContextImpl implements ContainerLauncherContext
{
   private final UserPayload initialUserPayload;
 
   public ContainerLauncherContextImpl(AppContext appContext, TaskCommunicatorManagerInterface
tal, UserPayload initialUserPayload) {
+    Preconditions.checkNotNull(appContext, "AppContext cannot be null");
+    Preconditions.checkNotNull(tal, "TaskCommunicator cannot be null");
     this.context = appContext;
     this.tal = tal;
     this.initialUserPayload = initialUserPayload;

http://git-wip-us.apache.org/repos/asf/tez/blob/aeb7038c/tez-dag/src/test/java/org/apache/tez/dag/app/MockDAGAppMaster.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/MockDAGAppMaster.java b/tez-dag/src/test/java/org/apache/tez/dag/app/MockDAGAppMaster.java
index f2130ab..bc7fa98 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/MockDAGAppMaster.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/MockDAGAppMaster.java
@@ -87,8 +87,8 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
 public class MockDAGAppMaster extends DAGAppMaster {
   
   private static final Logger LOG = LoggerFactory.getLogger(MockDAGAppMaster.class);
-  ContainerLauncherContext containerLauncherContext;
   MockContainerLauncher containerLauncher;
+  private final AtomicBoolean launcherGoFlag;
   boolean initFailFlag;
   boolean startFailFlag;
   boolean recoveryFatalError = false;
@@ -488,17 +488,8 @@ public class MockDAGAppMaster extends DAGAppMaster {
     super(applicationAttemptId, containerId, nmHost, nmPort, nmHttpPort, clock, appSubmitTime,
         isSession, workingDirectory, localDirs, logDirs,  new TezApiVersionInfo().getVersion(),
1,
         credentials, jobUserName, null);
-    Configuration conf = new Configuration(false);
-    UserPayload userPayload;
-    try {
-      userPayload = TezUtils.createUserPayloadFromConf(conf);
-    } catch (IOException e) {
-      throw new TezUncheckedException(e);
-    }
-    containerLauncherContext =
-        new ContainerLauncherContextImpl(getContext(), getTaskCommunicatorManager(), userPayload);
-    containerLauncher = new MockContainerLauncher(launcherGoFlag, containerLauncherContext);
     shutdownHandler = new MockDAGAppMasterShutdownHandler();
+    this.launcherGoFlag = launcherGoFlag;
     this.initFailFlag = initFailFlag;
     this.startFailFlag = startFailFlag;
     Preconditions.checkArgument(handlerConcurrency > 0);
@@ -512,6 +503,15 @@ public class MockDAGAppMaster extends DAGAppMaster {
       List<NamedEntityDescriptor> containerLauncherDescirptors,
       boolean isLocal)
       throws UnknownHostException {
+    UserPayload userPayload;
+    try {
+      userPayload = TezUtils.createUserPayloadFromConf(new Configuration(false));
+    } catch (IOException e) {
+      throw new TezUncheckedException(e);
+    }
+    ContainerLauncherContext containerLauncherContext =
+        new ContainerLauncherContextImpl(getContext(), getTaskCommunicatorManager(), userPayload);
+    containerLauncher = new MockContainerLauncher(launcherGoFlag, containerLauncherContext);
     return new ContainerLauncherManager(containerLauncher, getContext());
   }
 


Mime
View raw message