BlockInfo penultimateBlock = file.getPenultimateBlock(); if (previous == null && lastBlockInFile != null &&
BlockInfo penultimateBlock = pendingFile.getPenultimateBlock();
Block b = v.getPenultimateBlock(); if (b != null) { int numNodes = blocksMap.numNodes(b);
/** * Check that the indicated file's blocks are present and * replicated. If not, return false. If checkall is true, then check * all blocks, otherwise check only penultimate block. */ boolean checkFileProgress(String src, INodeFile v, boolean checkall) { if (checkall) { // check all blocks of the file. for (BlockInfoContiguous block: v.getBlocks()) { if (!isCompleteBlock(src, block, blockManager.minReplication)) { return false; } } } else { // check the penultimate block of this file BlockInfoContiguous b = v.getPenultimateBlock(); if (b != null && !isCompleteBlock(src, b, blockManager.minReplication)) { return false; } } return true; }
/** * Check that the indicated file's blocks are present and * replicated. If not, return false. If checkall is true, then check * all blocks, otherwise check only penultimate block. */ boolean checkFileProgress(String src, INodeFile v, boolean checkall) { if (checkall) { // check all blocks of the file. for (BlockInfoContiguous block: v.getBlocks()) { if (!isCompleteBlock(src, block, blockManager.minReplication)) { return false; } } } else { // check the penultimate block of this file BlockInfoContiguous b = v.getPenultimateBlock(); if (b != null && !isCompleteBlock(src, b, blockManager.minReplication)) { return false; } } return true; }
/** * Check that the indicated file's blocks are present and * replicated. If not, return false. If checkall is true, then check * all blocks, otherwise check only penultimate block. */ synchronized boolean checkFileProgress(INodeFile v, boolean checkall) { if (checkall) { // // check all blocks of the file. // for (Block block: v.getBlocks()) { if (blocksMap.numNodes(block) < this.minReplication) { return false; } } } else { // // check the penultimate block of this file // Block b = v.getPenultimateBlock(); if (b != null) { if (blocksMap.numNodes(b) < this.minReplication) { return false; } } } return true; }
BlockInfoContiguous penultimateBlock = pendingFile.getPenultimateBlock(); if (previous == null && lastBlockInFile != null &&
BlockInfoContiguous penultimateBlock = pendingFile.getPenultimateBlock();
BlockInfoContiguous penultimateBlock = pendingFile.getPenultimateBlock(); if (previous == null && lastBlockInFile != null &&
BlockInfoContiguous penultimateBlock = pendingFile.getPenultimateBlock();