Repository: hadoop
Updated Branches:
  refs/heads/trunk 57198bc51 -> 15fe1b34d


YARN-8878. Remove StringBuffer from ManagedParentQueue.java. Contributed by 
BELUGA BEHR.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/15fe1b34
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/15fe1b34
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/15fe1b34

Branch: refs/heads/trunk
Commit: 15fe1b34ddd134df1f413ca435a970fc34bae9f7
Parents: 57198bc
Author: Akira Ajisaka <[email protected]>
Authored: Fri Dec 28 17:29:22 2018 +0900
Committer: Akira Ajisaka <[email protected]>
Committed: Fri Dec 28 17:29:22 2018 +0900

----------------------------------------------------------------------
 .../scheduler/capacity/ManagedParentQueue.java  | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/15fe1b34/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java
----------------------------------------------------------------------
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/capacity/ManagedParentQueue.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java
index 2494000..6788bb4 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java
@@ -62,12 +62,10 @@ public class ManagedParentQueue extends 
AbstractManagedParentQueue {
 
     leafQueueTemplate = initializeLeafQueueConfigs().build();
 
-    StringBuffer queueInfo = new StringBuffer();
-    queueInfo.append("Created Managed Parent Queue: 
").append(queueName).append(
-        "]\nwith capacity: [").append(super.getCapacity()).append(
-        "]\nwith max capacity: [").append(super.getMaximumCapacity()).append(
-        "].");
-    LOG.info(queueInfo.toString());
+    LOG.info(
+        "Created Managed Parent Queue: [{}] with capacity: [{}]"
+            + " with max capacity: [{}]",
+        queueName, super.getCapacity(), super.getMaximumCapacity());
 
     initializeQueueManagementPolicy();
   }
@@ -117,12 +115,10 @@ public class ManagedParentQueue extends 
AbstractManagedParentQueue {
 
       validateAndApplyQueueManagementChanges(queueManagementChanges);
 
-      StringBuffer queueInfo = new StringBuffer();
-      queueInfo.append("Reinitialized Managed Parent Queue: 
").append(queueName)
-          .append("]\nwith capacity: [").append(super.getCapacity()).append(
-          "]\nwith max capacity: [").append(super.getMaximumCapacity()).append(
-          "].");
-      LOG.info(queueInfo.toString());
+      LOG.info(
+          "Reinitialized Managed Parent Queue: [{}] with capacity [{}]"
+              + " with max capacity [{}]",
+          queueName, super.getCapacity(), super.getMaximumCapacity());
     } catch (YarnException ye) {
       LOG.error("Exception while computing policy changes for leaf queue : "
           + getQueueName(), ye);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to