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

Mark Payne commented on NIFI-2001:
----------------------------------

[~aperepel] - In the nifi.properties file, there is a property named 
"nifi.flowcontroller.autoResumeState" that does just that. By default, it is 
true, which means "resume the state that the flow was in when NiFi was 
shutdown." If that is changed to false, it will startup without any of the 
processors or anything running. If running in a cluster, the NCM's value for 
this property is propagated to the nodes in the 0.x baseline. In 1.0.0, there 
is no NCM, so each node will honor its own local property.

I do like the idea of passing a flag to the start script, so that it will take 
affect only on this particular run of the application, rather than having to 
update the properties file for the subsequent run of the application. Taking 
this one step further, rather than providing a "-safe" option, I've been 
thinking recently about allowing users to provide a 
-P<property_name>=<property_value> option to override the value in 
nifi.properties. If we did that, you could do `nifi.sh start 
-Pnifi.flowcontroller.autoResumeState=false`. Not as concise as a `-start` 
option but provides a lot of power and flexibility. Specifically, I like this 
option for running in a docker container, etc. so that a Docker File doesn't 
have to change the nifi.properties file but can instead just override specific 
values on the command-line.

Thoughts?


> Introduce a 'safe' startup mode
> -------------------------------
>
>                 Key: NIFI-2001
>                 URL: https://issues.apache.org/jira/browse/NIFI-2001
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 0.6.1
>            Reporter: Andrew Grande
>
> *Driver*: after NiFi crashes (e.g. with OOME), one needs to go in and 
> manually flush queues or partially enable/disable flows to let them run and 
> drain data. Also, if, for some reason, NiFi was sent into a CPU or I/O death 
> spiral by the flow (e.g. a design mistake, or an unexpected spike in the data 
> without backpressure controls configured).
> Today it's not possible without directly hacking the flow.xml.gz. This 
> becomes even more troublesome in a clustered environment. Another drastic 
> alternative is to wipe out all repos, but this means data loss.
> *Proposal*: add a 'safe' switch/mode to NiFi, which will let it start up with 
> full UI and infrastructure controls, but explicitly stopping all flows and CS.
> E.g. invoking *nifi.sh start -safe* on command line.
> Internally, the following should happen:
> * NiFi starts up as normal, with all libraries, plugins, etc.
> * However, *none* of the processorts, CS & groups are started/enabled



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to