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 terminalIOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public int cat(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int copyFromLocal(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int copyToLocal(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int count(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int fileinfo(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int location(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int ls(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int lsr(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int mkdir(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int pin(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public void printUsage()
public int rename(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int report(String[] argv) throws IOException
IOException
public int request(String[] argv) throws IOException
IOException
public int rm(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int rmr(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public 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 terminalIOException
public int touch(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int unpin(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
public int free(String[] argv) throws IOException
argv
- [] Array of arguments given by the user's input from the terminalIOException
Copyright © 2015. All Rights Reserved.