kfaraz commented on code in PR #14507:
URL: https://github.com/apache/druid/pull/14507#discussion_r1278510816
##########
indexing-service/src/main/java/org/apache/druid/indexing/input/DruidInputSource.java:
##########
@@ -474,18 +541,40 @@ private static SortedMap<WindowedSegmentId, Long>
createWindowedSegmentIdFromTim
}
public static List<TimelineObjectHolder<String, DataSegment>>
getTimelineForInterval(
+ TaskToolbox toolbox,
CoordinatorClient coordinatorClient,
String dataSource,
Interval interval
)
{
- final Collection<DataSegment> usedSegments = FutureUtils.getUnchecked(
- coordinatorClient.fetchUsedSegments(
- dataSource,
- Collections.singletonList(Preconditions.checkNotNull(interval,
"interval"))
- ),
- true
- );
+ Preconditions.checkNotNull(interval);
+
+ final Collection<DataSegment> usedSegments;
+ if (toolbox == null) {
+ usedSegments = FutureUtils.getUnchecked(
+ coordinatorClient.fetchUsedSegments(
+ dataSource,
+ Collections.singletonList(Preconditions.checkNotNull(interval,
"interval"))
Review Comment:
We need not perform `checkNotNull` again. It has already been done at the
start of the method.
--
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]