NIFI-4434 Fixed recursive listing with a custom regex filter.#2937
NIFI-4434 Fixed recursive listing with a custom regex filter.#2937jtstorck wants to merge 2 commits intoapache:masterfrom
Conversation
Filter modes are now supported to perform listings based on directory and file names, file-names only, and full path.
|
PR 2930 was closed due to the branch in my fork being removed before adding the new filter-mode-based changes. @bbende @ottobackwards, this PR implements the use cases discussed in the previous PR:
|
|
@jtstorck will review. |
ottobackwards
left a comment
There was a problem hiding this comment.
This looks good to me, I have a question though
| @@ -462,11 +523,15 @@ private String getPerms(final FsAction action) { | |||
|
|
|||
| private PathFilter createPathFilter(final ProcessContext context) { | |||
| final Pattern filePattern = Pattern.compile(context.getProperty(FILE_FILTER).getValue()); | |||
There was a problem hiding this comment.
Does this need to support expression language?
There was a problem hiding this comment.
@ottobackwards The FILE_FILTER property does not currently support expression language. The processor could be updated to enable EL for the property, but that is outside the scope of this PR.
|
@ottobackwards Regarding documentation for the filter modes, descriptions have been created for the allowable values. Do these descriptions not seem adequate for the functionality of each mode? |
|
@jtstorck I think that examples would help the user get the right one the first time. Not a deal breaker though. |
zenfenan
left a comment
There was a problem hiding this comment.
+1 LGTM. I think examples for the File Filter Mode can be useful though. If you don't want to cover this now, I would be happy to merge it.
|
@ottobackwards @zenfenan I'll break out my rusty HTML skills and try to write up some extra documentation with examples/usecases. Hopefully in an hour or two I'll have an update for the PR. Thanks for the reviews! |
|
@ottobackwards @zenfenan I added additional details to give some examples on how to use the filters. Please let me know if you think more detail is needed. I appreciate the review! |
…ble filter modes.
|
Built with -Pcontrib-check, verified the documentation, +1 from me, nice work |
zenfenan
left a comment
There was a problem hiding this comment.
@jtstorck The additional details cover pretty much what I expected. +1 Thanks for being quick.
@ottobackwards If you don't have any concerns with the new changes, I'll go ahead merge it.
|
+1 Thanks @jtstorck. Merged to the master. Thanks @ottobackwards for reviewing. |
Filter modes are now supported to perform listings based on directory and file names, file-names only, and full path.
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically master)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.