private static RequiredPrivileges getGrantRequiredPrivileges(List<HivePrivilege> hivePrivileges)
      throws HiveAuthzPluginException {
    RequiredPrivileges reqPrivs = new RequiredPrivileges();
    for (HivePrivilege hivePriv : hivePrivileges) {
      reqPrivs.addPrivilege(hivePriv.getName(), true /* grant priv required */);
    }
    return reqPrivs;
  }
Utility class to authorize grant/revoke privileges
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/GrantPrivAuthUtils.java