From 12960d7fd4849de089efff5fb8c275006dfdb190 Mon Sep 17 00:00:00 2001 From: Viraj Jasani Date: Thu, 18 Nov 2021 21:25:39 +0530 Subject: [PATCH] HDFS-16330. Fix incorrect placeholder for Exception logs in DiskBalancer (#3672) Signed-off-by: Akira Ajisaka (cherry picked from commit 38614d05e118711852c58e9f0ebc3493fcb5ebeb) --- .../apache/hadoop/hdfs/server/datanode/DiskBalancer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java index b99ca3b66d4..4c6af7a3cf5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java @@ -989,7 +989,7 @@ public class DiskBalancer { try { iter.close(); } catch (IOException ex) { - LOG.error("Error closing a block pool iter. ex: {}", ex); + LOG.error("Error closing a block pool iter. ex: ", ex); } } } @@ -1124,7 +1124,7 @@ public class DiskBalancer { startTime); item.setSecondsElapsed(secondsElapsed); } catch (IOException ex) { - LOG.error("Exception while trying to copy blocks. error: {}", ex); + LOG.error("Exception while trying to copy blocks. error: ", ex); item.incErrorCount(); } catch (InterruptedException e) { LOG.error("Copy Block Thread interrupted, exiting the copy."); @@ -1133,7 +1133,7 @@ public class DiskBalancer { this.setExitFlag(); } catch (RuntimeException ex) { // Exiting if any run time exceptions. - LOG.error("Got an unexpected Runtime Exception {}", ex); + LOG.error("Got an unexpected Runtime Exception ", ex); item.incErrorCount(); this.setExitFlag(); }