        int allocatedContainers = 0;
         while(allocatedContainers < numberOfContainers){
 
             AllocateResponse allocateResponse = resourceManagerClient.allocate(0);
 
             for(Container container : allocateResponse.getAllocatedContainers()){
                 allocatedContainers++;
 
                 ContainerLaunchContext shellContainerContext = Records.newRecord(ContainerLaunchContext.class);
                 shellContainerContext.setCommands(
                         Collections.singletonList(command +
                                  " 1>"  +
                                   ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout "  +
                                  " 2>"  +
                                   ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr")
                 );
 
                 nodeManagerClient.startContainer(container, shellContainerContext);
 
             }
 
             Thread.sleep(1000);
         }
 
 
