rmatharu commented on a change in pull request #924: SAMZA-2108: Check for host 
affinity config before resolving preferred host matching
URL: https://github.com/apache/samza/pull/924#discussion_r258203228
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/AbstractContainerAllocator.java
 ##########
 @@ -171,7 +174,7 @@ public void requestResources(Map<String, String> 
resourceToHostMappings) {
     for (Map.Entry<String, String> entry : resourceToHostMappings.entrySet()) {
       String containerId = entry.getKey();
       String preferredHost = entry.getValue();
-      if (preferredHost == null)
+      if (preferredHost == null || 
!clusterManagerConfig.getHostAffinityEnabled())
 
 Review comment:
   You can make AbstractContainerAllocator.java ignore all present 
resourceToHostMappings, since AbstractContainerAllocator is instantiated only 
in case host-affinity is disabled, otherwise we instantiate 
   HostAwareContainerAllocator.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Reply via email to