leventov commented on a change in pull request #5913: Move Caching Cluster
Client to java streams and allow parallel intermediate merges
URL: https://github.com/apache/incubator-druid/pull/5913#discussion_r202552361
##########
File path: server/src/main/java/io/druid/client/CachingClusteredClient.java
##########
@@ -623,7 +772,41 @@ private void addSequencesFromServer(
}
return res;
})
- .flatMerge(seq -> seq, query.getResultOrdering());
+ .flatMerge(Function.identity(), query.getResultOrdering());
+ }
+ }
+
+ // POJO
+ private static class ServerMaybeSegmentMaybeCache<T>
+ {
+ private final DruidServer server;
+ private final Optional<SegmentDescriptor> segmentDescriptor;
Review comment:
Optional stored in field (as well as Map.Entry or Map value, above in this
class) [is considered a code
smell](https://stackoverflow.com/a/26328314/648955). IMO, this class overuses
Optionals to some degree, as well as Streams. Replacing some of them with
nullable variables will only make the code clearer
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]