From e5c2fdddd69ceca21d641de56904648acedc74bf Mon Sep 17 00:00:00 2001 From: Xiao Chen Date: Tue, 6 Feb 2018 22:54:17 -0800 Subject: [PATCH] HDFS-12933. Improve logging when DFSStripedOutputStream failed to write some blocks. Contributed by chencan. --- .../java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java index 39717ef8d2..ed875bbc15 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java @@ -1288,8 +1288,8 @@ private void logCorruptBlocks() { int bgIndex = entry.getKey(); int corruptBlockCount = entry.getValue(); StringBuilder sb = new StringBuilder(); - sb.append("Block group <").append(bgIndex).append("> has ") - .append(corruptBlockCount).append(" corrupt blocks."); + sb.append("Block group <").append(bgIndex).append("> failed to write ") + .append(corruptBlockCount).append(" blocks."); if (corruptBlockCount == numAllBlocks - numDataBlocks) { sb.append(" It's at high risk of losing data."); }