private boolean checkIfActiveOrStandbyContainerHasActivePlacementAction(ContainerPlacementRequestMessage request) {
    String processorId = request.getProcessorId();
    // Container itself has active container placement actions
    if (hasActiveContainerPlacementAction(processorId)) {
      LOG.info("ContainerPlacement request: {} is en-queued because container has an in-progress placement action", request);
      return true;
    }

    if (standbyContainerManager.isPresent()) {
      // If requested placement action is on a standby container and its active container has a placement request,
      // this request shall not be de-queued until in-flight action on active container is complete
      if (StandbyTaskUtil.isStandbyContainer(processorId) && hasActiveContainerPlacementAction(
          StandbyTaskUtil.getActiveContainerId(processorId))) {
        LOG.info("ContainerPlacement request: {} is en-queued because its active container has an in-progress placement action", request);
        return true;
      }
      // If requested placement action is on a standby container and its active container has a placement request,
      // this request shall not be de-queued until in-flight action on active container is complete
      if (!StandbyTaskUtil.isStandbyContainer(processorId)) {
        for (String standby : standbyContainerManager.get().getStandbyList(processorId)) {
          if (hasActiveContainerPlacementAction(standby)) {
            LOG.info("ContainerPlacement request: {} is en-queued because one of its standby replica has an in-progress placement action", request);
            return true;
          }
        }
      }
    }
    return false;
  }
Checks if there are any active container placement action on container itself or on any of its standby containers
(if enabled)
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java