pavibhai commented on a change in pull request #924: URL: https://github.com/apache/orc/pull/924#discussion_r733860985
########## File path: java/core/src/java/org/apache/orc/impl/RecordReaderUtils.java ########## @@ -414,7 +414,15 @@ static void readRanges(FSDataInputStream file, long offset = first.getOffset(); int readSize = (int) (computeEnd(first, last) - offset); byte[] buffer = new byte[readSize]; - file.readFully(offset, buffer, 0, buffer.length); + try { + file.readFully(offset, buffer, 0, buffer.length); + } catch(IOException e) { + throw new IOException(String.format("Failed while reading %s %d:%d", + file, Review comment: IMHO it feels like we should fix the FSInputStream to include the relevant information including the path. The S3AInputStream is very descriptive > "Caused by: java.io.IOException: Failed while reading org.apache.hadoop.fs.FSDataInputStream@2f1173dd: S3AInputStream{s3a://<SNIP>.orc wrappedStream=open read policy=random pos=65539 nextReadPos=0 contentLength=121693 contentRangeStart=3 contentRangeFinish=65539 remainingInCurrentRequest=0 StreamStatistics{OpenOperations=5, CloseOperations=4, Closed=4, Aborted=0, SeekOperations=7, ReadExceptions=0, ForwardSeekOperations=3, BackwardSeekOperations=4, BytesSkippedOnSeek=148, BytesBackwardsOnSeek=146391, BytesRead=106621, BytesRead excluding skipped=106473, ReadOperations=15, ReadFullyOperations=8, ReadsIncomplete=8, BytesReadInClose=64722, BytesDiscardedInAbort=0, InputPolicy=2, InputPolicySetCount=2}}" I would propose that: * We have the exception enhanced with the InputStream.toString * We further enhance the exception as suggested by @guiyanakuang to include the path reference in readFileData -- 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: dev-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org