@Override // NameNodeMXBean public long getTotalBlocks() { return getBlocksTotal(); }
/** * Check to see if we have exceeded the limit on the number * of inodes. */ void checkFsObjectLimit() throws IOException { if (maxFsObjects != 0 && maxFsObjects <= dir.totalInodes() + getBlocksTotal()) { throw new IOException("Exceeded the configured number of objects " + maxFsObjects + " in the filesystem."); } }
private void metaSave(PrintWriter out) { assert hasWriteLock(); long totalInodes = this.dir.totalInodes(); long totalBlocks = this.getBlocksTotal(); out.println(totalInodes + " files and directories, " + totalBlocks + " blocks = " + (totalInodes + totalBlocks) + " total filesystem objects"); blockManager.metaSave(out); }
/** * 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"); } }
/** * Ratio of the number of safe blocks to the total number of blocks. */ public double getSafeBlockRatio() { long blockTotal = getBlocksTotal(); return (blockTotal == this.blocksSafe ? 1 : (double) this.blocksSafe / (double) blockTotal); }
@Override // NameNodeMXBean public long getTotalBlocks() { return getBlocksTotal(); }
@Override // NameNodeMXBean public long getTotalBlocks() { return getBlocksTotal(); }
@Override // NameNodeMXBean public long getTotalBlocks() { return getBlocksTotal(); }
try { backupNode.namesystem.setImageLoaded(); if(backupNode.namesystem.getBlocksTotal() > 0) { long completeBlocksTotal = backupNode.namesystem.getCompleteBlocksTotal();
/** * Check to see if we have exceeded the limit on the number * of inodes. */ void checkFsObjectLimit() throws IOException { if (maxFsObjects != 0 && maxFsObjects <= dir.totalInodes() + getBlocksTotal()) { throw new IOException("Exceeded the configured number of objects " + maxFsObjects + " in the filesystem."); } }
/** * Check to see if we have exceeded the limit on the number * of inodes. */ void checkFsObjectLimit() throws IOException { if (maxFsObjects != 0 && maxFsObjects <= dir.totalInodes() + getBlocksTotal()) { throw new IOException("Exceeded the configured number of objects " + maxFsObjects + " in the filesystem."); } }
/** * Check to see if we have exceeded the limit on the number * of inodes. */ void checkFsObjectLimit() throws IOException { if (maxFsObjects != 0 && maxFsObjects <= dir.totalInodes() + getBlocksTotal()) { throw new IOException("Exceeded the configured number of objects " + maxFsObjects + " in the filesystem."); } }
/** * Check to see if we have exceeded the limit on the number * of inodes. */ void checkFsObjectLimit() throws IOException { if (maxFsObjects != 0 && maxFsObjects <= dir.totalInodes() + getBlocksTotal()) { throw new IOException("Exceeded the configured number of objects " + maxFsObjects + " in the filesystem."); } }
private void metaSave(PrintWriter out) { assert hasWriteLock(); long totalInodes = this.dir.totalInodes(); long totalBlocks = this.getBlocksTotal(); out.println(totalInodes + " files and directories, " + totalBlocks + " blocks = " + (totalInodes + totalBlocks) + " total"); blockManager.metaSave(out); }
private void metaSave(PrintWriter out) { assert hasWriteLock(); long totalInodes = this.dir.totalInodes(); long totalBlocks = this.getBlocksTotal(); out.println(totalInodes + " files and directories, " + totalBlocks + " blocks = " + (totalInodes + totalBlocks) + " total"); blockManager.metaSave(out); }
/** * 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"); } }
private int getBlockCount() { Assert.assertNotNull("Null cluster", mc); Assert.assertNotNull("No Namenode in cluster", mc.getNameNode()); FSNamesystem namesystem = mc.getNamesystem(); Assert.assertNotNull("Null Namesystem in cluster", namesystem); Assert.assertNotNull("Null Namesystem.blockmanager", namesystem.blockManager); return (int) namesystem.getBlocksTotal(); }
private void printStats() { BlockManagerTestUtil.updateState(cluster.getNamesystem().getBlockManager()); if(LOG.isDebugEnabled()) { LOG.debug("Missing " + cluster.getNamesystem().getMissingBlocksCount()); LOG.debug("Corrupted " + cluster.getNamesystem().getCorruptReplicaBlocks()); LOG.debug("Under-replicated " + cluster.getNamesystem(). getUnderReplicatedBlocks()); LOG.debug("Pending delete " + cluster.getNamesystem(). getPendingDeletionBlocks()); LOG.debug("Pending replications " + cluster.getNamesystem(). getPendingReplicationBlocks()); LOG.debug("Excess " + cluster.getNamesystem().getExcessBlocks()); LOG.debug("Total " + cluster.getNamesystem().getBlocksTotal()); } }
private int getBlockCount() { Assert.assertNotNull("Null cluster", mc); Assert.assertNotNull("No Namenode in cluster", mc.getNameNode()); FSNamesystem namesystem = mc.getNamesystem(); Assert.assertNotNull("Null Namesystem in cluster", namesystem); Assert.assertNotNull("Null Namesystem.blockmanager", namesystem.getBlockManager()); return (int) namesystem.getBlocksTotal(); }