You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "jia-gao (via GitHub)" <gi...@apache.org> on 2023/07/18 17:57:04 UTC

[GitHub] [samza] jia-gao commented on a diff in pull request #1677: Add new SamzaApplicationMaster metric to track allocated containers buffered in AM

jia-gao commented on code in PR #1677:
URL: https://github.com/apache/samza/pull/1677#discussion_r1267127390


##########
samza-yarn/src/main/java/org/apache/samza/job/yarn/YarnClusterResourceManager.java:
##########
@@ -298,6 +298,7 @@ public void releaseResources(SamzaResource resource) {
       }
       amClient.releaseAssignedContainer(container.getId());
       allocatedResources.remove(resource);
+      metrics.decrementAllocatedContainersInBuffer();

Review Comment:
   I want this metric to always in sync with "allocatedResources" in this class.
   stopStreamProcessor doesn't remove container from allocatedResources.
   Actually, in stopStreamProcessor. it calls amClient.releaseAssignedContainer(yarnContainer.id()) only when allocatedResources.get(resource) == null which means the container was not in the "allocatedResources" Map already



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@samza.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org