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 Tue, 02 Aug 2016 18:44:20 GMT

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

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

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

    https://github.com/apache/flink/pull/2109#discussion_r73213488
  
    --- Diff: flink-core/src/test/java/org/apache/flink/api/common/io/FileInputFormatTest.java
---
    @@ -257,41 +257,22 @@ public void testFileInputSplit() {
     	public void testIgnoredUnderscoreFiles() {
     		try {
     			final String contents = "CONTENTS";
    -			
    +
     			// create some accepted, some ignored files
    -			
    -			File tempDir = new File(System.getProperty("java.io.tmpdir"));
    -			File f;
    -			do {
    -				f = new File(tempDir, TestFileUtils.randomFileName(""));
    -			}
    -			while (f.exists());
     
    -			assertTrue(f.mkdirs());
    -			f.deleteOnExit();
    -			
    -			File child1 = new File(f, "dataFile1.txt");
    -			File child2 = new File(f, "another_file.bin");
    -			File luigiFile = new File(f, "_luigi");
    -			File success = new File(f, "_SUCCESS");
    -			
    -			File[] files = { child1, child2, luigiFile, success };
    -			
    -			for (File child : files) {
    -				child.deleteOnExit();
    -			
    -				BufferedWriter out = new BufferedWriter(new FileWriter(child));
    -				try { 
    -					out.write(contents);
    -				} finally {
    -					out.close();
    -				}
    -			}
    +			File tempDirectory = createTempDirectory();
     			
    +			File child1 = new File(tempDirectory, "dataFile1.txt");
    +			File child2 = new File(tempDirectory, "another_file.bin");
    +			File luigiFile = new File(tempDirectory, "_luigi");
    +			File success = new File(tempDirectory, "_SUCCESS");
    +
    +			createTempFiles(contents.getBytes(), child1, child2, luigiFile, success);
    --- End diff --
    
    Sure, I'll update this.


> 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