You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/03/30 20:50:12 UTC
[GitHub] [flink] rkhachatryan commented on a change in pull request #11534:
[FLINK-16537][network] Implement ResultPartition state recovery for
unaligned checkpoint
rkhachatryan commented on a change in pull request #11534: [FLINK-16537][network] Implement ResultPartition state recovery for unaligned checkpoint
URL: https://github.com/apache/flink/pull/11534#discussion_r400455864
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/PipelinedSubpartition.java
##########
@@ -89,6 +91,25 @@
super(index, parent);
}
+ @Override
+ public void initializeState() throws IOException, InterruptedException {
+ ReadResult readResult = ReadResult.HAS_MORE_DATA;
+ while (readResult == ReadResult.HAS_MORE_DATA) {
+ BufferBuilder bufferBuilder = parent.getBufferPool().requestBufferBuilderBlocking();
+ BufferConsumer bufferConsumer = bufferBuilder.createBufferConsumer();
+ readResult = parent.getChannelStateReader().readOutputData(subpartitionInfo, bufferBuilder);
Review comment:
I see `initializeState` is called by `parent`.
Why not to pass `ChannelStateReader` as a parameter to `initializeState` then?
(this would decrease coupling and increase testability)
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services