You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/03/30 01:09:10 UTC

[GitHub] [incubator-druid] surekhasaharan commented on a change in pull request #7350: Collect in List instead of Set

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

 ##########
 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:
   @drcrallen this collection happens only in case a non-null `datasources` query param is passed, else this part is skipped. This api already returns a stream, I think even if I remove the output stream and json factory stuff, this particular collection would remain, as it's used to filter out the datasources. The outputStream was added [here](https://github.com/apache/incubator-druid/pull/6094/commits/dc9fa4c40a5c725a1953269ab76ceac42cd91693#diff-eae30d4873d67410c81c288bcf7e8849R165), when I was writing the original code, and IIRC, I was getting some json format exceptions in `JsonParserIterator`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org