public class UserPermission extends TablePermission
Permission.Action
ACTION_BY_CODE, actions, VERSION
Constructor and Description |
---|
UserPermission()
Nullary constructor for Writable, do not use
|
UserPermission(byte[] user,
byte[] actionCodes)
Creates a new instance for the given user,
matching the actions with the given codes.
|
UserPermission(byte[] user,
byte[] table,
byte[] family,
byte[] qualifier,
byte[] actionCodes)
Creates a new instance for the given user, table, column family and
qualifier, matching the actions with the given codes.
|
UserPermission(byte[] user,
byte[] table,
byte[] family,
byte[] qualifier,
Permission.Action... assigned)
Creates a new permission for the given user, table, column family and
column qualifier.
|
UserPermission(byte[] user,
byte[] table,
byte[] family,
Permission.Action... assigned)
Creates a new instance for the given user, table and column family.
|
UserPermission(byte[] user,
Permission.Action... assigned)
Creates a new instance for the given user.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
byte[] |
getUser() |
int |
hashCode() |
boolean |
isGlobal()
Returns true if this permission describes a global user permission.
|
void |
readFields(DataInput in) |
String |
toString() |
void |
write(DataOutput out) |
getFamily, getQualifier, getTable, implies, implies, matchesFamily, matchesFamilyQualifier
getActions, getVersion, implies
public UserPermission()
public UserPermission(byte[] user, Permission.Action... assigned)
user
- the userassigned
- the list of allowed actionspublic UserPermission(byte[] user, byte[] actionCodes)
user
- the useractionCodes
- the list of allowed action codespublic UserPermission(byte[] user, byte[] table, byte[] family, Permission.Action... assigned)
user
- the usertable
- the tablefamily
- the family, can be null if action is allowed over the entire
tableassigned
- the list of allowed actionspublic UserPermission(byte[] user, byte[] table, byte[] family, byte[] qualifier, Permission.Action... assigned)
user
- the usertable
- the tablefamily
- the family, can be null if action is allowed over the entire
tablequalifier
- the column qualifier, can be null if action is allowed
over the entire column familyassigned
- the list of allowed actionspublic UserPermission(byte[] user, byte[] table, byte[] family, byte[] qualifier, byte[] actionCodes)
user
- the usertable
- the tablefamily
- the family, can be null if action is allowed over the entire
tablequalifier
- the column qualifier, can be null if action is allowed
over the entire column familyactionCodes
- the list of allowed action codespublic byte[] getUser()
public boolean isGlobal()
public boolean equals(Object obj)
equals
in class TablePermission
public int hashCode()
hashCode
in class TablePermission
public String toString()
toString
in class TablePermission
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class TablePermission
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class TablePermission
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.