lakshmi-manasa-g commented on a change in pull request #1259: SAMZA-2444: 
JobModel save in CoordinatorStreamStore resulting flush for each message
URL: https://github.com/apache/samza/pull/1259#discussion_r371396437
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/container/grouper/task/TaskAssignmentManager.java
 ##########
 @@ -103,21 +106,53 @@ public TaskAssignmentManager(MetadataStore 
taskContainerMappingMetadataStore, Me
    * @param taskMode the mode of the task
    */
   public void writeTaskContainerMapping(String taskName, String containerId, 
TaskMode taskMode) {
-    String existingContainerId = taskNameToContainerId.get(taskName);
-    if (existingContainerId != null && 
!existingContainerId.equals(containerId)) {
-      LOG.info("Task \"{}\" in mode {} moved from container {} to container 
{}", new Object[]{taskName, taskMode, existingContainerId, containerId});
-    } else {
-      LOG.debug("Task \"{}\" in mode {} assigned to container {}", taskName, 
taskMode, containerId);
-    }
+    writeTaskContainerMappings(ImmutableMap.of(containerId, 
ImmutableMap.of(taskName, taskMode)));
 
 Review comment:
   would it be good to replace `wirteTaskContainerMapping` with the new 
`wirteTaskContainerMappings` altogether?
   there seems to be only one usage of this method and that has been replaced 
to use the new one in JobModelManager. 
   is there a reason to keep this old method?

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