@Override protected void processPath(PathData item) throws IOException { long length; if (item.stat.isDirectory()) { length = item.fs.getContentSummary(item.path).getLength(); } else { length = item.stat.getLen(); } usagesTable.addRow(formatSize(length), item); } }
@Override protected void processPath(PathData item) throws IOException { long length; if (item.stat.isDirectory()) { length = item.fs.getContentSummary(item.path).getLength(); } else { length = item.stat.getLen(); } usagesTable.addRow(formatSize(length), item); } }
@Override protected void processPath(PathData item) throws IOException { long length; if (item.stat.isDirectory()) { length = item.fs.getContentSummary(item.path).getLength(); } else { length = item.stat.getLen(); } usagesTable.addRow(formatSize(length), item); } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
/** * Create a table with headers * @param headers list of headers */ public TableBuilder(Object ... headers) { this(headers.length); this.addRow(headers); hasHeader = true; }
/** * Create a table with headers * @param headers list of headers */ public TableBuilder(Object ... headers) { this(headers.length); this.addRow(headers); hasHeader = true; }
/** * Create a table with headers * @param headers list of headers */ public TableBuilder(Object ... headers) { this(headers.length); this.addRow(headers); hasHeader = true; }
/** * Create a table with headers * @param headers list of headers */ public TableBuilder(Object ... headers) { this(headers.length); this.addRow(headers); hasHeader = true; }
@Override protected void processPath(PathData item) throws IOException { ContentSummary contentSummary = item.fs.getContentSummary(item.path); long length = contentSummary.getLength(); // if (excludeSnapshots) { // length -= contentSummary.getSnapshotLength(); // } usagesTable.addRow(formatSize(length), item); } }
/** * Add a new row to the usages table for the given FileSystem URI. * * @param uri - FileSystem URI * @param fsStatus - FileSystem status * @param mountedOnPath - FileSystem mounted on path */ private void addToUsagesTable(URI uri, FsStatus fsStatus, String mountedOnPath) { long size = fsStatus.getCapacity(); long used = fsStatus.getUsed(); long free = fsStatus.getRemaining(); getUsagesTable().addRow( uri, formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double) used / (double) size, 0), mountedOnPath ); }
/** * Create a table with headers * @param headers list of headers */ public TableBuilder(Object ... headers) { this(headers.length); this.addRow(headers); hasHeader = true; }
@Override protected void processPath(PathData item) throws IOException { ContentSummary contentSummary = item.fs.getContentSummary(item.path); long length = contentSummary.getLength(); long spaceConsumed = contentSummary.getSpaceConsumed(); if (excludeSnapshots) { length -= contentSummary.getSnapshotLength(); spaceConsumed -= contentSummary.getSnapshotSpaceConsumed(); } getUsagesTable().addRow(formatSize(length), formatSize(spaceConsumed), item); } }