/** * Get the total number of COMPLETE blocks in the system. * For safe mode only complete blocks are counted. * This is invoked only during NN startup and checkpointing. */ public long getCompleteBlocksTotal() { // Calculate number of blocks under construction long numUCBlocks = 0; readLock(); try { numUCBlocks = leaseManager.getNumUnderConstructionBlocks(); return getBlocksTotal() - numUCBlocks; } finally { readUnlock("getCompleteBlocksTotal"); } }
/** * Get the total number of COMPLETE blocks in the system. * For safe mode only complete blocks are counted. */ private long getCompleteBlocksTotal() { // Calculate number of blocks under construction long numUCBlocks = 0; readLock(); numUCBlocks = leaseManager.getNumUnderConstructionBlocks(); try { return getBlocksTotal() - numUCBlocks; } finally { readUnlock("getCompleteBlocksTotal"); } }
/** * Get the total number of COMPLETE blocks in the system. * For safe mode only complete blocks are counted. */ private long getCompleteBlocksTotal() { // Calculate number of blocks under construction long numUCBlocks = 0; readLock(); numUCBlocks = leaseManager.getNumUnderConstructionBlocks(); try { return getBlocksTotal() - numUCBlocks; } finally { readUnlock("getCompleteBlocksTotal"); } }