gaoyunhaii commented on a change in pull request #17:
URL: https://github.com/apache/flink-ml/pull/17#discussion_r741845839



##########
File path: 
flink-ml-iteration/src/main/java/org/apache/flink/iteration/operator/coordinator/SharedProgressAligner.java
##########
@@ -93,27 +98,28 @@ private SharedProgressAligner(
         this.executor = Objects.requireNonNull(executor);
 
         this.statusByEpoch = new HashMap<>();
-        this.alignedConsumers = new HashMap<>();
+        this.listeners = new HashMap<>();
+        this.checkpointStatuses = new HashMap<>();
     }
 
     public void registerAlignedConsumer(
-            OperatorID operatorID, Consumer<GloballyAlignedEvent> 
alignedConsumer) {
+            OperatorID operatorID, SharedProgressAlignerListener 
alignedConsumer) {
         runInEventLoop(
-                () -> this.alignedConsumers.put(operatorID, alignedConsumer),
-                "Register consumer %s",
+                () -> this.listeners.put(operatorID, alignedConsumer),
+                "Register listeners %s",
                 operatorID.toHexString());
     }
 
     public void unregisterConsumer(OperatorID operatorID) {
         synchronized (this) {

Review comment:
       The synchronized should not required in both places since now we put all 
the operations into the same thread. I'll remove the synchronized here.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to