jnturton commented on code in PR #2610:
URL: https://github.com/apache/drill/pull/2610#discussion_r932878062
##########
exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileBatchReader.java:
##########
@@ -154,6 +153,19 @@ public boolean next() {
@Override
public void close() {
- AutoCloseables.closeSilently(reader);
+ try {
+ // Hadoop 2 compat: {@link org.apache.hadoop.mapred.RecordReader} does
not
+ // support AutoCloseable and must be closed manually.
+ if (reader != null) {
+ reader.close();
+ reader = null;
+ }
+ } catch (IOException e) {
+ throw UserException
Review Comment:
@vvysotskyi the implementation of close() in this PR restores what was there
up until a few months ago when AutoCloseables came in (#2498). So we have only
been swallowing errors here since March, we never used to (and the stable
branch of Drill still does not swallow errors here since #2498 was not
backported). Should I nevertheless change the exception handling logic to
swallow errors?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]