ctubbsii commented on code in PR #3349:
URL: https://github.com/apache/accumulo/pull/3349#discussion_r1185917428
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java:
##########
@@ -149,8 +149,8 @@ private TabletMetadataLoader(Ample ample) {
loadAll(Set<? extends KeyExtent> keys) {
long t1 = System.currentTimeMillis();
@SuppressWarnings("unchecked")
- var tms = ample.readTablets().forTablets((Collection<KeyExtent>)
keys).build().stream()
- .collect(Collectors.toMap(tm -> tm.getExtent(), tm -> tm));
+ var tms = ample.readTablets().forTablets((Collection<KeyExtent>) keys, e
-> {}).build()
Review Comment:
I think I understand what you're saying now. My comment was only about
readability (giving `e -> {}` a name). I now understand that you had entirely
unrelated reasons for choosing Optional (to bypass doing unnecessary costly
tasks). If I'm understanding correctly and the use of Optional allows you to
bypass those costly tasks, then I think Optional makes sense. It just wasn't
clear to me that the discussion had moved away from the readability point I was
making.
--
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]