private static void grant(Connection connection, final TableName tableName, final String userName,
    final byte[] family, final byte[] qual, boolean mergeExistingPermissions,
    final Permission.Action... actions) throws Throwable {
    connection.getAdmin().grant(new UserPermission(userName, Permission.newBuilder(tableName)
      .withFamily(family).withQualifier(qual).withActions(actions).build()),
      mergeExistingPermissions);
  }
Grants permission on the specified table for the specified user
@param connection               The Connection instance to use
@param tableName                the table name
@param userName                 the user name
@param family                   the column family
@param qual                     the column qualifier
@param mergeExistingPermissions If set to false, later granted permissions will override
                                previous granted permissions. otherwise, it'll merge with
                                previous granted permissions.
@param actions                  the actions
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlClient.java