org.apache.hadoop.fs
Class FsStatus

java.lang.Object
  extended by org.apache.hadoop.fs.FsStatus
All Implemented Interfaces:
Writable

@InterfaceAudience.Public
@InterfaceStability.Stable
public class FsStatus
extends Object
implements Writable

This class is used to represent the capacity, free and used space on a FileSystem.


Constructor Summary
FsStatus(long capacity, long used, long remaining)
          Construct a FsStatus object, using the specified statistics
 
Method Summary
 long getCapacity()
          Return the capacity in bytes of the file system
 long getRemaining()
          Return the number of remaining bytes on the file system
 long getUsed()
          Return the number of bytes used on the file system
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FsStatus

public FsStatus(long capacity,
                long used,
                long remaining)
Construct a FsStatus object, using the specified statistics

Method Detail

getCapacity

public long getCapacity()
Return the capacity in bytes of the file system


getUsed

public long getUsed()
Return the number of bytes used on the file system


getRemaining

public long getRemaining()
Return the number of remaining bytes on the file system


write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.