public class DU extends Shell
Shell.ExitCodeException, Shell.ShellCommandExecutorLOG, SET_GROUP_COMMAND, SET_OWNER_COMMAND, SET_PERMISSION_COMMAND, timeOutInterval, ULIMIT_COMMAND, USER_NAME_COMMAND, WINDOWS| 构造器和说明 |
|---|
DU(File path,
Configuration conf)
Keeps track of disk usage.
|
DU(File path,
long interval)
Keeps track of disk usage.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
execCommand, execCommand, execCommand, getExitCode, getGET_PERMISSION_COMMAND, getGroupsCommand, getGroupsForUserCommand, getProcess, getUlimitMemoryCommand, getUlimitMemoryCommand, getUsersForNetgroupCommand, isTimedOut, run, setEnvironment, setWorkingDirectorypublic DU(File path, long interval) throws IOException
path - the path to check disk usage ininterval - refresh the disk usage at this intervalIOException - if we fail to refresh the disk usagepublic DU(File path, Configuration conf) throws IOException
path - the path to check disk usage inconf - configuration objectIOException - if we fail to refresh the disk usagepublic void decDfsUsed(long value)
value - decrease by this valuepublic void incDfsUsed(long value)
value - increase by this valuepublic long getUsed()
throws IOException
IOException - if the shell command failspublic String getDirPath()
public void start()
public void shutdown()
protected String[] getExecString()
ShellgetExecString 在类中 Shellprotected void parseExecResult(BufferedReader lines) throws IOException
ShellparseExecResult 在类中 ShellIOExceptionCopyright © 2009 The Apache Software Foundation