/** * Get the total number of blocks in the system. */ public long getBlocksTotal() { return blocksMap.size(); }
/** * Get the total number of blocks in the system. */ public long getBlocksTotal() { return blocksMap.size(); }
/** * Set the total number of blocks in the system. */ void setBlockTotal() { if (safeMode == null) return; safeMode.setBlockTotal(blocksMap.size()); }
/** * Checks consistency of the class state. * This is costly and currently called only in assert. */ boolean isConsistent() throws IOException { if (blockTotal == -1 && blockSafe == -1) { return true; // manual safe mode } int activeBlocks = blocksMap.size(); for(Iterator<Collection<Block>> it = recentInvalidateSets.values().iterator(); it.hasNext();) { activeBlocks -= it.next().size(); } return (blockTotal == activeBlocks) || (blockSafe >= 0 && blockSafe <= blockTotal); } }
LOG.info("Total number of blocks = " + blocksMap.size()); LOG.info("Number of invalid blocks = " + nrInvalid); LOG.info("Number of under-replicated blocks = " + nrUnderReplicated);
long nrInvalid = 0, nrOverReplicated = 0, nrUnderReplicated = 0; neededReplications.clear(); int totalBlocks = blocksMap.size(); long currentBlock = 0; LOG.info(logPrefix + "Starting"); LOG.info(logPrefix + "Total number of blocks = " + blocksMap.size()); LOG.info(logPrefix + "Number of invalid blocks = " + nrInvalid); LOG.info(logPrefix + "Number of under-replicated blocks = " +
counts.numFiles + " files, and " + counts.numBlocks + " blocks in file tree. " + blocksMap.size() + " blocks in block map."); } else { LOG.info("Skip counting items in the file tree");