public static List<HivePrincipal> getHivePrincipals(List<PrincipalDesc> principals,
      HiveAuthorizationTranslator trans)
      throws HiveException {
  ArrayList<HivePrincipal> hivePrincipals = new ArrayList<HivePrincipal>();
    for(PrincipalDesc principal : principals){
      hivePrincipals.add(trans.getHivePrincipal(principal));
    }
    return hivePrincipals;
  }
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