dxichen 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_r258675192
##########
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:
good catch, there is already logic in ContainerProcessManager to
differentiate between host-aware/ host unaware container allocators, I will
leverage that check to these 2 requestResources methods. (ie have specific
implementations in ContainerAllocator and HostAwareContainerAllocator for
requestResources)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services