Example usage for org.apache.hadoop.fs FsStatus FsStatus

List of usage examples for org.apache.hadoop.fs FsStatus FsStatus

Introduction

In this page you can find the example usage for org.apache.hadoop.fs FsStatus FsStatus.

Prototype

public FsStatus(long capacity, long used, long remaining) 

Source Link

Document

Construct a FsStatus object, using the specified statistics

Usage

From source file:com.aliyun.odps.fs.VolumeFileSystem.java

License:Apache License

@Override
public FsStatus getStatus(Path p) throws IOException {
    // TODO
    return new FsStatus(0, 0, 0);
}

From source file:com.ibm.crail.hdfs.CrailHadoopFileSystem.java

License:Apache License

@Override
public FsStatus getStatus(Path p) throws IOException {
    statistics.incrementReadOps(1);//from   w  w w  . j  a  va2s .  c  om
    return new FsStatus(Long.MAX_VALUE, 0, Long.MAX_VALUE);
}

From source file:com.ibm.crail.hdfs.CrailHDFS.java

License:Apache License

@Override
public FsStatus getFsStatus() throws AccessControlException, FileNotFoundException, IOException {
    return new FsStatus(1000000000, 1000, 1000000000 - 1000);
}

From source file:com.mellanox.r4h.DFSClient.java

License:Apache License

/**
 * @see ClientProtocol#getStats()//from   www  .ja va  2 s .  c  om
 */
public FsStatus getDiskStatus() throws IOException {
    long rawNums[] = callGetStats();
    return new FsStatus(rawNums[0], rawNums[1], rawNums[2]);
}

From source file:com.quantcast.qfs.hadoop.Qfs.java

License:Apache License

@Override
public FsStatus getFsStatus() throws IOException {
    return new FsStatus(0, 0, 0);
}

From source file:com.splicemachine.fs.localfs.SpliceFileSystem.java

License:Apache License

/**
 *
 * Modified to support Amazon EFS/*from   www  .ja v a 2  s.  co  m*/
 *
 * @param p
 * @return
 * @throws IOException
 */
@Override
public FsStatus getStatus(Path p) throws IOException {
    if (LOG.isTraceEnabled())
        LOG.trace(String.format("getStatus path=%s", p));
    File partition = pathToFile(p == null ? new Path("/") : p);
    //File provides getUsableSpace() and getFreeSpace()
    //File provides no API to obtain used space, assume used = total - free
    return new FsStatus(Long.MAX_VALUE, 125l, Long.MAX_VALUE - 125l);
}

From source file:org.apache.ignite.hadoop.fs.v2.IgniteHadoopFileSystem.java

License:Apache License

/** {@inheritDoc} */
@Override//  w  ww.  ja  v  a 2 s  .c o  m
public FsStatus getFsStatus() throws IOException {
    IgfsStatus status = rmtClient.fsStatus();

    return new FsStatus(status.spaceTotal(), status.spaceUsed(), status.spaceTotal() - status.spaceUsed());
}

From source file:org.gridgain.grid.ggfs.hadoop.v2.GridGgfsHadoopFileSystem.java

License:Open Source License

/** {@inheritDoc} */
@Override//  w  ww.ja  v a 2s.  c  o  m
public FsStatus getFsStatus() throws IOException {
    GridGgfsStatus status = rmtClient.fsStatus();

    return new FsStatus(status.spaceTotal(), status.spaceUsed(), status.spaceTotal() - status.spaceUsed());
}