/** * 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."); } }
@Override // FSNamesystemMBean @Metric public long getFilesTotal() { // There is no need to take fSNamesystem's lock as // FSDirectory has its own lock. return this.dir.totalInodes(); }
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); }
public long getFilesAndDirectoriesTotal() { return this.dir.totalInodes(); }
public long getFilesTotal() { return this.dir.totalInodes(); }
@Override // FSNamesystemMBean @Metric public long getFilesTotal() { // There is no need to take fSNamesystem's lock as // FSDirectory has its own lock. return this.dir.totalInodes(); }
/** * 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."); } }
@Override // FSNamesystemMBean @Metric public long getFilesTotal() { // There is no need to take fSNamesystem's lock as // FSDirectory has its own lock. return this.dir.totalInodes(); }
/** * 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 waitForLimit(FSNamesystem namesys, long num) { // wait for number of blocks to decrease while (true) { long total = namesys.getBlocksTotal() + namesys.dir.totalInodes(); System.out.println("Comparing current nodes " + total + " to become " + num); if (total == num) { break; } try { Thread.sleep(1000); } catch (InterruptedException e) { } } }
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); }
public String getInodeLimitText() { long inodes = fsn.dir.totalInodes(); long blocks = fsn.getBlocksTotal(); long maxobjects = fsn.getMaxObjects(); long totalMemory = Runtime.getRuntime().totalMemory(); long maxMemory = Runtime.getRuntime().maxMemory(); long used = (totalMemory * 100)/maxMemory; String str = inodes + " files and directories, " + blocks + " blocks = " + (inodes + blocks) + " total"; if (maxobjects != 0) { long pct = ((inodes + blocks) * 100)/maxobjects; str += " / " + maxobjects + " (" + pct + "%)"; } str += ". Heap Size is " + FsShell.byteDesc(totalMemory) + " / " + FsShell.byteDesc(maxMemory) + " (" + used + "%) <br>"; return str; }
private void waitForLimit(FSNamesystem namesys, long num) { // wait for number of blocks to decrease while (true) { long total = namesys.getBlocksTotal() + namesys.dir.totalInodes(); System.out.println("Comparing current nodes " + total + " to become " + num); if (total == num) { break; } try { Thread.sleep(1000); } catch (InterruptedException e) { } } }
public String getInodeLimitText() { long inodes = fsn.dir.totalInodes(); long blocks = fsn.getBlocksTotal(); long maxobjects = fsn.getMaxObjects();
saveImage(strbuf, fsDir.rootDir, out, fsDir.totalInodes());