You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by ymarzougui <gi...@git.apache.org> on 2017/01/11 00:51:09 UTC

[GitHub] flink pull request #3090: [FLINK-5432] fix nested files enumeration in Conti...

GitHub user ymarzougui opened a pull request:

    https://github.com/apache/flink/pull/3090

    [FLINK-5432] fix nested files enumeration in ContinuousFileMonitoringFunction

    This PR fixes reading nested files when the InputFormat has NestedFileEnumeration set to true. Nested files were not read because the code in listEligibleFiles did not recursively enumerate the input paths.

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

    $ git pull https://github.com/ymarzougui/flink FLINK-5432

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

    https://github.com/apache/flink/pull/3090.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 #3090
    
----
commit c74996b278187e348af7043ddc0aa9a500373502
Author: Yassine Marzougui <y....@mindlytix.com>
Date:   2017-01-11T00:43:19Z

    [FLINK-5432] recursively scan nested files in ContinuousFileMonitoringFunction

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3090: [FLINK-5432] Fix nested files enumeration in Conti...

Posted by ymarzougui <gi...@git.apache.org>.
Github user ymarzougui commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3090#discussion_r95976740
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileMonitoringFunction.java ---
    @@ -282,7 +282,7 @@ private void monitorDirAndForwardSplits(FileSystem fs,
     	 * Returns the paths of the files not yet processed.
     	 * @param fileSystem The filesystem where the monitored directory resides.
     	 */
    -	private Map<Path, FileStatus> listEligibleFiles(FileSystem fileSystem) throws IOException {
    +	private Map<Path, FileStatus> listEligibleFiles(FileSystem fileSystem, String path) throws IOException {
    --- End diff --
    
    Thanks, changed in the last commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3090: [FLINK-5432] Fix nested files enumeration in ContinuousFi...

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

    https://github.com/apache/flink/pull/3090
  
    The changes look very good! I think it would be good to add a test for nested reading in `ContinuousFileProcessingTest`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3090: [FLINK-5432] Fix nested files enumeration in ContinuousFi...

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

    https://github.com/apache/flink/pull/3090
  
    looks good to me, adding it to my next batch,


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3090: [FLINK-5432] Fix nested files enumeration in Conti...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3090#discussion_r95782207
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileMonitoringFunction.java ---
    @@ -282,7 +282,7 @@ private void monitorDirAndForwardSplits(FileSystem fs,
     	 * Returns the paths of the files not yet processed.
     	 * @param fileSystem The filesystem where the monitored directory resides.
     	 */
    -	private Map<Path, FileStatus> listEligibleFiles(FileSystem fileSystem) throws IOException {
    +	private Map<Path, FileStatus> listEligibleFiles(FileSystem fileSystem, String path) throws IOException {
    --- End diff --
    
    I would suggest passing a `Path` here. It is always a safer option to rely on the this class than on strings.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3090: [FLINK-5432] Fix nested files enumeration in Conti...

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

    https://github.com/apache/flink/pull/3090


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3090: [FLINK-5432] Fix nested files enumeration in ContinuousFi...

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

    https://github.com/apache/flink/pull/3090
  
    @zentol do you want to recheck and merge if good?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3090: [FLINK-5432] Fix nested files enumeration in ContinuousFi...

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

    https://github.com/apache/flink/pull/3090
  
    @aljoscha Added a test and changed Path type according to @zentol's suugestion.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---