Package alluxio.cli.fs.command
Class TouchCommand
- java.lang.Object
-
- alluxio.cli.fs.command.AbstractFileSystemCommand
-
- alluxio.cli.fs.command.TouchCommand
-
- All Implemented Interfaces:
alluxio.cli.Command,java.io.Closeable,java.lang.AutoCloseable
@ThreadSafe @PublicApi public final class TouchCommand extends AbstractFileSystemCommand
Creates a 0 byte file specified by argv. The file will be written to UnderFileSystem.
-
-
Field Summary
-
Fields inherited from class alluxio.cli.fs.command.AbstractFileSystemCommand
mFileSystem, mFsContext
-
-
Constructor Summary
Constructors Constructor Description TouchCommand(alluxio.client.file.FileSystemContext fsContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCommandName()java.lang.StringgetDescription()java.lang.StringgetUsage()intrun(org.apache.commons.cli.CommandLine cl)protected voidrunPlainPath(alluxio.AlluxioURI inputPath, org.apache.commons.cli.CommandLine cl)Runs the command for a particular URI that does not contain wildcard in its path.voidvalidateArgs(org.apache.commons.cli.CommandLine cl)-
Methods inherited from class alluxio.cli.fs.command.AbstractFileSystemCommand
processHeader, runWildCardCmd
-
-
-
-
Method Detail
-
getCommandName
public java.lang.String getCommandName()
-
validateArgs
public void validateArgs(org.apache.commons.cli.CommandLine cl) throws alluxio.exception.status.InvalidArgumentException- Throws:
alluxio.exception.status.InvalidArgumentException
-
runPlainPath
protected void runPlainPath(alluxio.AlluxioURI inputPath, org.apache.commons.cli.CommandLine cl) throws alluxio.exception.AlluxioException, java.io.IOExceptionDescription copied from class:AbstractFileSystemCommandRuns the command for a particular URI that does not contain wildcard in its path.- Overrides:
runPlainPathin classAbstractFileSystemCommand- Parameters:
inputPath- an AlluxioURI that does not contain wildcardcl- object containing the original commandLine- Throws:
alluxio.exception.AlluxioExceptionjava.io.IOException
-
run
public int run(org.apache.commons.cli.CommandLine cl) throws alluxio.exception.AlluxioException, java.io.IOException- Throws:
alluxio.exception.AlluxioExceptionjava.io.IOException
-
getUsage
public java.lang.String getUsage()
-
getDescription
public java.lang.String getDescription()
-
-