@Deprecated
  public static List<UserPermission> getUserPermissions(RpcController controller,
    AccessControlService.BlockingInterface protocol, TableName t, byte[] columnFamily,
    byte[] columnQualifier, String userName) throws ServiceException {
    AccessControlProtos.GetUserPermissionsRequest.Builder builder =
      AccessControlProtos.GetUserPermissionsRequest.newBuilder();
    if (t != null) {
      builder.setTableName(ProtobufUtil.toProtoTableName(t));
    }
    if (Bytes.len(columnFamily) > 0) {
      builder.setColumnFamily(ByteString.copyFrom(columnFamily));
    }
    if (Bytes.len(columnQualifier) > 0) {
      builder.setColumnQualifier(ByteString.copyFrom(columnQualifier));
    }
    if (!StringUtils.isEmpty(userName)) {
      builder.setUserName(ByteString.copyFromUtf8(userName));
    }

    builder.setType(AccessControlProtos.Permission.Type.Table);
    AccessControlProtos.GetUserPermissionsRequest request = builder.build();
    AccessControlProtos.GetUserPermissionsResponse response =
      protocol.getUserPermissions(controller, request);
    List<UserPermission> perms = new ArrayList<>(response.getUserPermissionCount());
    for (AccessControlProtos.UserPermission perm : response.getUserPermissionList()) {
      perms.add(toUserPermission(perm));
    }
    return perms;
  }
A utility used to get user table permissions based on the column family, column qualifier and
user name.
@param controller      RpcController
@param protocol        the AccessControlService protocol proxy
@param t               optional table name
@param columnFamily    Column family
@param columnQualifier Column qualifier
@param userName        User name, if empty then all user permissions will be retrieved.
@deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlUtil.java