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 void setGenerationStamp(long stamp) {
|
|||||||
generationStamp = stamp;
|
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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getBlockName() + "_" + getGenerationStamp();
|
return toString(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void appendStringTo(StringBuilder sb) {
|
public void appendStringTo(StringBuilder sb) {
|
||||||
|
@ -1569,6 +1569,10 @@ Release 2.8.0 - UNRELEASED
|
|||||||
HDFS-4015. Safemode should count and report orphaned blocks.
|
HDFS-4015. Safemode should count and report orphaned blocks.
|
||||||
(Anu Engineer via Arpit Agarwal)
|
(Anu Engineer via Arpit Agarwal)
|
||||||
|
|
||||||
|
HDFS-7284. Add more debug info to
|
||||||
|
BlockInfoUnderConstruction#setGenerationStampAndVerifyReplicas.
|
||||||
|
(Wei-Chiu Chuang via Yongjun Zhang)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||||
|
@ -393,8 +393,8 @@ public void setGenerationStampAndVerifyReplicas(long genStamp) {
|
|||||||
List<ReplicaUnderConstruction> staleReplicas = uc.getStaleReplicas(genStamp);
|
List<ReplicaUnderConstruction> staleReplicas = uc.getStaleReplicas(genStamp);
|
||||||
for (ReplicaUnderConstruction r : staleReplicas) {
|
for (ReplicaUnderConstruction r : staleReplicas) {
|
||||||
r.getExpectedStorageLocation().removeBlock(this);
|
r.getExpectedStorageLocation().removeBlock(this);
|
||||||
NameNode.blockStateChangeLog.debug("BLOCK* Removing stale replica "
|
NameNode.blockStateChangeLog.debug("BLOCK* Removing stale replica {}"
|
||||||
+ "from location: {}", r.getExpectedStorageLocation());
|
+ " of {}", r, Block.toString(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user