keith-turner commented on code in PR #3349:
URL: https://github.com/apache/accumulo/pull/3349#discussion_r1184377049
##########
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 am not trying to avoid the cost of creating a lambda. The implementation
needs to know when the user does not care about the missing extents so it can
take a much more efficient code path. With only a lambda there is no way to
know if the consumer will discard everything its passed or not. That is why
the implementation needs to differentiate between a lambda being passed and one
not being passed.
--
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]