You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by jtstorck <gi...@git.apache.org> on 2018/08/01 17:28:45 UTC

[GitHub] nifi pull request #2930: NIFI-4434 Fixed recursive listing with a custom reg...

GitHub user jtstorck opened a pull request:

    https://github.com/apache/nifi/pull/2930

    NIFI-4434 Fixed recursive listing with a custom regex filter.

    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:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] 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.
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### 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.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jtstorck/nifi NIFI-4434

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2930.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2930
    
----
commit 26957eba6701d7d96e0a891031ddb05c4ff7598c
Author: Jeff Storck <jt...@...>
Date:   2018-08-01T17:13:40Z

    NIFI-4434 Fixed recursive listing with a custom regex filter.

----


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    Yeah, that sounds good, then have a PathFilter implementation for each


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by bbende <gi...@git.apache.org>.
Github user bbende commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    I think the primary concern is ensuring that existing flows behave the same as they currently do, which means the default behavior needs to apply the file filter to files and directories, and then give a choice to apply it differently. Besides that, I am fine with having three options.


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by bbende <gi...@git.apache.org>.
Github user bbende commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    Will review...


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    Why not have a new Property ( defaulting to the status quo anti ) for the search strategy, and have the recursive strategy use full paths and make it opt in?


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    I don't know if ListHDFS has additional documentation, but you may want to think about adding an explanation and when you would want to use which, the problems etc



---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    Accidently deleted my remote branch while updating this PR.  It doesn't look like I can reopen this PR.  I'll create another PR with the updated code.


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    I'll update the PR so that the three modes are available, and make sure the default mode keeps the current behavior.  I'll add tests for the two new modes.  Thanks for the input, @bbende and @ottobackwards!


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    @ottobackwards That's a good combination of solutions!  We need to decide if we want to put the full weight of complex regex on the user, or if it's more simple all-around by toggling between file-only or file-and-directory mode.  I could see that some power-users may want the filter to be applied to the full path to be able to match only certain subdirectory trees.
    
    No reason we can't offer three modes:
    - filename only
    - filename and directory name
    - full path


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    We would have to make sure that prior tests and maybe new tests prove that out @bbende as part of acceptance.


---

[GitHub] nifi issue #2930: NIFI-4434 Fixed recursive listing with a custom regex filt...

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck commented on the issue:

    https://github.com/apache/nifi/pull/2930
  
    @bbende @joewitt 
    This PR changes the default behavior of how the filter is applied during a listing, which might require manual migration efforts for some users.  
    
    We could add a property to be able to toggle the application of the filter to directory and file names or filenames only, with the default being directory and file names.  This solution would preserve the current behavior, and allow users to "opt-in" to having recursive listings retrieve all files regardless of directory names.  There would not be an issue with migration for current users that depend on the current behavior.
    
    We could also go down the route of allowing the filter to be applied to the entire path.  That gives the user maximum flexibility on how the filter would work, but requires more regex knowledge and is potentially harder for users to write the filter they want.  This would also require manual migration, but it might be the best long-term solution.  The tooltip on the filter property could be updated to have an example regex that would provide the default functionality that users could use as a starting point for custom filters.
    
    Any thoughts on either of these solutions?


---

[GitHub] nifi pull request #2930: NIFI-4434 Fixed recursive listing with a custom reg...

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck closed the pull request at:

    https://github.com/apache/nifi/pull/2930


---