|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttachyon.command.TFsShell
public class TFsShell
Class for handling command line inputs.
Constructor Summary | |
---|---|
TFsShell()
|
Method Summary | |
---|---|
void |
close()
|
int |
copyFromLocal(String[] argv)
Copies a file specified by argv from the local filesystem to the filesystem. |
int |
copyToLocal(String[] argv)
Copies a file specified by argv from the filesystem to the local filesystem. |
int |
location(String[] argv)
Displays a list of hosts that have the file specified in argv stored. |
int |
ls(String[] argv)
Displays information for all directories and files directly under the path specified in argv. |
static void |
main(String[] argv)
Main method, starts a new TFsShell |
int |
mkdir(String[] argv)
Creates a new directory specified by the path in argv, including any parent folders that are required. |
void |
printUsage()
Method which prints the method to use all the commands. |
void |
printUsage(String cmd)
|
int |
rename(String[] argv)
Renames a file or directory specified by argv. |
int |
rm(String[] argv)
Removes the file or directory specified by argv. |
int |
run(String[] argv)
Method which determines how to handle the user's request, will display usage help to the user if command format is incorrect. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TFsShell()
Method Detail |
---|
public void printUsage(String cmd)
public void close()
public int ls(String[] argv) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
argv[]
- Array of arguments given by the user's input from the terminal
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public int mkdir(String[] argv) throws InvalidPathException, FileAlreadyExistException
argv[]
- Array of arguments given by the user's input from the terminal
InvalidPathException
FileAlreadyExistException
public int rm(String[] argv) throws InvalidPathException, org.apache.thrift.TException
argv[]
- Array of arguments given by the user's input from the terminal
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public int rename(String[] argv) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
argv[]
- Array of arguments given by the user's input from the terminal
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public int copyToLocal(String[] argv) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException, IOException
argv[]
- Array of arguments given by the user's input from the terminal
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
IOException
public int location(String[] argv) throws FileDoesNotExistException, InvalidPathException, IOException, org.apache.thrift.TException
argv[]
- Array of arguments given by the user's input from the terminal
FileDoesNotExistException
InvalidPathException
IOException
org.apache.thrift.TException
public int copyFromLocal(String[] argv) throws FileNotFoundException, InvalidPathException, IOException, FileAlreadyExistException
argv[]
- Array of arguments given by the user's input from the terminal
FileDoesNotExistException
InvalidPathException
IOException
FileNotFoundException
FileAlreadyExistException
public void printUsage()
public static void main(String[] argv) throws org.apache.thrift.TException
argv[]
- Array of arguments given by the user's input from the terminal
org.apache.thrift.TException
public int run(String[] argv) throws org.apache.thrift.TException
argv[]
- Array of arguments given by the user's input from the terminal
org.apache.thrift.TException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |