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

Rakesh Kumar Singh reassigned NIFI-15971:
-----------------------------------------

    Assignee: Rakesh Kumar Singh

> 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
>            Assignee: Rakesh Kumar Singh
>            Priority: Major
>
> 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