server/src/main/java/org/apache/druid/server/coordinator/duty/NewestSegmentFirstIterator.java
/**
   * Find the next segments to compact for the given dataSource and add them to the queue.
   * {@link #timelineIterators} is updated according to the found segments. That is, the found segments are removed from
   * the timeline of the given dataSource.
   */
Find the next segments to compact for the given dataSource and add them to the queue.
#timelineIterators is updated according to the found segments. That is, the found segments are removed from
the timeline of the given dataSource.
Find the next segments to compact for the given dataSource and add them to the queue . #timelineIterators is updated according to the found segments . That is the found segments are removed from the timeline of the given dataSource .
private void updateQueue(String dataSourceName, DataSourceCompactionConfig config)
  {
    final CompactibleTimelineObjectHolderCursor compactibleTimelineObjectHolderCursor = timelineIterators.get(
        dataSourceName
    );
    if (compactibleTimelineObjectHolderCursor == null) {
      log.warn("Cannot find timeline for dataSource[%s]. Skip this dataSource", dataSourceName);
      return;
    }
    final SegmentsToCompact segmentsToCompact = findSegmentsToCompact(
        dataSourceName,
        compactibleTimelineObjectHolderCursor,
        config
    );
    if (!segmentsToCompact.isEmpty()) {
      queue.add(new QueueEntry(segmentsToCompact.segments));
    }
  }
private void updateQueue ( String dataSourceName , DataSourceCompactionConfig config ) { final CompactibleTimelineObjectHolderCursor compactibleTimelineObjectHolderCursor = timelineIterators . get ( dataSourceName ) ; if ( compactibleTimelineObjectHolderCursor == null ) { log . warn ( "Cannot find timeline for dataSource[%s]. Skip this dataSource" , dataSourceName ) ; return ; } final SegmentsToCompact segmentsToCompact = findSegmentsToCompact ( dataSourceName , compactibleTimelineObjectHolderCursor , config ) ; if ( ! segmentsToCompact . isEmpty ( ) ) { queue . add ( new QueueEntry ( segmentsToCompact . segments ) ) ; } }
Find the next segments to compact for the given dataSource and add them to the queue.
Find the next segments to compact for the given dataSource and add them to the queue .