@ThreadSafe @PublicApi public final class DuCommand extends AbstractFileSystemCommand
mFileSystem, mFsContext
Constructor and Description |
---|
DuCommand(FileSystemContext fsContext) |
Modifier and Type | Method and Description |
---|---|
String |
getCommandName()
Gets the command name as input from the shell.
|
String |
getDescription() |
org.apache.commons.cli.Options |
getOptions() |
String |
getUsage() |
protected void |
processHeader(org.apache.commons.cli.CommandLine cl)
Processes the header of the command.
|
int |
run(org.apache.commons.cli.CommandLine cl)
Runs the command.
|
protected void |
runPlainPath(AlluxioURI path,
org.apache.commons.cli.CommandLine cl)
Runs the command for a particular URI that does not contain wildcard in its path.
|
void |
validateArgs(org.apache.commons.cli.CommandLine cl)
Checks if the arguments are valid or throw InvalidArgumentException.
|
runWildCardCmd
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSubCommands, hasSubCommand, parseAndValidateArgs
public DuCommand(FileSystemContext fsContext)
fsContext
- the filesystem of Alluxiopublic String getCommandName()
Command
protected void processHeader(org.apache.commons.cli.CommandLine cl)
AbstractFileSystemCommand
processHeader
in class AbstractFileSystemCommand
cl
- object containing the original commandLineprotected void runPlainPath(AlluxioURI path, org.apache.commons.cli.CommandLine cl) throws AlluxioException, IOException
AbstractFileSystemCommand
runPlainPath
in class AbstractFileSystemCommand
path
- an AlluxioURI that does not contain wildcardcl
- object containing the original commandLineAlluxioException
IOException
public String getUsage()
public String getDescription()
public void validateArgs(org.apache.commons.cli.CommandLine cl) throws InvalidArgumentException
Command
cl
- the parsed command line for the argumentsInvalidArgumentException
- when arguments are not validpublic org.apache.commons.cli.Options getOptions()
Options
of the commandpublic int run(org.apache.commons.cli.CommandLine cl) throws AlluxioException, IOException
Command
cl
- the parsed command line for the argumentsAlluxioException
IOException
Copyright © 2023. All Rights Reserved.