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!!
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sevenFiveFive
public static final Localizer.PermissionsHandler.PermissionsInfo sevenFiveFive
- Permissions rwxr_xr_x
sevenZeroZero
public static final Localizer.PermissionsHandler.PermissionsInfo sevenZeroZero
- Completely private permissions
Localizer.PermissionsHandler
public Localizer.PermissionsHandler()
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 pathpInfo
- permissions information
- Returns:
- true if success, false otherwise
Copyright © 2009 The Apache Software Foundation