HDFS-9947. Block#toString should not output information from derived classes (cmccabe)

(cherry picked from commit 9a43094e12)
This commit is contained in:
Colin Patrick Mccabe 2016-03-14 14:59:11 -07:00
parent 51b7d8935a
commit 8ac3fc7540
1 changed files with 3 additions and 1 deletions

View File

@ -162,7 +162,9 @@ public class Block implements Writable, Comparable<Block> {
*/
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();
}