From 6495940eae09418a939882a8955845f9241a6485 Mon Sep 17 00:00:00 2001 From: Karthik Kambatla Date: Thu, 9 Apr 2015 00:07:49 -0700 Subject: [PATCH] YARN-3465. Use LinkedHashMap to preserve order of resource requests. (Zhihai Xu via kasha) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../nodemanager/containermanager/container/ContainerImpl.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 4714f4e1238..914bba05f87 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -162,6 +162,9 @@ Release 2.8.0 - UNRELEASED YARN-2890. MiniYarnCluster should turn on timeline service if configured to do so. (Mit Desai via hitesh) + YARN-3465. Use LinkedHashMap to preserve order of resource requests. + (Zhihai Xu via kasha) + Release 2.7.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java index cf3d8e73860..131d439b7a7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.EnumSet; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -638,7 +639,7 @@ public class ContainerImpl implements Container { return ContainerState.LOCALIZATION_FAILED; } Map> req = - new HashMap>(); if (!container.publicRsrcs.isEmpty()) { req.put(LocalResourceVisibility.PUBLIC, container.publicRsrcs);