in flink-taxi-stream-processor/src/main/java/com/amazonaws/flink/refarch/utils/ElasticsearchJestSink.java [140:148]
public void snapshotState(FunctionSnapshotContext functionSnapshotContext) throws Exception {
do {
try {
flushDocumentBuffer();
} catch (IOException e) {
//if the request fails, that's fine, just retry on the next iteration
}
} while (! documentBuffer.isEmpty());
}