ahmarsuhail commented on PR #7367: URL: https://github.com/apache/hadoop/pull/7367#issuecomment-2834755228
@cnauroth, my team is working on an analytics focussed stream for S3A: https://github.com/awslabs/analytics-accelerator-s3/tree/main (AAL) In the stream, when offset is negative, we do `Preconditions.checkArgument(offset >= 0, "Offset is negative");` and throw `IllegalArgumentException`. From your docs in this PR, for len: ``` If the caller passes a negative value for `length`, then an unchecked exception MUST be thrown. The base JDK `InputStream` implementation throws `IndexOutOfBoundsException`. HDFS historically used `IllegalArgumentException`. Implementations MAY use either of these. ``` Should be the case for offset as well? Without this `testInputStreamReadNegativePosition` fails with AAL. So i'm trying to understand if we need to change the exception AAL throws or if we can add another assertion `testInputStreamReadNegativePosition` -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org