Description
Similar to the fix in HADOOP-6419, in file:
hadoop-rel-release-2.7.2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/CorruptReplicasMap.java
in line 76, the blk.getBlockName() method invocation is invoked on variable blk. "blk" is the class instance of Block.
void addToCorruptReplicasMap(Block blk, DatanodeDescriptor dn, String reason, Reason reasonCode) { ... NameNode.blockStateChangeLog.info( "BLOCK NameSystem.addToCorruptReplicasMap: {} added as corrupt on " + "{} by {} {}", blk.getBlockName(), dn, Server.getRemoteIp(), reasonText);
In file: hadoop-rel-release-2.7.2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/Block.java
@Override public String toString() { return getBlockName() + "_" + getGenerationStamp(); }
The toString() method contain not only getBlockName() but also getGenerationStamp which may be helpful for debugging purpose. Therefore blk.getBlockName() can be replaced by blk
Attachments
Issue Links
- is superceded by
-
HDFS-10752 Several log refactoring/improvement suggestion in HDFS
- Resolved
- links to