[ 
https://issues.apache.org/jira/browse/NIFI-15971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann resolved NIFI-15971.
-------------------------------------
      Assignee:     (was: Rakesh Kumar Singh)
    Resolution: Won't Fix

Thanks for raising this question [~darkwap].

Adding configuration properties to bypass validation in this type of situation 
does not seem like a good strategy, as it is contrary to general configuration 
practices.

It sounds like taking a wider look at the infrastructure around the environment 
setup is needed, rather than introducing this type of configuration property.

> Optional Flow Validation Bypass for Missing Directories in Apache MiNiFi
> ------------------------------------------------------------------------
>
>                 Key: NIFI-15971
>                 URL: https://issues.apache.org/jira/browse/NIFI-15971
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: MiNiFi
>    Affects Versions: 2.9.0
>         Environment: minifi on rhel
>            Reporter: dariusz wapinski
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Hello,
>  
> I would like to ask whether it would be possible to add a configuration flag 
> in Apache MiNiFi that disables flow validation related to missing directories 
> during agent startup.
>  
> For example, when a flow uses the ListFile processor and the source directory 
> does not exist yet, the MiNiFi agent fails to start because the flow is 
> considered invalid.
>  
> In some environments, directories are created dynamically after the agent has 
> already started. In such cases, it would be very useful to have an option to 
> bypass this validation. Instead of preventing startup, the agent could simply 
> log a warning or error message indicating that the directory does not 
> currently exist.
>  
> This feature would improve support for dynamic and containerized environments 
> where resources may appear after startup.
>  
> Thank you for considering this request.
>  
>  
> temporary workaround is in ListFile and GetFile replace validators
>  
> .addValidator(StandardValidators.createDirectoryExistsValidator(true, false))
>  
> to .addValidator(StandardValidators.NON_BLANK_VALIDATOR)
> ListFIle.java line 143:
> in public static final PropertyDescriptor DIRECTORY = new Builder()
>             .name("Input Directory")
>             .description("The input directory from which files to pull files")
>             .required(true)
>             .addValidator(StandardValidators.NON_BLANK_VALIDATOR)
>             .expressionLanguageSupported(ENVIRONMENT)
>             .build();



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to