public static AccessControlProtos.RevokeRequest buildRevokeRequest(String username,
    TableName tableName, byte[] family, byte[] qualifier,
    AccessControlProtos.Permission.Action... actions) {
    AccessControlProtos.Permission.Builder ret = AccessControlProtos.Permission.newBuilder();
    AccessControlProtos.TablePermission.Builder permissionBuilder =
      AccessControlProtos.TablePermission.newBuilder();
    for (AccessControlProtos.Permission.Action a : actions) {
      permissionBuilder.addAction(a);
    }
    if (tableName != null) {
      permissionBuilder.setTableName(ProtobufUtil.toProtoTableName(tableName));
    }
    if (family != null) {
      permissionBuilder.setFamily(UnsafeByteOperations.unsafeWrap(family));
    }
    if (qualifier != null) {
      permissionBuilder.setQualifier(UnsafeByteOperations.unsafeWrap(qualifier));
    }
    ret.setType(AccessControlProtos.Permission.Type.Table).setTablePermission(permissionBuilder);
    return AccessControlProtos.RevokeRequest.newBuilder()
      .setUserPermission(AccessControlProtos.UserPermission.newBuilder()
        .setUser(ByteString.copyFromUtf8(username)).setPermission(ret))
      .build();
  }
Create a request to revoke user table permissions.
@param username  the short user name whose permissions to be revoked
@param tableName optional table name the permissions apply
@param family    optional column family
@param qualifier optional qualifier
@param actions   the permissions to be revoked
@return A {@link AccessControlProtos} RevokeRequest
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlUtil.java