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 4BD81200B74 for ; Thu, 1 Sep 2016 17:50:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4A7FA160AB7; Thu, 1 Sep 2016 15:50:12 +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 8F041160AB5 for ; Thu, 1 Sep 2016 17:50:11 +0200 (CEST) Received: (qmail 85516 invoked by uid 500); 1 Sep 2016 15:49:59 -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 83135 invoked by uid 99); 1 Sep 2016 15:49:57 -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; Thu, 01 Sep 2016 15:49:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DDE1EE17B1; Thu, 1 Sep 2016 15:49:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aengineer@apache.org To: common-commits@hadoop.apache.org Date: Thu, 01 Sep 2016 15:50:24 -0000 Message-Id: <2cbcd4623888441d812d770ca1649de1@git.apache.org> In-Reply-To: <1cdd731f49434a9aa6a6de258aabbc95@git.apache.org> References: <1cdd731f49434a9aa6a6de258aabbc95@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [28/50] [abbrv] hadoop git commit: MAPREDUCE-6768. TestRecovery.testSpeculative failed with NPE. Contributed by Haibo Chen archived-at: Thu, 01 Sep 2016 15:50:12 -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/HDFS-7240 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