1996fanrui commented on code in PR #20151:
URL: https://github.com/apache/flink/pull/20151#discussion_r1049675221


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateCheckpointWriter.java:
##########
@@ -315,18 +325,73 @@ public void fail(Throwable e) {
         }
     }
 
-    private interface HandleFactory<I, H extends 
AbstractChannelStateHandle<I>> {
-        H create(
-                int subtaskIndex,
-                I info,
-                StreamStateHandle underlying,
-                List<Long> offsets,
-                long size);
+    @Nonnull
+    private ChannelStatePendingResult getChannelStatePendingResult(
+            JobID jobID, JobVertexID jobVertexID, int subtaskIndex) {
+        SubtaskID subtaskID = SubtaskID.of(jobID, jobVertexID, subtaskIndex);
+        ChannelStatePendingResult pendingResult = 
pendingResults.get(subtaskID);
+        checkNotNull(pendingResult, "The subtask[%s] is not registered yet", 
subtaskID);
+        return pendingResult;
+    }
+}
+
+/** A identification for subtask. */
+class SubtaskID {
+
+    private final JobID jobID;

Review Comment:
   > All of the write requests should be coming from the same job.
   
   Yes, you're right. I think it's not necessary. I will remove 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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to