|
||||||||||
| 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(java.io.File path,
Configuration conf)
Keeps track of disk usage. |
|
DU(java.io.File path,
long interval)
Keeps track of disk usage. |
|
| Method Summary | |
|---|---|
void |
decDfsUsed(long value)
Decrease how much disk space we use. |
java.lang.String |
getDirPath()
|
protected java.lang.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(java.lang.String[] args)
|
protected void |
parseExecResult(java.io.BufferedReader lines)
Parse the execution result |
void |
shutdown()
Shut down the refreshing thread. |
void |
start()
Start the disk usage checking thread. |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.hadoop.util.Shell |
|---|
execCommand, 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(java.io.File path,
long interval)
throws java.io.IOException
path - the path to check disk usage ininterval - refresh the disk usage at this interval
java.io.IOException - if we fail to refresh the disk usage
public DU(java.io.File path,
Configuration conf)
throws java.io.IOException
path - the path to check disk usage inconf - configuration object
java.io.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 java.io.IOException
java.io.IOException - if the shell command failspublic java.lang.String getDirPath()
public void start()
public void shutdown()
public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String[] getExecString()
Shell
getExecString in class Shell
protected void parseExecResult(java.io.BufferedReader lines)
throws java.io.IOException
Shell
parseExecResult in class Shelljava.io.IOException
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||