/**
   * Retrieves, but does not remove, the first allocated container on the specified host.
   *
   * @param host the host for which a container is needed.
   * @return the first {@link Container} allocated for the specified host or {@code null} if there
   *     isn't one.
   */
  protected Container peekAllocatedContainer(String host) {
    List<Container> allocatedContainers = containerRequestState.getContainersOnAHost(host);
    if (allocatedContainers == null || allocatedContainers.isEmpty()) {
      return null;
    }

    return allocatedContainers.get(0);
  }