@InterfaceAudience.Private public class AccessControlUtil extends Object
public static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.GrantRequest buildGrantRequest(String username, TableName tableName, byte[] family, byte[] qualifier, boolean mergeExistingPermissions, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action... actions)
username - the short user name who to grant permissionstableName - optional table name the permissions applyfamily - optional column familyqualifier - optional qualifieractions - the permissions to be grantedAccessControlProtos GrantRequestpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.GrantRequest buildGrantRequest(String username, String namespace, boolean mergeExistingPermissions, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action... actions)
username - the short user name who to grant permissionsnamespace - optional table name the permissions applyactions - the permissions to be grantedAccessControlProtos GrantRequestpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.RevokeRequest buildRevokeRequest(String username, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action... actions)
username - the short user name whose permissions to be revokedactions - the permissions to be revokedAccessControlProtos RevokeRequestpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.RevokeRequest buildRevokeRequest(String username, String namespace, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action... actions)
username - the short user name whose permissions to be revokednamespace - optional table name the permissions applyactions - the permissions to be revokedAccessControlProtos RevokeRequestpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.GrantRequest buildGrantRequest(String username, boolean mergeExistingPermissions, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action... actions)
username - the short user name who to grant permissionsactions - the permissions to be grantedAccessControlProtos GrantRequestpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.UsersAndPermissions toUsersAndPermissions(String user, Permission perms)
public static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.UsersAndPermissions toUsersAndPermissions(org.apache.hbase.thirdparty.com.google.common.collect.ListMultimap<String,Permission> perms)
public static org.apache.hbase.thirdparty.com.google.common.collect.ListMultimap<String,Permission> toUsersAndPermissions(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.UsersAndPermissions proto)
public static Permission toPermission(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission proto)
proto - the protobuf Permissionpublic static TablePermission toTablePermission(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission proto)
proto - the protobuf Permissionpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission toPermission(Permission perm)
perm - the client Permissionpublic static List<Permission.Action> toPermissionActions(List<org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action> protoActions)
protoActions - the list of protobuf Actionspublic static Permission.Action toPermissionAction(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action action)
action - the protobuf Actionpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action toPermissionAction(Permission.Action action)
action - the client Actionpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.UserPermission toUserPermission(UserPermission perm)
perm - the client UserPermissionpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.GetUserPermissionsResponse buildGetUserPermissionsResponse(List<UserPermission> permissions)
public static UserPermission toUserPermission(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.UserPermission proto)
proto - the protobuf UserPermissionpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.UsersAndPermissions toUserTablePermissions(org.apache.hbase.thirdparty.com.google.common.collect.ListMultimap<String,TablePermission> perm)
perm - the list of user and table permissionspublic static void grant(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
boolean mergeExistingPermissions,
Permission.Action... actions)
throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxyuserShortName - the short name of the user to grant permissionsactions - the permissions to be grantedcom.google.protobuf.ServiceExceptionpublic static void grant(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
TableName tableName,
byte[] f,
byte[] q,
boolean mergeExistingPermissions,
Permission.Action... actions)
throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxyuserShortName - the short name of the user to grant permissionstableName - optional table namef - optional column familyq - optional qualifieractions - the permissions to be grantedcom.google.protobuf.ServiceExceptionpublic static void grant(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
String namespace,
boolean mergeExistingPermissions,
Permission.Action... actions)
throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxynamespace - the short name of the user to grant permissionsactions - the permissions to be grantedcom.google.protobuf.ServiceExceptionpublic static void revoke(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
Permission.Action... actions)
throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxyuserShortName - the short name of the user to revoke permissionsactions - the permissions to be revokedcom.google.protobuf.ServiceExceptionpublic static void revoke(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
TableName tableName,
byte[] f,
byte[] q,
Permission.Action... actions)
throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxyuserShortName - the short name of the user to revoke permissionstableName - optional table namef - optional column familyq - optional qualifieractions - the permissions to be revokedcom.google.protobuf.ServiceExceptionpublic static void revoke(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
String namespace,
Permission.Action... actions)
throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxyuserShortName - the short name of the user to revoke permissionsnamespace - optional table nameactions - the permissions to be revokedcom.google.protobuf.ServiceExceptionpublic static List<UserPermission> getUserPermissions(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxycom.google.protobuf.ServiceExceptionpublic static List<UserPermission> getUserPermissions(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol, TableName t) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxyt - optional table namecom.google.protobuf.ServiceExceptionpublic static List<UserPermission> getUserPermissions(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.BlockingInterface protocol, byte[] namespace) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol - the AccessControlService protocol proxynamespace - name of the namespacecom.google.protobuf.ServiceExceptionpublic static org.apache.hbase.thirdparty.com.google.common.collect.ListMultimap<String,TablePermission> toUserTablePermissions(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.UsersAndPermissions proto)
proto - the protobuf UserPermissionpublic static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.RevokeRequest buildRevokeRequest(String username, TableName tableName, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.Permission.Action... actions)
username - the short user name whose permissions to be revokedtableName - optional table name the permissions applyfamily - optional column familyqualifier - optional qualifieractions - the permissions to be revokedAccessControlProtos RevokeRequestCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.