Package org.apache.hadoop.fs
Class FsShellPermissions.Chmod
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.shell.Command
org.apache.hadoop.fs.shell.FsCommand
org.apache.hadoop.fs.FsShellPermissions
org.apache.hadoop.fs.FsShellPermissions.Chmod
- All Implemented Interfaces:
Configurable
- Enclosing class:
- FsShellPermissions
The pattern is almost as flexible as mode allowed by chmod shell command.
The main restriction is that we recognize only rwxXt. To reduce errors we
also enforce octal mode specifications of either 3 digits without a sticky
bit setting or four digits with a sticky bit setting.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.fs.FsShellPermissions
FsShellPermissions.Chgrp, FsShellPermissions.Chmod, FsShellPermissions.Chown -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected ChmodParserstatic final StringFields inherited from class org.apache.hadoop.fs.shell.Command
args, COMMAND_DESCRIPTION_FIELD, COMMAND_NAME_FIELD, COMMAND_USAGE_FIELD, err, exceptions, exitCode, name, numErrors, out, recursive -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocessOptions(LinkedList<String> args) Must be implemented by commands to process the command line flags and check the bounds of the remaining arguments.protected voidprocessPath(PathData item) Hook for commands to implement an operation to be applied on each path for the command.Methods inherited from class org.apache.hadoop.fs.FsShellPermissions
registerCommandsMethods inherited from class org.apache.hadoop.fs.shell.FsCommand
getCommandName, processRawArguments, run, runAllMethods inherited from class org.apache.hadoop.fs.shell.Command
displayError, displayError, displayWarning, exitCodeForError, expandArgument, expandArguments, getCommandFactory, getDepth, getDescription, getListingGroupSize, getName, getReplacementCommand, getUsage, isDeprecated, isPathRecursable, isRecursive, isSorted, postProcessPath, processArgument, processArguments, processNonexistentPath, processPathArgument, processPaths, processPaths, recursePath, run, run, setCommandFactory, setName, setRecursiveMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Field Details
-
NAME
- See Also:
-
USAGE
- See Also:
-
DESCRIPTION
- See Also:
-
pp
-
-
Constructor Details
-
Chmod
public Chmod()
-
-
Method Details
-
processOptions
Description copied from class:CommandMust be implemented by commands to process the command line flags and check the bounds of the remaining arguments. If an IllegalArgumentException is thrown, the FsShell object will print the short usage of the command.- Overrides:
processOptionsin classCommand- Parameters:
args- the command line arguments- Throws:
IOException- raised on errors performing I/O.
-
processPath
Description copied from class:CommandHook for commands to implement an operation to be applied on each path for the command. Note implementation of this method is optional if earlier methods in the chain handle the operation.- Overrides:
processPathin classCommand- Parameters:
item- aPathDataobject- Throws:
IOException- if anything else goes wrong in the user-implementation
-