|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.fs.Command
public abstract class Command
A base class for running a unix command like du or df
Constructor Summary | |
---|---|
Command()
|
Method Summary | |
---|---|
static String |
execCommand(String[] cmd)
Static method to execute a command. |
protected abstract String[] |
getExecString()
return an array comtaining the command name & its parameters |
protected abstract void |
parseExecResult(BufferedReader lines)
Parse the execution result |
protected void |
run()
Run a command |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Command()
Method Detail |
---|
protected void run() throws IOException
IOException
protected abstract String[] getExecString()
protected abstract void parseExecResult(BufferedReader lines) throws IOException
IOException
public static String execCommand(String[] cmd) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |