Class NamespacePermission
java.lang.Object
org.apache.hadoop.io.VersionedWritable
org.apache.hadoop.hbase.security.access.Permission
org.apache.hadoop.hbase.security.access.NamespacePermission
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
Represents an authorization for access for the given namespace.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.security.access.Permission
Permission.Action, Permission.Builder, Permission.Scope
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.security.access.Permission
ACTION_BY_CODE, actions, scope, SCOPE_BY_CODE, VERSION
-
Constructor Summary
ConstructorDescriptionNamespacePermission
(String namespace, Permission.Action... assigned) Construct a namespace permission. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Check if two permission equals regardless of actions.int
hashCode()
boolean
implies
(String namespace, Permission.Action action) check if given action is granted in given namespace.protected String
void
readFields
(DataInput in) toString()
void
write
(DataOutput out) Methods inherited from class org.apache.hadoop.hbase.security.access.Permission
getAccessScope, getActions, getVersion, implies, newBuilder, newBuilder, newBuilder, setActions
-
Field Details
-
namespace
-
-
Constructor Details
-
NamespacePermission
NamespacePermission(String namespace, Permission.Action... assigned) Construct a namespace permission.- Parameters:
namespace
- namespace's nameassigned
- assigned actions
-
-
Method Details
-
getNamespace
-
implies
check if given action is granted in given namespace.- Parameters:
namespace
- namespace's nameaction
- action to be checked- Returns:
- true if granted, false otherwise
-
equalsExceptActions
Description copied from class:Permission
Check if two permission equals regardless of actions. It is useful when merging a new permission with an existed permission which needs to check two permissions's fields.- Overrides:
equalsExceptActions
in classPermission
- Parameters:
obj
- instance- Returns:
- true if equals, false otherwise
-
hashCode
- Overrides:
hashCode
in classPermission
-
equals
- Overrides:
equals
in classPermission
-
toString
- Overrides:
toString
in classPermission
-
rawExpression
- Overrides:
rawExpression
in classPermission
-
readFields
- Specified by:
readFields
in interfaceorg.apache.hadoop.io.Writable
- Overrides:
readFields
in classPermission
- Throws:
IOException
-
write
- Specified by:
write
in interfaceorg.apache.hadoop.io.Writable
- Overrides:
write
in classPermission
- Throws:
IOException
-