Package alluxio.cli.fs.command
Class AbstractFileSystemCommand
- java.lang.Object
-
- alluxio.cli.fs.command.AbstractFileSystemCommand
-
- All Implemented Interfaces:
alluxio.cli.Command,java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractDistributedJobCommand,CancelCommand,CatCommand,CheckConsistencyCommand,ChecksumCommand,ChgrpCommand,ChmodCommand,ChownCommand,CopyFromLocalCommand,CopyToLocalCommand,CountCommand,CpCommand,DuCommand,FreeCommand,FreeWorkerCommand,GetCapacityBytesCommand,GetCmdStatusCommand,GetFaclCommand,GetSyncPathListCommand,GetUsedBytesCommand,HeadCommand,HelpCommand,LeaderCommand,LeaderCommand,ListCommand,LoadCommand,LoadMetadataCommand,LocationCommand,LsCommand,MasterInfoCommand,MkdirCommand,MountCommand,MvCommand,NeedsSyncCommand,PersistCommand,PinCommand,RmCommand,SetFaclCommand,SetReplicationCommand,SetTtlCommand,StartSyncCommand,StatCommand,StatCommand,StopSyncCommand,SyncDirNextTimeCommand,TailCommand,TestCommand,TouchCommand,UnmountCommand,UnpinCommand,UnsetTtlCommand,UpdateMountCommand
@ThreadSafe public abstract class AbstractFileSystemCommand extends java.lang.Object implements alluxio.cli.CommandThe base class for all the FileSystemCommandclasses. It provides a place to hold theFileSystemclient.
-
-
Field Summary
Fields Modifier and Type Field Description protected alluxio.client.file.FileSystemmFileSystemprotected alluxio.client.file.FileSystemContextmFsContext
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFileSystemCommand(alluxio.client.file.FileSystemContext fsContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidprocessHeader(org.apache.commons.cli.CommandLine cl)Processes the header of the command.protected voidrunPlainPath(alluxio.AlluxioURI plainPath, org.apache.commons.cli.CommandLine cl)Runs the command for a particular URI that does not contain wildcard in its path.protected voidrunWildCardCmd(alluxio.AlluxioURI wildCardPath, org.apache.commons.cli.CommandLine cl)Runs the command for a particular URI that may contain wildcard in its path.
-
-
-
Method Detail
-
runPlainPath
protected void runPlainPath(alluxio.AlluxioURI plainPath, org.apache.commons.cli.CommandLine cl) throws alluxio.exception.AlluxioException, java.io.IOExceptionRuns the command for a particular URI that does not contain wildcard in its path.- Parameters:
plainPath- an AlluxioURI that does not contain wildcardcl- object containing the original commandLine- Throws:
alluxio.exception.AlluxioExceptionjava.io.IOException
-
processHeader
protected void processHeader(org.apache.commons.cli.CommandLine cl) throws java.io.IOExceptionProcesses the header of the command. Our input path may contain wildcard but we only want to print the header for once.- Parameters:
cl- object containing the original commandLine- Throws:
java.io.IOException
-
runWildCardCmd
protected void runWildCardCmd(alluxio.AlluxioURI wildCardPath, org.apache.commons.cli.CommandLine cl) throws java.io.IOExceptionRuns the command for a particular URI that may contain wildcard in its path.- Parameters:
wildCardPath- an AlluxioURI that may or may not contain a wildcardcl- object containing the original commandLine- Throws:
java.io.IOException
-
-