PawasChhokra commented on a change in pull request #1446:
URL: https://github.com/apache/samza/pull/1446#discussion_r539948685
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/StandbyContainerManager.java
##########
@@ -375,18 +403,32 @@ boolean checkStandbyConstraints(String
containerIdToStart, String host) {
SamzaResource resource =
samzaApplicationState.pendingProcessors.get(containerID);
// return false if a conflicting container is pending for launch on the
host
- if (resource != null && resource.getHost().equals(host)) {
- log.info("Container {} cannot be started on host {} because container
{} is already scheduled on this host",
- containerIdToStart, host, containerID);
- return false;
+ if (resource != null) {
+ if (!resource.getHost().equals(ResourceRequestState.ANY_HOST) &&
!host.equals(ResourceRequestState.ANY_HOST)
Review comment:
1. Sorry for this confusion, but the hosts passed here will never be
ANY_HOST and will have a hostname. Hence, I have removed the existing checks
that I had for ANY_HOST.
2. The pending processor list will have the actual hostname instead of
ANY_HOST. Hence, the check will always suffice so as to not bring up a standby
on the same fault domain as the actives are spun up first. This check is to
ensure that a standby container should not come up on the same host or rack as
an active container whose launch is pending.
----------------------------------------------------------------
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:
[email protected]