mynameborat commented on a change in pull request #1448: URL: https://github.com/apache/samza/pull/1448#discussion_r533083809
########## File path: samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaYarnAppMasterLifecycle.scala ########## @@ -48,6 +52,19 @@ class SamzaYarnAppMasterLifecycle(containerMem: Int, containerCpu: Int, samzaApp val maxCapability = response.getMaximumResourceCapability val maxMem = maxCapability.getMemory val maxCpu = maxCapability.getVirtualCores + if (isApplicationMasterHighAvailabilityEnabled) { + val yarnIdToprocIdMap = new HashMap[String, String]() + samzaAppState.processorToExecutionId.asScala foreach { entry => yarnIdToprocIdMap.put(entry._2, entry._1) } + response.getContainersFromPreviousAttempts.asScala foreach { (ctr: Container) => + val samzaProcId = yarnIdToprocIdMap.get(ctr.getId.toString) + if (samzaProcId != null) { + info("Received container from previous attempt with samza processor id %s and yarn container id %s" format(samzaProcId, ctr.getId.toString)) + samzaAppState.runningProcessors.put(samzaProcId, + new SamzaResource(ctr.getResource.getVirtualCores, ctr.getResource.getMemory, ctr.getNodeId.getHost, ctr.getId.toString)) + state.runningProcessors.put(samzaProcId, new YarnContainer(ctr)) Review comment: `YarnAppState` running processors has a map from `YarnContainerId` -> `YarnContainer`. This should be `ctr.getId.toString()` instead of `samzaProcId`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org