protected Comparator<Resource> getComparator() {
    return comparator;
  }
Get the associated resource comparator.

@return the resource comparator
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java