|
@@ -2483,12 +2483,12 @@ public class BlockManager {
|
|
|
case COMMITTED:
|
|
|
if (storedBlock.getGenerationStamp() != reported.getGenerationStamp()) {
|
|
|
final long reportedGS = reported.getGenerationStamp();
|
|
|
- return new BlockToMarkCorrupt(reported, storedBlock, reportedGS,
|
|
|
+ return new BlockToMarkCorrupt(new Block(reported), storedBlock, reportedGS,
|
|
|
"block is " + ucState + " and reported genstamp " + reportedGS
|
|
|
+ " does not match genstamp in block map "
|
|
|
+ storedBlock.getGenerationStamp(), Reason.GENSTAMP_MISMATCH);
|
|
|
} else if (storedBlock.getNumBytes() != reported.getNumBytes()) {
|
|
|
- return new BlockToMarkCorrupt(reported, storedBlock,
|
|
|
+ return new BlockToMarkCorrupt(new Block(reported), storedBlock,
|
|
|
"block is " + ucState + " and reported length " +
|
|
|
reported.getNumBytes() + " does not match " +
|
|
|
"length in block map " + storedBlock.getNumBytes(),
|
|
@@ -2499,7 +2499,7 @@ public class BlockManager {
|
|
|
case UNDER_CONSTRUCTION:
|
|
|
if (storedBlock.getGenerationStamp() > reported.getGenerationStamp()) {
|
|
|
final long reportedGS = reported.getGenerationStamp();
|
|
|
- return new BlockToMarkCorrupt(reported, storedBlock, reportedGS,
|
|
|
+ return new BlockToMarkCorrupt(new Block(reported), storedBlock, reportedGS,
|
|
|
"block is " + ucState + " and reported state " + reportedState
|
|
|
+ ", But reported genstamp " + reportedGS
|
|
|
+ " does not match genstamp in block map "
|
|
@@ -2515,7 +2515,7 @@ public class BlockManager {
|
|
|
return null; // not corrupt
|
|
|
} else if (storedBlock.getGenerationStamp() != reported.getGenerationStamp()) {
|
|
|
final long reportedGS = reported.getGenerationStamp();
|
|
|
- return new BlockToMarkCorrupt(reported, storedBlock, reportedGS,
|
|
|
+ return new BlockToMarkCorrupt(new Block(reported), storedBlock, reportedGS,
|
|
|
"reported " + reportedState + " replica with genstamp " + reportedGS
|
|
|
+ " does not match COMPLETE block's genstamp in block map "
|
|
|
+ storedBlock.getGenerationStamp(), Reason.GENSTAMP_MISMATCH);
|
|
@@ -2530,7 +2530,7 @@ public class BlockManager {
|
|
|
"complete with the same genstamp");
|
|
|
return null;
|
|
|
} else {
|
|
|
- return new BlockToMarkCorrupt(reported, storedBlock,
|
|
|
+ return new BlockToMarkCorrupt(new Block(reported), storedBlock,
|
|
|
"reported replica has invalid state " + reportedState,
|
|
|
Reason.INVALID_STATE);
|
|
|
}
|
|
@@ -2543,7 +2543,7 @@ public class BlockManager {
|
|
|
" on " + dn + " size " + storedBlock.getNumBytes();
|
|
|
// log here at WARN level since this is really a broken HDFS invariant
|
|
|
LOG.warn(msg);
|
|
|
- return new BlockToMarkCorrupt(reported, storedBlock, msg,
|
|
|
+ return new BlockToMarkCorrupt(new Block(reported), storedBlock, msg,
|
|
|
Reason.INVALID_STATE);
|
|
|
}
|
|
|
}
|