public static SQLPrivTypeGrant getSQLPrivTypeGrant(String privTypeStr, boolean isGrant)
      throws HiveAuthzPluginException {
    SQLPrivilegeType ptype = SQLPrivilegeType.getRequirePrivilege(privTypeStr);
    return getSQLPrivTypeGrant(ptype, isGrant);
  }
Find matching enum

@param privTypeStr
         privilege type string
@param isGrant
@return
@throws HiveAuthzPluginException
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLPrivTypeGrant.java