diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/Block.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/Block.java index 23bfa95b4fa..4128eced0a8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/Block.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/Block.java @@ -162,7 +162,9 @@ public class Block implements Writable, Comparable { */ public static String toString(final Block b) { StringBuilder sb = new StringBuilder(); - b.appendStringTo(sb); + sb.append(BLOCK_FILE_PREFIX). + append(b.blockId).append("_"). + append(b.generationStamp); return sb.toString(); }