The YarnResourceManager does not request new containers if TaskManagers are killed rapidly in succession. After 5 minutes the job is restarted due to NoResourceAvailableException, and the job runs normally afterwards. I suspect that TaskManager failures are not registered if the failure occurs before the TaskManager registers with the master. Logs are attached; I added additional log statements to YarnResourceManager.onContainersCompleted and YarnResourceManager.onContainersAllocated.
The YarnResourceManager should recognize that the container is completed and keep requesting new containers. The job should run as soon as resources are available.