From d9d8fa1d3aa65946f7fd0502ff8757a032d91fd3 Mon Sep 17 00:00:00 2001 From: Sunil G Date: Wed, 21 Feb 2018 14:35:57 +0530 Subject: [PATCH] YARN-7947. Capacity Scheduler intra-queue preemption can NPE for non-schedulable apps. Contributed by Eric Payne. (cherry picked from commit bdd2a184d78379d99c802a43ebec7d2cef0bbaf7) --- .../monitor/capacity/FifoIntraQueuePreemptionPlugin.java | 2 +- 1 file changed, 1 insertion(+), 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/monitor/capacity/FifoIntraQueuePreemptionPlugin.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/FifoIntraQueuePreemptionPlugin.java index 3332f2a985a..1776bd4d946 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/FifoIntraQueuePreemptionPlugin.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/FifoIntraQueuePreemptionPlugin.java @@ -412,7 +412,7 @@ public class FifoIntraQueuePreemptionPlugin TempUserPerPartition tmpUser = new TempUserPerPartition( tq.leafQueue.getUser(userName), tq.queueName, Resources.clone(userResourceUsage.getUsed(partition)), - Resources.clone(userSpecificAmUsed), + Resources.clone(amUsed), Resources.clone(userResourceUsage.getReserved(partition)), Resources.none());