drcrallen commented on a change in pull request #7350: Collect in List instead 
of Set
URL: https://github.com/apache/incubator-druid/pull/7350#discussion_r270403868
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/server/http/MetadataResource.java
 ##########
 @@ -158,7 +158,7 @@ public Response getDatabaseSegments(
     if (datasources != null && !datasources.isEmpty()) {
       druidDataSources = druidDataSources.stream()
                                          .filter(src -> 
datasources.contains(src.getName()))
-                                         .collect(Collectors.toSet());
+                                         .collect(Collectors.toList());
 
 Review comment:
   what happens if we don't collect at all? can you just return a Stream and 
have jackson handle the lazy array materialization? I think you can avoid the 
odd output stream and json factory stuff if jackson supports such a thing.

----------------------------------------------------------------
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.
 
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]

Reply via email to