jihoonson commented on a change in pull request #7306: Reconcile terminology 
and method naming to 'used/unused segments'; Rename MetadataSegmentManager to 
MetadataSegments
URL: https://github.com/apache/druid/pull/7306#discussion_r369376848
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/indexing/overlord/IndexerMetadataStorageCoordinator.java
 ##########
 @@ -58,45 +58,78 @@
    * {@link java.util.HashSet} or {@link 
com.google.common.collect.ImmutableSet} which may in turn be unnecessary in
    * other use cases. So clients should perform such copy themselves if they 
need {@link Set} semantics.
    */
-  default Collection<DataSegment> getUsedSegmentsForInterval(String 
dataSource, Interval interval, Segments visibility)
+  default Collection<DataSegment> retrieveUsedSegmentsForInterval(
+      String dataSource,
+      Interval interval,
+      Segments visibility
+  )
   {
-    return getUsedSegmentsForIntervals(dataSource, 
Collections.singletonList(interval), visibility);
+    return retrieveUsedSegmentsForIntervals(dataSource, 
Collections.singletonList(interval), visibility);
   }
 
   /**
-   * Get all published segments which are marked as used and the created_date 
of these segments in a given datasource
-   * and interval.
+   * Retrieve all published used segments in the data source from the metadata 
store.
+   *
+   * @param dataSource The data source to query
+   *
+   * @return all segments belonging to the given data source
+   * @see #retrieveUsedSegmentsForInterval(String, Interval, Segments) similar 
to this method but also accepts data
+   * interval.
+   */
+  Collection<DataSegment> retrieveAllUsedSegments(String dataSource, Segments 
visibility);
+
+  /**
+   * Retrieve all published segments which are marked as used and the 
created_date of these segments belonging to the
+   * given data source from the metadata store.
+   *
+   * Unlike other similar methods in this interface, this method doesn't 
accept a {@link Segments} "visibility"
+   * parameter. This methods returns overshadowed segments, as if {@link 
Segments#INCLUDING_OVERSHADOWED} was passed.
 
 Review comment:
   I think it's more clear to say "The returned collection may include 
overshadowed segments and their created_dates, as if {@link 
Segments#INCLUDING_OVERSHADOWED} was passed. It's the responsibility of the 
caller to filter out overshadowed ones if needed`.

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