org.apache.hadoop.fs.permission
Class PermissionStatus

java.lang.Object
  extended by org.apache.hadoop.fs.permission.PermissionStatus
All Implemented Interfaces:
Writable

public class PermissionStatus
extends Object
implements Writable

Store permission related information.


Constructor Summary
PermissionStatus(String user, String group, FsPermission permission)
          Constructor
 
Method Summary
 PermissionStatus applyUMask(FsPermission umask)
          Apply umask.
static PermissionStatus createImmutable(String user, String group, FsPermission permission)
          Create an immutable PermissionStatus object.
 String getGroupName()
          Return group name
 FsPermission getPermission()
          Return permission
 String getUserName()
          Return user name
static PermissionStatus read(DataInput in)
          Create and initialize a PermissionStatus from DataInput.
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 String toString()
          
 void write(DataOutput out)
          Serialize the fields of this object to out.
static void write(DataOutput out, String username, String groupname, FsPermission permission)
          Serialize a PermissionStatus from its base components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PermissionStatus

public PermissionStatus(String user,
                        String group,
                        FsPermission permission)
Constructor

Method Detail

createImmutable

public static PermissionStatus createImmutable(String user,
                                               String group,
                                               FsPermission permission)
Create an immutable PermissionStatus object.


getUserName

public String getUserName()
Return user name


getGroupName

public String getGroupName()
Return group name


getPermission

public FsPermission getPermission()
Return permission


applyUMask

public PermissionStatus applyUMask(FsPermission umask)
Apply umask.

See Also:
FsPermission.applyUMask(FsPermission)

readFields

public void readFields(DataInput in)
                throws IOException
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

read

public static PermissionStatus read(DataInput in)
                             throws IOException
Create and initialize a PermissionStatus from DataInput.

Throws:
IOException

write

public static void write(DataOutput out,
                         String username,
                         String groupname,
                         FsPermission permission)
                  throws IOException
Serialize a PermissionStatus from its base components.

Throws:
IOException

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2009 The Apache Software Foundation