Java Code Examples for org.apache.hadoop.fs.FsStatus#getUsed()
The following examples show how to use
org.apache.hadoop.fs.FsStatus#getUsed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FsUsage.java From hadoop with Apache License 2.0 | 5 votes |
@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) ); }
Example 2
Source File: FsUsage.java From big-c with Apache License 2.0 | 5 votes |
@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) ); }
Example 3
Source File: DistributedFileSystem.java From hadoop with Apache License 2.0 | 4 votes |
public DiskStatus(FsStatus stats) { super(stats.getCapacity(), stats.getUsed(), stats.getRemaining()); }
Example 4
Source File: DistributedFileSystem.java From big-c with Apache License 2.0 | 4 votes |
public DiskStatus(FsStatus stats) { super(stats.getCapacity(), stats.getUsed(), stats.getRemaining()); }
Example 5
Source File: HadoopFileStore.java From jsr203-hadoop with Apache License 2.0 | 4 votes |
@Override public long getUnallocatedSpace() throws IOException { FsStatus status = this.system.getHDFS().getStatus(); return status.getCapacity() - status.getUsed(); }