Sanil15 commented on a change in pull request #1219: SAMZA-2373: Container
Placement Service (core functionality) for container move and restart
URL: https://github.com/apache/samza/pull/1219#discussion_r365465181
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerAllocator.java
##########
@@ -203,23 +213,31 @@ void assignResourceRequests() {
state.matchedResourceRequests.incrementAndGet();
}
- containerManager.handleContainerLaunch(request, preferredHost,
peekAllocatedResource(preferredHost), resourceRequestState, this);
+ boolean containerLaunchComplete =
+ containerManager.handleContainerLaunch(request, preferredHost,
peekAllocatedResource(preferredHost),
+ resourceRequestState, this);
+
+ /**
+ * Some Container launch requests are due to Container Placement
actions like move, restarts. Under those
+ * circumstances a container launch needs to wait for the previous
container incarnation to stop. In this scenario
+ * the allocator thread needs to sleep and recheck the stop again
+ */
+ if (!containerLaunchComplete) {
+ break;
Review comment:
This will cause log spam when allocator thread wakes up to check if the
active container has stopped.
----------------------------------------------------------------
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]
With regards,
Apache Git Services