Mark Payne created NIFI-4176:
--------------------------------

             Summary: IPLookupService should avoid using FILE_EXISTS_VALIDATOR
                 Key: NIFI-4176
                 URL: https://issues.apache.org/jira/browse/NIFI-4176
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
            Reporter: Mark Payne


Currently, the IPLookupService uses a FILE_EXISTS_VALIDATOR in order to ensure 
that the given database file exists. Quite often, though, a flow is developed 
in such a way that the file is dynamically fetched via GetHTTP, InvokeHTTP, 
etc. and then written out so that IPLookupService is able to automatically 
reload the data.

If a new flow is imported via template, for example, or copied from another 
NiFi instance, the file may not yet exist. As a result, the Controller Service 
is invalid and upon startup the service is not enabled. This then causes 
referencing processors not to start. This can be particularly problematic if 
running in a cluster where some nodes have the file and start the processor 
while other nodes do not.

To avoid this, the IPLookupService (and Controller Services, in general) should 
not use the FILE_EXISTS_VALIDATOR but instead just fail in the @OnScheduled 
method. This way, the service will continually attempt to start and once the 
file does exist, everything will begin flowing as expected.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to