@InterfaceAudience.Public public class Permission extends org.apache.hadoop.io.VersionedWritable
TablePermission
Modifier and Type | Class and Description |
---|---|
static class |
Permission.Action |
static class |
Permission.Builder |
protected static class |
Permission.Scope |
Modifier and Type | Field and Description |
---|---|
protected static Map<Byte,Permission.Action> |
ACTION_BY_CODE |
protected EnumSet<Permission.Action> |
actions |
private static org.slf4j.Logger |
LOG |
protected Permission.Scope |
scope |
protected static Map<Byte,Permission.Scope> |
SCOPE_BY_CODE |
protected static byte |
VERSION |
Constructor and Description |
---|
Permission()
Empty constructor for Writable implementation.
|
Permission(byte[] actionCodes) |
Permission(Permission.Action... assigned) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
equalsExceptActions(Object obj)
Check if two permission equals regardless of actions.
|
Permission.Scope |
getAccessScope() |
Permission.Action[] |
getActions() |
byte |
getVersion()
Returns the object version number
|
int |
hashCode() |
boolean |
implies(Permission.Action action)
check if given action is granted
|
static Permission.Builder |
newBuilder()
Build a global permission
|
static Permission.Builder |
newBuilder(String namespace)
Build a namespace permission
|
static Permission.Builder |
newBuilder(TableName tableName)
Build a table permission
|
protected String |
rawExpression() |
void |
readFields(DataInput in) |
void |
setActions(Permission.Action[] assigned) |
String |
toString() |
void |
write(DataOutput out) |
protected static final byte VERSION
private static final org.slf4j.Logger LOG
protected static final Map<Byte,Permission.Action> ACTION_BY_CODE
protected static final Map<Byte,Permission.Scope> SCOPE_BY_CODE
protected EnumSet<Permission.Action> actions
protected Permission.Scope scope
public Permission()
public Permission(Permission.Action... assigned)
public Permission(byte[] actionCodes)
public Permission.Action[] getActions()
public boolean implies(Permission.Action action)
action
- action to be checkedpublic void setActions(Permission.Action[] assigned)
public boolean equalsExceptActions(Object obj)
obj
- instanceprotected String rawExpression()
public byte getVersion()
getVersion
in class org.apache.hadoop.io.VersionedWritable
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class org.apache.hadoop.io.VersionedWritable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class org.apache.hadoop.io.VersionedWritable
IOException
public Permission.Scope getAccessScope()
public static Permission.Builder newBuilder()
public static Permission.Builder newBuilder(String namespace)
namespace
- the specific namespacepublic static Permission.Builder newBuilder(TableName tableName)
tableName
- the specific table nameCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.