zhijiangW commented on a change in pull request #12332:
URL: https://github.com/apache/flink/pull/12332#discussion_r430517711
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStreamFactory.java
##########
@@ -266,6 +264,16 @@ public void flush() throws IOException {
}
}
+ /**
+ * Flush buffers to file if their size is above {@link
#localStateThreshold}.
+ */
+ @Override
+ public void flush() throws IOException {
+ if (pos > localStateThreshold) {
Review comment:
I guess the added condition of `stream != null` is not addressed yet?
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateCheckpointWriterTest.java
##########
@@ -95,12 +118,12 @@ public void flush() throws IOException {
FlushRecorder dataStream = new FlushRecorder();
final ChannelStateCheckpointWriter writer = new
ChannelStateCheckpointWriter(
- 1L,
- new ChannelStateWriteResult(),
- new ChannelStateSerializerImpl(),
- NO_OP_RUNNABLE,
- new MemoryCheckpointOutputStream(42),
- dataStream
+ 1L,
Review comment:
nit: unnecessary formatting changes, I guess it was done automatically
by IDE.
----------------------------------------------------------------
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]