flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3677) FileInputFormat: Allow to specify include/exclude file name patterns
Date Wed, 24 Aug 2016 13:35:21 GMT

    [ https://issues.apache.org/jira/browse/FLINK-3677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434943#comment-15434943
] 

ASF GitHub Bot commented on FLINK-3677:
---------------------------------------

Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2109#discussion_r76056623
  
    --- Diff: flink-core/src/test/java/org/apache/flink/api/common/io/FileInputFormatTest.java
---
    @@ -314,43 +299,95 @@ public void testIgnoredUnderscoreFiles() {
     	}
     
     	@Test
    +	public void testExcludeFiles() {
    +		try {
    +			final String contents = "CONTENTS";
    +
    +			// create some accepted, some ignored files
    +
    +			File child1 = temporaryFolder.newFile("dataFile1.txt");
    +			File child2 = temporaryFolder.newFile("another_file.bin");
    +
    +			File[] files = { child1, child2 };
    +
    +			createTempFiles(contents.getBytes(), files);
    +
    +			// test that only the valid files are accepted
    +
    +			Configuration configuration = new Configuration();
    +
    +			final DummyFileInputFormat format = new DummyFileInputFormat();
    +			format.setFilePath(temporaryFolder.getRoot().toURI().toString());
    +			format.configure(configuration);
    +			format.setFilesFilter(new GlobFilePathFilter(
    +				Collections.singletonList("**"),
    --- End diff --
    
    `**` would be the same as `*`?


> FileInputFormat: Allow to specify include/exclude file name patterns
> --------------------------------------------------------------------
>
>                 Key: FLINK-3677
>                 URL: https://issues.apache.org/jira/browse/FLINK-3677
>             Project: Flink
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.0
>            Reporter: Maximilian Michels
>            Assignee: Ivan Mushketyk
>            Priority: Minor
>              Labels: starter
>
> It would be nice to be able to specify a regular expression to filter files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message