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/06/07 15:21:42 UTC

[GitHub] [incubator-druid] egor-ryashin commented on a change in pull request #7653: Refactor SQLMetadataSegmentManager; Change contract of REST methods in DataSourcesResource

egor-ryashin commented on a change in pull request #7653: Refactor SQLMetadataSegmentManager; Change contract of REST methods in DataSourcesResource
URL: https://github.com/apache/incubator-druid/pull/7653#discussion_r290470707
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/client/ImmutableDruidServer.java
 ##########
 @@ -128,23 +128,26 @@ public ImmutableDruidDataSource getDataSource(String name)
   }
 
   /**
-   * Returns a lazy collection with all segments in all data sources, stored on this ImmutableDruidServer. The order
-   * of segments in this collection is unspecified.
-   *
-   * Calling {@link Collection#size()} on the returned collection is cheap, O(1).
+   * Returns a lazy collection with all segments in all data sources stored on this ImmutableDruidServer to be used for
+   * iteration or {@link Collection#stream()} transformation. The order of segments in this collection is unspecified.
    *
    * Note: iteration over the returned collection may not be as trivially cheap as, for example, iteration over an
    * ArrayList. Try (to some reasonable extent) to organize the code so that it iterates the returned collection only
    * once rather than several times.
    */
-  public Collection<DataSegment> getLazyAllSegments()
+  public Collection<DataSegment> iterateAllSegments()
 
 Review comment:
   Somewhat misleading as it doesn't iterate but creates a collection.

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