public static void addMissingPrivMsg(Collection<SQLPrivTypeGrant> missingPrivs,
      HivePrivilegeObject hivePrivObject, List<String> deniedMessages) {
    if (missingPrivs.size() != 0) {
      // there are some required privileges missing, create error message
      // sort the privileges so that error message is deterministic (for tests)
      List<SQLPrivTypeGrant> sortedmissingPrivs = new ArrayList<SQLPrivTypeGrant>(missingPrivs);
      Collections.sort(sortedmissingPrivs);
      String errMsg = sortedmissingPrivs + " on " + hivePrivObject;
      deniedMessages.add(errMsg);
    }
  }
Add privileges to RequiredPrivileges object reqPrivs from thrift availPrivs
object
@param reqPrivs
@param availPrivs
@throws HiveAuthzPluginException
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLAuthorizationUtils.java