public static void revokeFromTable(final HBaseTestingUtil util, final String user,
    final TableName table, final byte[] family, final byte[] qualifier,
    final Permission.Action... actions) throws Exception {
    SecureTestUtil.updateACLs(util, new Callable<Void>() {
      @Override
      public Void call() throws Exception {
        try (Connection connection = ConnectionFactory.createConnection(util.getConfiguration())) {
          connection.getAdmin().revoke(new UserPermission(user, Permission.newBuilder(table)
            .withFamily(family).withQualifier(qualifier).withActions(actions).build()));
        }
        return null;
      }
    });
  }
Revoke permissions on a table from the given user. Will wait until all active AccessController
instances have updated their permissions caches or will throw an exception upon timeout (10
seconds).
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/SecureTestUtil.java