Sanil15 commented on a change in pull request #1281: SAMZA-2378: Container
Placements support for Standby containers enabled jobs
URL: https://github.com/apache/samza/pull/1281#discussion_r383434001
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
##########
@@ -412,16 +429,23 @@ private void
writeContainerPlacementResponseMessage(ContainerPlacementRequestMes
}
/**
- * If there is an existing inflight request or container is pending a start,
the container placement action shall wait
- * until this in-flight action is complete
+ * These are specific scenarios in which a placement action should wait for
existing action to complete before it is executed
+ * 1. If there is an placement request in progress on active container
+ * 2. If there is an placement request is progress on any of its standby
container
+ * 3. If the container itself is pending a start
*
* @param requestMessage container placement request message
* @return true if action should be taken right now, false if it needs to
wait to be taken in future
*/
private boolean deQueueAction(ContainerPlacementRequestMessage
requestMessage) {
// Do not dequeue action wait for the in-flight action to complete
- if (hasActiveContainerPlacementAction(requestMessage.getProcessorId())) {
- LOG.info("ContainerPlacement request: {} is en-queued because container
has an in-progress placement action", requestMessage);
+ if (hasActiveContainerPlacementAction(requestMessage.getProcessorId())
+ ||
checkStandbyOrActiveContainerHasActivePlacementAction(requestMessage.getProcessorId()))
{
+ if (standbyContainerManager.isPresent()) {
Review comment:
I see your point, let me refactor it
----------------------------------------------------------------
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