public class TFsShell extends Object implements Closeable
| Constructor and Description |
|---|
TFsShell() |
| Modifier and Type | Method and Description |
|---|---|
int |
cat(String[] argv)
Prints the file's contents to the console.
|
void |
close() |
int |
copyFromLocal(String[] argv)
Copies a file or directory 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 |
count(String[] argv)
Displays the number of folders and files matching the specified prefix in argv.
|
int |
fileinfo(String[] argv)
Displays the file's all blocks info
|
int |
free(String[] argv)
Free the file or Folder from tachyon in-memory specified by argv
|
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.
|
int |
lsr(String[] argv)
Displays information for all directories and files under the path specified in argv
recursively.
|
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.
|
int |
pin(String[] argv)
Pins the given file or folder (recursively pinning all children if a folder).
|
void |
printUsage()
Method which prints the method to use all the commands.
|
int |
rename(String[] argv)
Renames a file or directory specified by argv.
|
int |
report(String[] argv) |
int |
request(String[] argv) |
int |
rm(String[] argv)
Removes the file specified by argv.
|
int |
rmr(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.
|
int |
tail(String[] argv)
Prints the file's last 1KB of contents to the console.
|
int |
touch(String[] argv)
Creates a 0 byte file specified by argv.
|
int |
unpin(String[] argv)
Unpins the given file or folder (recursively unpinning all children if a folder).
|
public static void main(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic int cat(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int copyFromLocal(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int copyToLocal(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int count(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int fileinfo(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int location(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int ls(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int lsr(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int mkdir(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int pin(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic void printUsage()
public int rename(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int report(String[] argv) throws IOException
IOExceptionpublic int request(String[] argv) throws IOException
IOExceptionpublic int rm(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int rmr(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int run(String[] argv)
argv - [] Array of arguments given by the user's input from the terminalpublic int tail(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int touch(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int unpin(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionpublic int free(String[] argv) throws IOException
argv - [] Array of arguments given by the user's input from the terminalIOExceptionCopyright © 2015. All Rights Reserved.