org.apache.hadoop.fs
Class DF
java.lang.Object
org.apache.hadoop.util.Shell
org.apache.hadoop.fs.DF
public class DF
- extends Shell
Filesystem disk space usage statistics. Uses the unix 'df' program.
Tested on Linux, FreeBSD, Cygwin.
Constructor Summary |
DF(java.io.File path,
Configuration conf)
|
DF(java.io.File path,
long dfInterval)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DF_INTERVAL_DEFAULT
public static final long DF_INTERVAL_DEFAULT
- See Also:
- Constant Field Values
DF
public DF(java.io.File path,
Configuration conf)
throws java.io.IOException
- Throws:
java.io.IOException
DF
public DF(java.io.File path,
long dfInterval)
throws java.io.IOException
- Throws:
java.io.IOException
getDirPath
public java.lang.String getDirPath()
getFilesystem
public java.lang.String getFilesystem()
throws java.io.IOException
- Throws:
java.io.IOException
getCapacity
public long getCapacity()
throws java.io.IOException
- Throws:
java.io.IOException
getUsed
public long getUsed()
throws java.io.IOException
- Throws:
java.io.IOException
getAvailable
public long getAvailable()
throws java.io.IOException
- Throws:
java.io.IOException
getPercentUsed
public int getPercentUsed()
throws java.io.IOException
- Throws:
java.io.IOException
getMount
public java.lang.String getMount()
throws java.io.IOException
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getExecString
protected java.lang.String[] getExecString()
- Description copied from class:
Shell
- return an array containing the command name & its parameters
- Specified by:
getExecString
in class Shell
parseExecResult
protected void parseExecResult(java.io.BufferedReader lines)
throws java.io.IOException
- Description copied from class:
Shell
- Parse the execution result
- Specified by:
parseExecResult
in class Shell
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2009 The Apache Software Foundation