dlmarion commented on code in PR #2636:
URL: https://github.com/apache/accumulo/pull/2636#discussion_r852195468
##########
core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java:
##########
@@ -370,4 +372,15 @@ default void forEach(BiConsumer<? super Key,? super Value>
keyValueConsumer) {
keyValueConsumer.accept(entry.getKey(), entry.getValue());
}
}
+
+ /**
+ * Stream the Scanner results sequentially from this scanner's iterator
+ *
Review Comment:
Should we add a note here that the resulting stream cannot be used outside
of a try-with-resources block that closes the Scanner and that if the stream is
returned from a function without the Scanner being closed then
`.onClose(scanner::close)` should be called before leaving the method?
--
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]