Localizer.PermissionsHandler (Hadoop 0.20.2+737 API)
Date: 2010-10-11

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapreduce.server.tasktracker
Class Localizer.PermissionsHandler

    java.lang.Object
      org.apache.hadoop.mapreduce.server.tasktracker.Localizer.PermissionsHandler

Enclosing class:
  Localizer

    public static class Localizer.PermissionsHandler

extends Object

NOTE: This class is internal only class and not intended for users!!

Nested Class Summary
`static class` | `Localizer.PermissionsHandler.PermissionsInfo` Permission information useful for setting permissions for a given path.

Field Summary
`static Localizer.PermissionsHandler.PermissionsInfo` | `sevenFiveFive` Permissions rwxr_xr_x
`static Localizer.PermissionsHandler.PermissionsInfo` | `sevenZeroZero` Completely private permissions

Constructor Summary
`Localizer.PermissionsHandler()`

Method Summary
`static boolean` | `setPermissions(File f, Localizer.PermissionsHandler.PermissionsInfo pInfo)` Set permission on the given file path using the specified permissions information.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sevenFiveFive

    public static final Localizer.PermissionsHandler.PermissionsInfo sevenFiveFive

  Permissions rwxr_xr_x

### sevenZeroZero

    public static final Localizer.PermissionsHandler.PermissionsInfo sevenZeroZero

  Completely private permissions

Constructor Detail

### Localizer.PermissionsHandler

    public Localizer.PermissionsHandler()

Method Detail

### setPermissions

    public static boolean setPermissions(File f,
                                         Localizer.PermissionsHandler.PermissionsInfo pInfo)

  Set permission on the given file path using the specified permissions information. We use java api to set permission instead of spawning chmod processes. This saves a lot of time. Using this, one can set all possible combinations of permissions for the owner of the file. But permissions for the group and all others can only be set together, i.e. permissions for group cannot be set different from those for others and vice versa. This method should satisfy the needs of most of the applications. For those it doesn't, `FileUtil.chmod(java.lang.String, java.lang.String)` can be used.

  Parameters:
    `f` - file path
    `pInfo` - permissions information
  Returns:
    true if success, false otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation