限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_UMASK |
static String |
DEPRECATED_UMASK_LABEL
umask property label
|
static String |
UMASK_LABEL |
构造器和说明 |
---|
FsPermission(FsAction u,
FsAction g,
FsAction o)
Construct by the given
FsAction . |
FsPermission(FsPermission other)
Copy constructor
|
FsPermission(short mode)
Construct by the given mode.
|
FsPermission(String mode)
Construct by given mode, either in octal or symbolic format.
|
限定符和类型 | 方法和说明 |
---|---|
FsPermission |
applyUMask(FsPermission umask)
Apply a umask to this permission and return a new one
|
static FsPermission |
createImmutable(short permission)
Create an immutable
FsPermission object. |
boolean |
equals(Object obj) |
void |
fromShort(short n) |
static FsPermission |
getDefault()
Get the default permission.
|
FsAction |
getGroupAction()
Return group
FsAction . |
FsAction |
getOtherAction()
Return other
FsAction . |
static FsPermission |
getUMask(Configuration conf)
Get the user file creation mask (umask)
UMASK_LABEL config param has umask value that is either symbolic
or octal. |
FsAction |
getUserAction()
Return user
FsAction . |
int |
hashCode() |
static FsPermission |
read(DataInput in)
Create and initialize a
FsPermission from DataInput . |
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
static void |
setUMask(Configuration conf,
FsPermission umask)
Set the user file creation mask (umask)
|
short |
toShort()
Encode the object to a short.
|
String |
toString() |
static FsPermission |
valueOf(String unixSymbolicPermission)
Create a FsPermission from a Unix symbolic permission string
|
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
public static final String DEPRECATED_UMASK_LABEL
public static final int DEFAULT_UMASK
public FsPermission(FsAction u, FsAction g, FsAction o)
FsAction
.u
- user actiong
- group actiono
- other actionpublic FsPermission(short mode)
mode
- toShort()
public FsPermission(FsPermission other)
other
- other permissionpublic FsPermission(String mode)
mode
- mode as a string, either in octal or symbolic formatIllegalArgumentException
- if mode
is invalidpublic static FsPermission createImmutable(short permission)
FsPermission
object.public void fromShort(short n)
public void write(DataOutput out) throws IOException
out
.write
在接口中 Writable
out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
在接口中 Writable
in
- DataInput
to deseriablize this object from.IOException
public static FsPermission read(DataInput in) throws IOException
FsPermission
from DataInput
.IOException
public short toShort()
public FsPermission applyUMask(FsPermission umask)
public static FsPermission getUMask(Configuration conf)
UMASK_LABEL
config param has umask value that is either symbolic
or octal.
Symbolic umask is applied relative to file mode creation mask;
the permission op characters '+' clears the corresponding bit in the mask,
'-' sets bits in the mask.
Octal umask, the specified bits are set in the file mode creation mask.
DEPRECATED_UMASK_LABEL
config param has umask value set to decimal.public static void setUMask(Configuration conf, FsPermission umask)
public static FsPermission getDefault()
public static FsPermission valueOf(String unixSymbolicPermission)
unixSymbolicPermission
- e.g. "-rw-rw-rw-"Copyright © 2009 The Apache Software Foundation