You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Stefan Richter (JIRA)" <ji...@apache.org> on 2017/05/08 07:43:04 UTC

[jira] [Created] (FLINK-6480) Add executor service parameter Snapshotable::snapshot(...)

Stefan Richter created FLINK-6480:
-------------------------------------

             Summary: Add executor service parameter Snapshotable::snapshot(...)
                 Key: FLINK-6480
                 URL: https://issues.apache.org/jira/browse/FLINK-6480
             Project: Flink
          Issue Type: Improvement
          Components: State Backends, Checkpointing
            Reporter: Stefan Richter


We could change the way how async snapshots are executed. Currently, the snapshot method looks like:

{code:java}
RunnableFuture<S> snapshot(
		long checkpointId,
		long timestamp,
		CheckpointStreamFactory streamFactory,
		CheckpointOptions checkpointOptions) throws Exception;
{code}

and I would suggest to change this to:

{code:java}
Future<S> snapshot(
		long checkpointId,
		long timestamp,
		CheckpointStreamFactory streamFactory,
		CheckpointOptions checkpointOptions,
		ExecutorService executor) throws Exception;
{code}

The implication of this change is, that the FutureRunnable can immediately be scheduled to the provided executor service. This makes it easier to reason about the Future's lifecycle and to parallelize multiple snapshot tasks in an operator instance's checkpointing.

The Future's ownership is only transferred once, from the backend to the executor service, so cancelation on shutdown only either happens already in the backend or when the executor service is shut down.





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)