/** * Force the given block in the given file to be marked as complete, * regardless of whether enough replicas are present. This is necessary * when tailing edit logs as a Standby. */ public void forceCompleteBlock(final BlockInfo block) throws IOException { List<ReplicaUnderConstruction> staleReplicas = block.commitBlock(block); removeStaleReplicas(staleReplicas, block); completeBlock(block, null, true); }
addExpectedReplicasToPending(lastBlock); completeBlock(lastBlock, iip, false); } else if (pendingRecoveryBlocks.isUnderRecovery(lastBlock)) { completeBlock(lastBlock, iip, true); updateNeededReconstructions(lastBlock, 1, 0);
if (storedBlock.getBlockUCState() == BlockUCState.COMMITTED && hasMinStorage(storedBlock, numCurrentReplica)) { completeBlock(storedBlock, null, false); } else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {
private BlockInfoContiguous completeBlock(final BlockCollection bc, final BlockInfoContiguous block, INodesInPath iip, boolean force) throws IOException { BlockInfoContiguous[] fileBlocks = bc.getBlocks(); for(int idx = 0; idx < fileBlocks.length; idx++) if(fileBlocks[idx] == block) { return completeBlock(bc, idx, iip, force); } return block; }
private BlockInfoContiguous completeBlock(final BlockCollection bc, final BlockInfoContiguous block, INodesInPath iip, boolean force) throws IOException { BlockInfoContiguous[] fileBlocks = bc.getBlocks(); for(int idx = 0; idx < fileBlocks.length; idx++) if(fileBlocks[idx] == block) { return completeBlock(bc, idx, iip, force); } return block; }
hasMinStorage(storedBlock, numLiveReplicas)) { addExpectedReplicasToPending(storedBlock); completeBlock(storedBlock, null, false); } else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {
/** * Force the given block in the given file to be marked as complete, * regardless of whether enough replicas are present. This is necessary * when tailing edit logs as a Standby. */ public BlockInfoContiguous forceCompleteBlock(final BlockCollection bc, final BlockInfoContiguousUnderConstruction block) throws IOException { List<ReplicaUnderConstruction> staleReplicas = block.commitBlock(block); removeStaleReplicas(staleReplicas, block); return completeBlock(bc, block, null, true); }
/** * Force the given block in the given file to be marked as complete, * regardless of whether enough replicas are present. This is necessary * when tailing edit logs as a Standby. */ public BlockInfoContiguous forceCompleteBlock(final BlockCollection bc, final BlockInfoContiguousUnderConstruction block) throws IOException { List<ReplicaUnderConstruction> staleReplicas = block.commitBlock(block); removeStaleReplicas(staleReplicas, block); return completeBlock(bc, block, null, true); }
if(numReplicas.liveReplicas() + numReplicas.decommissioning() >= minReplication) completeBlock(bc, bc.numBlocks()-1, iip, false); return b;
if(numReplicas.liveReplicas() + numReplicas.decommissioning() >= minReplication) completeBlock(bc, bc.numBlocks()-1, iip, false); return b;
if (storedBlock.getBlockUCState() == BlockUCState.COMMITTED && numCurrentReplica >= minReplication) { completeBlock(storedBlock.getBlockCollection(), storedBlock, null, false); } else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {
if (storedBlock.getBlockUCState() == BlockUCState.COMMITTED && numCurrentReplica >= minReplication) { completeBlock(storedBlock.getBlockCollection(), storedBlock, null, false); } else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {
storedBlock = completeBlock(bc, storedBlock, null, false); } else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {
storedBlock = completeBlock(bc, storedBlock, null, false); } else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {