private List<String> getAllocatedHosts() {
    List<String> hostKeys = new ArrayList<>();
    for (Map.Entry<String, List<SamzaResource>> entry: allocatedResources.entrySet()) {
      if (entry.getValue().size() > 0) {
        hostKeys.add(entry.getKey());
      }
    }
    return hostKeys;
  }
Returns the list of hosts which has at least 1 allocated Resource in the buffer
@return list of host names
samza-core/src/main/java/org/apache/samza/clustermanager/ResourceRequestState.java