@InterfaceAudience.Public public class TablePermission extends Permission
null, it implies
full table access.Permission.Action, Permission.Builder, Permission.Scope| Modifier and Type | Field and Description |
|---|---|
private byte[] |
family |
private byte[] |
qualifier |
private TableName |
table |
ACTION_BY_CODE, actions, scope, SCOPE_BY_CODE, VERSION| Constructor and Description |
|---|
TablePermission(TableName table,
byte[] family,
byte[] qualifier,
Permission.Action... assigned)
Construct a table:family:qualifier permission.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
equalsExceptActions(Object obj)
Check if two permission equals regardless of actions.
|
private boolean |
failCheckFamily(byte[] family) |
private boolean |
failCheckQualifier(byte[] qual) |
private boolean |
failCheckTable(TableName table) |
byte[] |
getFamily() |
String |
getNamespace() |
byte[] |
getQualifier() |
TableName |
getTableName() |
boolean |
hasFamily() |
int |
hashCode() |
boolean |
hasQualifier() |
boolean |
implies(TableName table,
byte[] family,
byte[] qualifier,
Permission.Action action)
Check if given action can performs on given table:family:qualifier.
|
boolean |
implies(TableName table,
byte[] family,
Permission.Action action)
Check if given action can performs on given table:family.
|
boolean |
implies(TableName table,
KeyValue kv,
Permission.Action action)
Checks if this permission grants access to perform the given action on
the given table and key value.
|
protected String |
rawExpression() |
void |
readFields(DataInput in) |
boolean |
tableFieldsEqual(TablePermission tp)
Check if fields of table in table permission equals.
|
String |
toString() |
void |
write(DataOutput out) |
getAccessScope, getActions, getVersion, implies, newBuilder, newBuilder, newBuilder, setActionsTablePermission(TableName table, byte[] family, byte[] qualifier, Permission.Action... assigned)
table - table namefamily - family namequalifier - qualifier nameassigned - assigned actionspublic TableName getTableName()
public boolean hasFamily()
public byte[] getFamily()
public boolean hasQualifier()
public byte[] getQualifier()
public String getNamespace()
public boolean implies(TableName table, byte[] family, byte[] qualifier, Permission.Action action)
table - table namefamily - family namequalifier - qualifier nameaction - one of [Read, Write, Create, Exec, Admin]public boolean implies(TableName table, byte[] family, Permission.Action action)
table - table namefamily - family nameaction - one of [Read, Write, Create, Exec, Admin]private boolean failCheckTable(TableName table)
private boolean failCheckFamily(byte[] family)
private boolean failCheckQualifier(byte[] qual)
public boolean implies(TableName table, KeyValue kv, Permission.Action action)
table - the table on which the operation is being performedkv - the KeyValue on which the operation is being requestedaction - the action requestedtrue if the action is allowed over the given scope
by this permission, otherwise falsepublic boolean tableFieldsEqual(TablePermission tp)
tp - to be checked table permissionpublic boolean equalsExceptActions(Object obj)
PermissionequalsExceptActions in class Permissionobj - instancepublic boolean equals(Object obj)
equals in class Permissionpublic int hashCode()
hashCode in class Permissionpublic String toString()
toString in class Permissionprotected String rawExpression()
rawExpression in class Permissionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class PermissionIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writablewrite in class PermissionIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.