public void addPrivilege(String priv, boolean withGrant) throws HiveAuthzPluginException {
    SQLPrivTypeGrant privType = SQLPrivTypeGrant.getSQLPrivTypeGrant(priv, withGrant);
    addPrivilege(privType);
    privilegeGrantSet.add(privType);
    if(withGrant){
      //as with grant also implies without grant privilege, add without privilege as well
      addPrivilege(priv, false);
    }
  }
Captures privilege sets, and can be used to compare required and available privileges
to find missing privileges (if any).
ADMIN_PRIV is considered a special privilege, if the user has that, then no privilege is
missing.
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/RequiredPrivileges.java