Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/3812#discussion_r114497922
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java
---
@@ -88,15 +93,23 @@ public void initializeState(StateInitializationContext
context) throws Exception
Preconditions.checkState(this.checkpointedState == null,
"The reader state has already been initialized.");
- checkpointedState = context.getOperatorStateStore()
- .getSerializableListState("pending-checkpoints");
+ javaCheckpointedState =
context.getOperatorStateStore().getSerializableListState(checkpointedStateDescriptor.getName());
+ checkpointedState =
context.getOperatorStateStore().getListState(checkpointedStateDescriptor);
int subtaskIdx = getRuntimeContext().getIndexOfThisSubtask();
if (context.isRestored()) {
LOG.info("Restoring state for the GenericWriteAheadSink
(taskIdx={}).", subtaskIdx);
- for (PendingCheckpoint pendingCheckpoint :
checkpointedState.get()) {
- this.pendingCheckpoints.add(pendingCheckpoint);
+ try {
+ for (PendingCheckpoint pendingCheckpoint :
javaCheckpointedState.get()) {
+
this.pendingCheckpoints.add(pendingCheckpoint);
+ }
+ } catch (Exception e) {
--- End diff --
What exceptions are we expecting here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---