code: @Override
    public void onContainersAllocated(final List<Container> allocatedContainers) {
  
      String id = null; // ID is used for logging only
  
      if (LOG.isLoggable(Level.FINE)) {
  
        id = String.format("%s:%d", Thread.currentThread().getName().replace(' ', '_'), System.currentTimeMillis());
  
        LOG.log(Level.FINE, "TIME: Allocated Containers {0} {1} of {2}",
            new Object[] {id, allocatedContainers.size(), this.containerRequestCounter.get()});
      }
  
      for (final Container container : allocatedContainers) {
        this.handleNewContainer(container);
      }
  
      LOG.log(Level.FINE, "TIME: Processed Containers {0}", id);
    }
docs: RM Callback: RM reports that some containers have been allocated.
  @param allocatedContainers list of containers newly allocated by RM.