-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[FLINK-1980] allowing users to decorate input streams #658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sekruse
commented
May 7, 2015
- add a decorateInputStream() method as hook in FileInputFormat
- provide a InputStreamFSInputWrapper to conveniently wrap InputStreams
- base existing .deflate file support on these changes
- add a test to verify the decoration
|
Thank you for this pull request. I'll review it now. The first thing I saw is that the build has failed: https://travis-ci.org/apache/flink/jobs/61608003 You can also do a local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing license header, that's also why the build fails ;)
|
The change looks good, its not completely consistent with our coding guidelines. But a few runs of "mvn install -DskipTests" will resolve this ;) |
|
Alright, I incorporated all the feedback. The build seems to be passing now. |
|
+1 to merge. |
|
Looks good. One comment, though:
As a followup: Should we add more built-in decompressors for other file endings, like |
|
I think Sebastian has already filed a JIRA for adding gz read support. |
|
I wanted to integrate the gz support with the decorateStream method, therefore I was waiting for this PR to be merged. |
|
That is a good point. It is a bit tricky, though, since the skip method does not guarantee efficient skipping. It also reserves the right to skip less (and return the number of bytes skipped, iirc). |
|
I see your point and double-checked it with the Java doc. I will adjust the seek method accordingly. |
* add a decorateInputStream() method as hook in FileInputFormat * provide a InputStreamFSInputWrapper to conveniently wrap InputStreams * base existing .deflate file support on these changes * add a test to verify the decoration
* use tabs instead of spaces * avoid asterisk imports * include license header
…tWrapper * do not alter the stream position if the stream is at the end
|
I think the PR is good to merge. |
|
Looks good. Will merge this in my next batch... |
* add a decorateInputStream() method as hook in FileInputFormat * provide a InputStreamFSInputWrapper to conveniently wrap InputStreams * base existing .deflate file support on these changes * add a test to verify the decoration This closes apache#658
* add a decorateInputStream() method as hook in FileInputFormat * provide a InputStreamFSInputWrapper to conveniently wrap InputStreams * base existing .deflate file support on these changes * add a test to verify the decoration This closes apache#658