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

(cherry picked from commit 9a43094e12ab8d35d49ceda2e2c5f83093bb3a5b)
This commit is contained in:
Colin Patrick Mccabe 2016-03-14 14:59:11 -07:00
parent 51b7d8935a
commit 8ac3fc7540

View File

@ -162,7 +162,9 @@ public void setGenerationStamp(long stamp) {
*/ */
public static String toString(final Block b) { public static String toString(final Block b) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
b.appendStringTo(sb); sb.append(BLOCK_FILE_PREFIX).
append(b.blockId).append("_").
append(b.generationStamp);
return sb.toString(); return sb.toString();
} }