Hi all, in Flink's recoverable <writer>, it mentio...
# random
v
Hi all, in Flink's recoverable writer, it mentions the example of
Copy code
// --------- initial run --------
 RecoverableWriter writer = fileSystem.createRecoverableWriter();
 RecoverableFsDataOutputStream out = writer.open(path);
 out.write(...);

 // persist intermediate state
 ResumeRecoverable intermediateState = out.persist();
 storeInCheckpoint(intermediateState);

 // --------- recovery --------
 ResumeRecoverable lastCheckpointState = ...; // get state from checkpoint
 RecoverableWriter writer = fileSystem.createRecoverableWriter();
 RecoverableFsDataOutputStream out = writer.recover(lastCheckpointState);


 out.write(...); // append more data

 out.closeForCommit().commit(); // close stream and publish all the data
I was wondering in which scenario
storeInCheckpoint
method is called ? If it needs to take a checkpoint, why wouldn't it call commit() directly on the output stream ?