Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/1494#discussion_r49199370
--- Diff:
flink-core/src/main/java/org/apache/flink/api/common/io/BinaryInputFormat.java
---
@@ -213,9 +213,10 @@ protected SequentialStatistics
createStatistics(List<FileStatus> files, FileBase
FSDataInputStream fdis =
file.getPath().getFileSystem().open(file.getPath(), blockInfo.getInfoSize());
fdis.seek(file.getLen() - blockInfo.getInfoSize());
-
+
blockInfo.read(new DataInputViewStreamWrapper(fdis));
totalCount += blockInfo.getAccumulatedRecordCount();
+ fdis.close();
--- End diff --
Agreed, we should try and consistently use a "try-with-resource" clause for
streams.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---