[
https://issues.apache.org/jira/browse/HDFS-15042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17577187#comment-17577187
]
ASF GitHub Bot commented on HDFS-15042:
---------------------------------------
ayushtkn commented on code in PR #1747:
URL: https://github.com/apache/hadoop/pull/1747#discussion_r940946727
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferPositionedReadable.java:
##########
@@ -54,12 +69,11 @@ public interface ByteBufferPositionedReadable {
* stream supports this interface, otherwise they might get a
* {@link UnsupportedOperationException}.
* <p>
- * Implementations should treat 0-length requests as legitimate, and must not
+ * Implementations MUST treat 0-length requests as legitimate, and MUST NOT
* signal an error upon their receipt.
- * <p>
- * This does not change the current offset of a file, and is thread-safe.
- *
- * @param position position within file
+ * The {@code position} offset MUST BE zero or positive; if negative
+ * an EOFException SHALL BE raised.
Review Comment:
Just to be clear, we can't change the behaviour of the stream as well, we
just need to correct the JavaDoc, changing behaviour to now throw EOF will be
incompatible
> Add more tests for ByteBufferPositionedReadable
> ------------------------------------------------
>
> Key: HDFS-15042
> URL: https://issues.apache.org/jira/browse/HDFS-15042
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: fs, test
> Affects Versions: 3.3.0
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> There's a few corner cases of ByteBufferPositionedReadable which need to be
> tested, mainly illegal read positions. Add them
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]