Package org.apache.hadoop.fs.permission
Class FsCreateModes
java.lang.Object
org.apache.hadoop.fs.permission.FsPermission
org.apache.hadoop.fs.permission.FsCreateModes
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Writable
A class that stores both masked and unmasked create modes
and is a drop-in replacement for masked permission.
- See Also:
-
Field Summary
Fields inherited from class org.apache.hadoop.fs.permission.FsPermission
DEFAULT_UMASK, MAX_PERMISSION_LENGTH, UMASK_LABEL -
Method Summary
Modifier and TypeMethodDescriptionstatic FsPermissionapplyUMask(FsPermission mode, FsPermission umask) Create from unmasked mode and umask.static FsCreateModescreate(FsPermission masked, FsPermission unmasked) Create from masked and unmasked modes.booleanGet masked permission if exists.Get unmasked permission if exists.inthashCode()toString()Methods inherited from class org.apache.hadoop.fs.permission.FsPermission
applyUMask, createImmutable, fromShort, getAclBit, getCachePoolDefault, getDefault, getDirDefault, getEncryptedBit, getErasureCodedBit, getFileDefault, getGroupAction, getOtherAction, getStickyBit, getUMask, getUserAction, read, readFields, setUMask, toExtendedShort, toOctal, toShort, validateObject, valueOf, write
-
Method Details
-
applyUMask
Create from unmasked mode and umask.- Parameters:
mode- mode.umask- umask.- Returns:
- If the mode is already an FsCreateModes object, return it.
-
create
Create from masked and unmasked modes.- Parameters:
masked- masked.unmasked- unmasked.- Returns:
- FsCreateModes.
-
getMasked
Description copied from class:FsPermissionGet masked permission if exists.- Overrides:
getMaskedin classFsPermission- Returns:
- masked.
-
getUnmasked
Description copied from class:FsPermissionGet unmasked permission if exists.- Overrides:
getUnmaskedin classFsPermission- Returns:
- unmasked.
-
toString
- Overrides:
toStringin classFsPermission
-
equals
- Overrides:
equalsin classFsPermission
-
hashCode
public int hashCode()- Overrides:
hashCodein classFsPermission
-