Search in sources :

Example 1 with DF

use of org.apache.hadoop.fs.DF in project hadoop by apache.

the class FsDatasetImplTestUtils method getRawCapacity.

@Override
public long getRawCapacity() throws IOException {
    try (FsVolumeReferences volRefs = dataset.getFsVolumeReferences()) {
        Preconditions.checkState(volRefs.size() != 0);
        DF df = volRefs.get(0).getUsageStats(dataset.datanode.getConf());
        if (df != null) {
            return df.getCapacity();
        } else {
            return -1;
        }
    }
}
Also used : DF(org.apache.hadoop.fs.DF) FsVolumeReferences(org.apache.hadoop.hdfs.server.datanode.fsdataset.FsDatasetSpi.FsVolumeReferences)

Aggregations

DF (org.apache.hadoop.fs.DF)1 FsVolumeReferences (org.apache.hadoop.hdfs.server.datanode.fsdataset.FsDatasetSpi.FsVolumeReferences)1