kfaraz commented on code in PR #15430:
URL: https://github.com/apache/druid/pull/15430#discussion_r1404712625


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/RetrieveSegmentsToReplaceAction.java:
##########
@@ -67,16 +68,16 @@ public class RetrieveSegmentsToReplaceAction implements 
TaskAction<Collection<Da
   private final String dataSource;
 
   @JsonIgnore

Review Comment:
   I think I had missed this earlier when this class was created. Not sure why 
we need `@JsonIgnore` here.



##########
server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:
##########
@@ -174,21 +174,23 @@ private Collection<DataSegment> doRetrieveUsedSegments(
   }
 
   @Override
-  public List<Pair<DataSegment, String>> 
retrieveUsedSegmentsAndCreatedDates(String dataSource, Interval interval)
+  public List<Pair<DataSegment, String>> 
retrieveUsedSegmentsAndCreatedDates(String dataSource, List<Interval> intervals)
   {
     StringBuilder queryBuilder = new StringBuilder(
         "SELECT created_date, payload FROM %1$s WHERE dataSource = :dataSource 
AND used = true"
     );
 
-    final List<Interval> intervals = new ArrayList<>();
-    // Do not need an interval condition if the interval is ETERNITY
-    if (!Intervals.isEternity(interval)) {
-      intervals.add(interval);
+    boolean intervalsAreEternity = false;

Review Comment:
   Nit:
   
   ```suggestion
       boolean hasEternityInterval = false;
   ```



##########
server/src/main/java/org/apache/druid/indexing/overlord/IndexerMetadataStorageCoordinator.java:
##########
@@ -84,19 +84,19 @@ default Collection<DataSegment> 
retrieveUsedSegmentsForInterval(
   /**
    *
    * Retrieve all published segments which are marked as used and the 
created_date of these segments belonging to the
-   * given data source and interval from the metadata store.
+   * given data source and List<Interval> from the metadata store.

Review Comment:
   Nit: This doesn't render correctly in javadoc. Use `intervals` or `List of 
intervals` instead of this.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to