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_r348780708
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
 ##########
 @@ -35,23 +37,43 @@
  *
  * Callbacks issued from  {@link ClusterResourceManager} aka {@link 
ContainerProcessManager} are intercepted
  * by ContainerManager to handle container failure and completions for both 
active and standby containers
+ *
+ * ContainerManager encapsulates logic and state related to container 
placement actions like move, restarts for active container
+ * if issued externally.
+ *
+ * TODO SAMZA-2378: Container Placements for Standby containers enabled jobs
+ *      SAMZA-2379: Container Placements for job running in degraded state
  */
 public class ContainerManager {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(ContainerManager.class);
+  private static final String ANY_HOST = ResourceRequestState.ANY_HOST;
 
+  /**
+   * Default timeout for request to the cluster manager for stopping an active 
container & checking expiry for
+   * requested resources
+   */
+  private static final Long DEFAULT_CONTROL_ACTION_EXPIRY = 
Duration.ofSeconds(10).toMillis();
   /**
    * Resource-manager, used to stop containers
    */
   private final ClusterResourceManager clusterResourceManager;
   private final SamzaApplicationState samzaApplicationState;
+  private final boolean hostAffinityEnabled;
+
+  /**
+   * Map maintaining active container placement action meta data indexed by 
containers processorId eg 0, 1, 2
+   */
+  private final ConcurrentHashMap<String, ContainerPlacementMetadata> actions;
 
 Review comment:
   Changed it to: 
   
   Map maintaining active container placement action meta data indexed by 
containers processorId eg 0, 1, 2. Key is chosen to be processorId since at a 
time only one placement action can be in progress on a container. Furthermore, 
at any time this map only contains metadata related to active actions, 
completed (failed or success) actions are removed from this map

----------------------------------------------------------------
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

Reply via email to