flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aljoscha Krettek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-12142) Add beforeSnapshot method to StreamOperator interface
Date Tue, 09 Apr 2019 09:39:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-12142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16813179#comment-16813179
] 

Aljoscha Krettek commented on FLINK-12142:
------------------------------------------

Would this be what you're looking for? https://github.com/apache/flink/blob/e1d1234477c731fe3f398c7f3f12123f73764242/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamOperator.java#L114

> Add beforeSnapshot method to StreamOperator interface
> -----------------------------------------------------
>
>                 Key: FLINK-12142
>                 URL: https://issues.apache.org/jira/browse/FLINK-12142
>             Project: Flink
>          Issue Type: New Feature
>          Components: Runtime / Checkpointing
>            Reporter: Gyula Fora
>            Priority: Trivial
>
> Right now, when a stream task receives a triggerCheckpoint call, it immediately forwards
the checkpoint barrier and performs the checkpoint operation under the checkpoint lock.
> This mechanism doesn't allow the stream operations to implement any logic that should
be performed before the snapshot is triggered in order to ensure state consistency.
> Some examples would be:
>  * Flushing any state (or other kind of) cache that is implemented in the operator layer
>  * Wait for pending operations (maybe with a different async execution model)
> The method could for instance look simply like this in the StreamOperator interface:
>  {{default void beforeSnapshot(long checkpointId, long timestamp) throws Exception {};}} 
> This method should then be called before the barrier is sent downstream still outside
the checkpoint lock.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message