hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From su...@apache.org
Subject [23/50] [abbrv] hadoop git commit: MAPREDUCE-6768. TestRecovery.testSpeculative failed with NPE. Contributed by Haibo Chen
Date Tue, 30 Aug 2016 22:05:42 GMT
MAPREDUCE-6768. TestRecovery.testSpeculative failed with NPE. Contributed by Haibo Chen


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

Branch: refs/heads/YARN-2915
Commit: 69f7277625b86a30a5964285d05dac4ba982e795
Parents: 6742fb6
Author: Jason Lowe <jlowe@apache.org>
Authored: Mon Aug 29 19:54:34 2016 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Mon Aug 29 19:56:09 2016 +0000

----------------------------------------------------------------------
 .../org/apache/hadoop/mapreduce/v2/app/TestRecovery.java     | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/69f72776/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRecovery.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRecovery.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRecovery.java
index 4c6ee72..3ede2e9 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRecovery.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRecovery.java
@@ -25,6 +25,7 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import com.google.common.base.Supplier;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -96,6 +97,7 @@ import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.hadoop.yarn.event.EventHandler;
+import org.apache.hadoop.test.GenericTestUtils;
 import org.apache.hadoop.yarn.util.Clock;
 import org.apache.hadoop.yarn.util.SystemClock;
 import org.junit.Test;
@@ -1196,6 +1198,12 @@ public class TestRecovery {
     TaskAttempt task1Attempt2 = t1it.next();
     TaskAttempt task2Attempt = mapTask2.getAttempts().values().iterator().next();
 
+    // wait for the second task attempt to be assigned.
+    GenericTestUtils.waitFor(new Supplier<Boolean>() {
+      @Override public Boolean get() {
+        return task1Attempt2.getAssignedContainerID() != null;
+      }
+    }, 10, 10000);
     ContainerId t1a2contId = task1Attempt2.getAssignedContainerID();
 
     LOG.info(t1a2contId.toString());


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message