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 2020/06/03 20:39:02 UTC

[GitHub] [druid] samarthjain commented on a change in pull request #9603: Add new round robin strategy for loading segments.

samarthjain commented on a change in pull request #9603:
URL: https://github.com/apache/druid/pull/9603#discussion_r434839414



##########
File path: server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinatorRuntimeParams.java
##########
@@ -56,11 +64,50 @@
     return segmentsSet;
   }
 
+  /**
+   * Creates a {@link Set} by choosing used segments from each datasource in a round robin fashion.
+   * The order of segments picked for a datasource is dependent on the iteration order of
+   * {@link ImmutableDruidDataSource#getSegments()}. So if it is desired to have newer segments
+   * be picked up before the older ones, the {@link Collection} returned by {@link ImmutableDruidDataSource#getSegments()}
+   * needs to be setup accordingly.
+   */
+  private static Set<DataSegment> createUsedSegmentSetInRoundRobinFashion(Map<String, ImmutableDruidDataSource> dataSourcesWithAllUsedSegments)

Review comment:
       Good idea, @gianm . Will refactor and push a new commit.




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



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