clintropolis commented on code in PR #19282:
URL: https://github.com/apache/druid/pull/19282#discussion_r3083012751
##########
processing/src/main/java/org/apache/druid/segment/loading/LoadSpec.java:
##########
@@ -38,6 +40,24 @@ public interface LoadSpec
*/
LoadSpecResult loadSegment(File destDir) throws SegmentLoadingException;
+ /**
+ * Open a {@link SegmentRangeReader} for reading byte ranges from the
segment file in deep storage. This enables
+ * partial segment downloads where only the needed portions of a segment
file are fetched.
+ * <p>
+ * Returns {@code null} if range reads are not supported by this storage
backend or for this particular segment
+ * (e.g. if the segment is stored in a compressed archive format that does
not support random access). When
+ * {@code null} is returned, callers should fall back to downloading the
full segment via {@link #loadSegment(File)}.
+ * <p>
+ * The caller is responsible for closing the returned reader when done.
Review Comment:
oops, the thing to close is any streams opened from the reader, will fix
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]