gyfora commented on a change in pull request #14174:
URL: https://github.com/apache/flink/pull/14174#discussion_r531124774



##########
File path: 
flink-java/src/test/java/org/apache/flink/api/java/io/TextInputFormatTest.java
##########
@@ -195,4 +198,65 @@ private void testRemovingTrailingCR(String lineBreaker, 
String delimiter) throws
                }
        }
 
+       @Test
+       public void testCompressedRead() throws IOException {
+               final String first = "First line";
+               final String second = "Second line";
+
+               // create input file
+               File tempFile = File.createTempFile("TextInputFormatTest", 
".compressed", temporaryFolder.getRoot());
+               tempFile.setWritable(true);
+
+               try (PrintStream ps = new PrintStream(tempFile)) {
+                       ps.println(first);
+                       ps.println(second);
+               }
+
+               TextInputFormat inputFormat = new TextInputFormat(new 
Path(tempFile.toURI().toString()));
+               TextInputFormat.registerInflaterInputStreamFactory(
+                       "compressed",
+                       new InflaterInputStreamFactory<InputStream>() {
+                               @Override
+                               public InputStream create(InputStream in) 
throws IOException {

Review comment:
       Will do




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to