S3 offers persistence only when uploads are complete. That means at the end of simple uploads and uploads of parts of a MultiPartUpload.
We should implement a RecoverableWriter for S3 that does a MultiPartUpload with a Part per checkpoint.
Recovering the reader needs the MultiPartUploadID and the list of ETags of previous parts.
We need additional staging of data in Flink state to work around the fact that
- Parts in a MultiPartUpload must be at least 5MB
- Part sizes must be known up front. (Note that data can still be streamed in the upload)