[
https://issues.apache.org/jira/browse/FLINK-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307506#comment-15307506
]
ASF GitHub Bot commented on FLINK-3405:
---------------------------------------
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/2047#issuecomment-222640704
I would do one change here: Make the `isRunning` flag non transient, and
set it to true initially, rather than in open.
That can act as a safeguard against very early stopping (before open is
even completed), were stop would set the flag to false, and open would set it
back to true.
I think the runtime does prevent open to happen after stop, but cannot hurt
to guard this in the source as well.
> Extend NiFiSource with interface StoppableFunction
> --------------------------------------------------
>
> Key: FLINK-3405
> URL: https://issues.apache.org/jira/browse/FLINK-3405
> Project: Flink
> Issue Type: Improvement
> Components: Streaming Connectors
> Reporter: Matthias J. Sax
> Assignee: Suneel Marthi
> Fix For: 1.1.0, 1.0.4
>
>
> Nifi source is not stoppable right now. To make it stoppable, is must
> implement {{StoppableFunction}}. Implementing method {{stop()}} must ensure,
> that the source stops receiving new messages from Nifi and issues a final
> checkpoint. Afterwards, {{run()}} must return.
> When implementing this, keep in mind, that the gathered checkpoint might
> later be used as a savepoint.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)