You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2020/08/21 23:46:35 UTC

[GitHub] [samza] mynameborat commented on a change in pull request #1421: SAMZA-2439: Remove LocalityManager and container location information from JobModel

mynameborat commented on a change in pull request #1421:
URL: https://github.com/apache/samza/pull/1421#discussion_r475013098



##########
File path: samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
##########
@@ -494,7 +498,9 @@ private String getSourceHostForContainer(ContainerPlacementRequestMessage reques
           processorId, currentResource.getContainerId(), currentResource.getHost(), requestMessage);
       sourceHost = currentResource.getHost();
     } else {
-      sourceHost = samzaApplicationState.jobModelManager.jobModel().getContainerToHostValue(processorId, SetContainerHostMapping.HOST_KEY);
+      sourceHost = Optional.ofNullable(localityManager.readLocality().getHostLocality(processorId))

Review comment:
       No. `readLocality` will always return an empty `LocalityModel`. As far as `localityManager`, we always inject one. I still added precondition check in CPM & CM.




----------------------------------------------------------------
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:
users@infra.apache.org