org.apache.hadoop.fs
Class FsShellPermissions.Chmod

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.fs.shell.Command
          extended by org.apache.hadoop.fs.shell.FsCommand
              extended by org.apache.hadoop.fs.FsShellPermissions
                  extended by org.apache.hadoop.fs.FsShellPermissions.Chmod
All Implemented Interfaces:
Configurable
Enclosing class:
org.apache.hadoop.fs.FsShellPermissions

public static class FsShellPermissions.Chmod
extends org.apache.hadoop.fs.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
static String DESCRIPTION
           
static String NAME
           
protected  org.apache.hadoop.fs.permission.ChmodParser pp
           
static String USAGE
           
 
Fields inherited from class org.apache.hadoop.fs.shell.Command
args, err, exceptions, exitCode, name, numErrors, out, recursive
 
Constructor Summary
FsShellPermissions.Chmod()
           
 
Method Summary
protected  void processOptions(LinkedList<String> args)
          Must be implemented by commands to process the command line flags and check the bounds of the remaining arguments.
protected  void processPath(org.apache.hadoop.fs.shell.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
registerCommands
 
Methods inherited from class org.apache.hadoop.fs.shell.FsCommand
getCommandName, run, runAll
 
Methods inherited from class org.apache.hadoop.fs.shell.Command
displayError, displayError, displayWarning, exitCodeForError, expandArgument, expandArguments, getDepth, getDescription, getName, getReplacementCommand, getUsage, isDeprecated, isRecursive, postProcessPath, processArgument, processArguments, processNonexistentPath, processPathArgument, processPaths, processRawArguments, recursePath, run, setName, setRecursive
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

USAGE

public static final String USAGE
See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

pp

protected org.apache.hadoop.fs.permission.ChmodParser pp
Constructor Detail

FsShellPermissions.Chmod

public FsShellPermissions.Chmod()
Method Detail

processOptions

protected void processOptions(LinkedList<String> args)
                       throws IOException
Description copied from class: org.apache.hadoop.fs.shell.Command
Must 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:
processOptions in class org.apache.hadoop.fs.shell.Command
Parameters:
args - the command line arguments
Throws:
IOException

processPath

protected void processPath(org.apache.hadoop.fs.shell.PathData item)
                    throws IOException
Description copied from class: org.apache.hadoop.fs.shell.Command
Hook 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:
processPath in class org.apache.hadoop.fs.shell.Command
Parameters:
item - a PathData object
Throws:
IOException - if anything else goes wrong in the user-implementation


Copyright © 2013 Apache Software Foundation. All Rights Reserved.