| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.util.Shell
org.apache.hadoop.fs.DU
public class DU
Filesystem disk space usage statistics. Uses the unix 'du' program
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.apache.hadoop.util.Shell | 
|---|
Shell.ExitCodeException, Shell.ShellCommandExecutor | 
| Field Summary | 
|---|
| Fields inherited from class org.apache.hadoop.util.Shell | 
|---|
LOG, SET_GROUP_COMMAND, SET_OWNER_COMMAND, SET_PERMISSION_COMMAND, USER_NAME_COMMAND, WINDOWS | 
| Constructor Summary | |
|---|---|
DU(File path,
   Configuration conf)
Keeps track of disk usage.  | 
|
DU(File path,
   long interval)
Keeps track of disk usage.  | 
|
| Method Summary | |
|---|---|
 void | 
decDfsUsed(long value)
Decrease how much disk space we use.  | 
 String | 
getDirPath()
 | 
protected  String[] | 
getExecString()
return an array containing the command name & its parameters  | 
 long | 
getUsed()
 | 
 void | 
incDfsUsed(long value)
Increase how much disk space we use.  | 
static void | 
main(String[] args)
 | 
protected  void | 
parseExecResult(BufferedReader lines)
Parse the execution result  | 
 void | 
shutdown()
Shut down the refreshing thread.  | 
 void | 
start()
Start the disk usage checking thread.  | 
 String | 
toString()
 | 
| Methods inherited from class org.apache.hadoop.util.Shell | 
|---|
execCommand, getExitCode, getGET_PERMISSION_COMMAND, getGROUPS_COMMAND, getProcess, getUlimitMemoryCommand, run, setEnvironment, setWorkingDirectory | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public DU(File path,
          long interval)
   throws IOException
path - the path to check disk usage ininterval - refresh the disk usage at this interval
IOException - if we fail to refresh the disk usage
public DU(File path,
          Configuration conf)
   throws IOException
path - the path to check disk usage inconf - configuration object
IOException - if we fail to refresh the disk usage| Method Detail | 
|---|
public void decDfsUsed(long value)
value - decrease by this valuepublic void incDfsUsed(long value)
value - increase by this value
public long getUsed()
             throws IOException
IOException - if the shell command failspublic String getDirPath()
public void start()
public void shutdown()
public String toString()
toString in class Objectprotected String[] getExecString()
Shell
getExecString in class Shell
protected void parseExecResult(BufferedReader lines)
                        throws IOException
Shell
parseExecResult in class ShellIOException
public static void main(String[] args)
                 throws Exception
Exception
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||