From d4417dae4f38b58d41517a0263484da73ed41b75 Mon Sep 17 00:00:00 2001 From: Daniel Templeton Date: Thu, 31 Aug 2017 09:35:01 -0700 Subject: [PATCH] YARN-6780. ResourceWeights.toString() cleanup (Contributed by weiyuan via Daniel Templeton) --- .../yarn/server/resourcemanager/resource/ResourceWeights.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/resource/ResourceWeights.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/resource/ResourceWeights.java index 3ce15170eb..b66a5d0d46 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/resource/ResourceWeights.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/resource/ResourceWeights.java @@ -54,8 +54,9 @@ public float getWeight(ResourceType resourceType) { return weights[resourceType.ordinal()]; } + @Override public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("<"); for (int i = 0; i < ResourceType.values().length; i++) { if (i != 0) {