From 128f340f4fd363e7c7de338f5535088131bf2969 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Fri, 28 Dec 2018 17:43:47 +0900 Subject: [PATCH] YARN-8894. Improve InMemoryPlan#toString. Contributed by BELUGA BEHR. --- .../yarn/server/resourcemanager/reservation/InMemoryPlan.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/InMemoryPlan.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/InMemoryPlan.java index 49e07aac84..43be2a5f29 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/InMemoryPlan.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/InMemoryPlan.java @@ -866,9 +866,9 @@ public boolean getMoveOnExpiry() { public String toString() { readLock.lock(); try { - StringBuffer planStr = new StringBuffer("In-memory Plan: "); + StringBuilder planStr = new StringBuilder("In-memory Plan: "); planStr.append("Parent Queue: ").append(queueName) - .append("Total Capacity: ").append(totalCapacity).append("Step: ") + .append(" Total Capacity: ").append(totalCapacity).append(" Step: ") .append(step); for (ReservationAllocation reservation : getAllReservations()) { planStr.append(reservation);