public static List<HivePrivilege> getHivePrivileges(List<PrivilegeDesc> privileges,
      HiveAuthorizationTranslator trans) {
  List<HivePrivilege> hivePrivileges = new ArrayList<HivePrivilege>();
    for(PrivilegeDesc privilege : privileges){
      hivePrivileges.add(trans.getHivePrivilege(privilege));
    }
    return hivePrivileges;
  }
Convert thrift object type to hive authorization plugin object type
@param type - thrift object type
@return
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java