|
@@ -1051,14 +1051,13 @@ public class FSEditLogLoader {
|
|
// what about an old-version fsync() where fsync isn't called
|
|
// what about an old-version fsync() where fsync isn't called
|
|
// until several blocks in?
|
|
// until several blocks in?
|
|
newBI = new BlockInfoContiguousUnderConstruction(
|
|
newBI = new BlockInfoContiguousUnderConstruction(
|
|
- newBlock, file.getPreferredBlockReplication());
|
|
|
|
|
|
+ newBlock, file.getFileReplication());
|
|
} else {
|
|
} else {
|
|
// OP_CLOSE should add finalized blocks. This code path
|
|
// OP_CLOSE should add finalized blocks. This code path
|
|
// is only executed when loading edits written by prior
|
|
// is only executed when loading edits written by prior
|
|
// versions of Hadoop. Current versions always log
|
|
// versions of Hadoop. Current versions always log
|
|
// OP_ADD operations as each block is allocated.
|
|
// OP_ADD operations as each block is allocated.
|
|
- newBI = new BlockInfoContiguous(newBlock,
|
|
|
|
- file.getPreferredBlockReplication());
|
|
|
|
|
|
+ newBI = new BlockInfoContiguous(newBlock, file.getFileReplication());
|
|
}
|
|
}
|
|
fsNamesys.getBlockManager().addBlockCollection(newBI, file);
|
|
fsNamesys.getBlockManager().addBlockCollection(newBI, file);
|
|
file.addBlock(newBI);
|
|
file.addBlock(newBI);
|