@InterfaceAudience.Public public class NamespacePermission extends Permission
Permission.Action, Permission.Builder, Permission.Scope
Modifier and Type | Field and Description |
---|---|
private String |
namespace |
ACTION_BY_CODE, actions, scope, SCOPE_BY_CODE, VERSION
Constructor and Description |
---|
NamespacePermission(String namespace,
Permission.Action... assigned)
Construct a namespace permission.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
equalsExceptActions(Object obj)
Check if two permission equals regardless of actions.
|
String |
getNamespace() |
int |
hashCode() |
boolean |
implies(String namespace,
Permission.Action action)
check if given action is granted in given namespace.
|
protected String |
rawExpression() |
void |
readFields(DataInput in) |
String |
toString() |
void |
write(DataOutput out) |
getAccessScope, getActions, getVersion, implies, newBuilder, newBuilder, newBuilder, setActions
NamespacePermission(String namespace, Permission.Action... assigned)
namespace
- namespace's nameassigned
- assigned actionspublic String getNamespace()
public boolean implies(String namespace, Permission.Action action)
namespace
- namespace's nameaction
- action to be checkedpublic boolean equalsExceptActions(Object obj)
Permission
equalsExceptActions
in class Permission
obj
- instancepublic int hashCode()
hashCode
in class Permission
public boolean equals(Object obj)
equals
in class Permission
public String toString()
toString
in class Permission
protected String rawExpression()
rawExpression
in class Permission
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class Permission
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class Permission
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.