HDFS-7284. Add more debug info to BlockInfoUnderConstruction#setGenerationStampAndVerifyReplicas. (Wei-Chiu Chuang via Yongjun Zhang)
This commit is contained in:
parent
3cc73773eb
commit
5e718de522
|
@ -152,11 +152,22 @@ public class Block implements Writable, Comparable<Block> {
|
|||
generationStamp = stamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper method to output the string representation of the Block portion of
|
||||
* a derived class' instance.
|
||||
*
|
||||
* @param b the target object
|
||||
* @return the string representation of the block
|
||||
*/
|
||||
public static String toString(final Block b) {
|
||||
return b.getBlockName() + "_" + b.getGenerationStamp();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getBlockName() + "_" + getGenerationStamp();
|
||||
return toString(this);
|
||||
}
|
||||
|
||||
public void appendStringTo(StringBuilder sb) {
|
||||
|
|
|
@ -1569,6 +1569,10 @@ Release 2.8.0 - UNRELEASED
|
|||
HDFS-4015. Safemode should count and report orphaned blocks.
|
||||
(Anu Engineer via Arpit Agarwal)
|
||||
|
||||
HDFS-7284. Add more debug info to
|
||||
BlockInfoUnderConstruction#setGenerationStampAndVerifyReplicas.
|
||||
(Wei-Chiu Chuang via Yongjun Zhang)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||
|
|
|
@ -393,8 +393,8 @@ public abstract class BlockInfo extends Block
|
|||
List<ReplicaUnderConstruction> staleReplicas = uc.getStaleReplicas(genStamp);
|
||||
for (ReplicaUnderConstruction r : staleReplicas) {
|
||||
r.getExpectedStorageLocation().removeBlock(this);
|
||||
NameNode.blockStateChangeLog.debug("BLOCK* Removing stale replica "
|
||||
+ "from location: {}", r.getExpectedStorageLocation());
|
||||
NameNode.blockStateChangeLog.debug("BLOCK* Removing stale replica {}"
|
||||
+ " of {}", r, Block.toString(r));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue