From a1e56a62863d8d494af309ec5f476c4b7e4d5ef9 Mon Sep 17 00:00:00 2001 From: Arun Suresh Date: Sat, 17 Feb 2018 03:24:55 -0800 Subject: [PATCH] =?UTF-8?q?YARN-7918.=20Fix=20TestAMRMClientPlacementConst?= =?UTF-8?q?raints.=20(Gergely=20Nov=C3=A1k=20via=20asuresh)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constraint/processor/PlacementConstraintProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/processor/PlacementConstraintProcessor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/processor/PlacementConstraintProcessor.java index f089a19482..cf944a6213 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/processor/PlacementConstraintProcessor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/processor/PlacementConstraintProcessor.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.constraint.processor; +import com.google.common.collect.Lists; import org.apache.hadoop.yarn.ams.ApplicationMasterServiceContext; import org.apache.hadoop.yarn.ams.ApplicationMasterServiceProcessor; import org.apache.hadoop.yarn.ams.ApplicationMasterServiceUtils; @@ -329,7 +330,7 @@ private void addToRetryList(SchedulingResponse schedulerResponse, if (!isAdded) { BatchedRequests br = new BatchedRequests(iteratorType, schedulerResponse.getApplicationId(), - Collections.singleton(schedulerResponse.getSchedulingRequest()), + Lists.newArrayList(schedulerResponse.getSchedulingRequest()), placementAttempt + 1); reqsToRetry.add(br); br.addToBlacklist(