Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C8463200B89 for ; Tue, 6 Sep 2016 10:47:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C6D54160ACF; Tue, 6 Sep 2016 08:47:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1710A160AAD for ; Tue, 6 Sep 2016 10:47:46 +0200 (CEST) Received: (qmail 69631 invoked by uid 500); 6 Sep 2016 08:47:40 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 68774 invoked by uid 99); 6 Sep 2016 08:47:39 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 08:47:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7EE5AE7DE8; Tue, 6 Sep 2016 08:47:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: drankye@apache.org To: common-commits@hadoop.apache.org Date: Tue, 06 Sep 2016 08:47:54 -0000 Message-Id: <666dcc42627d470fae74fcabb3b791fe@git.apache.org> In-Reply-To: <92603b70c6cf460c851cf6315b4a4f9d@git.apache.org> References: <92603b70c6cf460c851cf6315b4a4f9d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/50] [abbrv] hadoop git commit: MAPREDUCE-6768. TestRecovery.testSpeculative failed with NPE. Contributed by Haibo Chen archived-at: Tue, 06 Sep 2016 08:47:48 -0000 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/HADOOP-12756 Commit: 69f7277625b86a30a5964285d05dac4ba982e795 Parents: 6742fb6 Author: Jason Lowe Authored: Mon Aug 29 19:54:34 2016 +0000 Committer: Jason Lowe 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() { + @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