if we are going to make a local for this might as well move it up 6 lines since we are also getting i in the         
 if (yarnAllocator.getNumExecutorsFailed >= maxNumExecutorFailures) {
check. Otherwise I would remove the local variable.