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 2019/03/22 19:55:08 UTC
[GitHub] [incubator-druid] jihoonson commented on a change in pull request
#5102: Automatic compaction by coordinators
jihoonson commented on a change in pull request #5102: Automatic compaction by coordinators
URL: https://github.com/apache/incubator-druid/pull/5102#discussion_r268318537
##########
File path: server/src/main/java/io/druid/server/coordinator/DruidCoordinatorRuntimeParams.java
##########
@@ -303,9 +304,30 @@ public Builder withSegmentReplicantLookup(SegmentReplicantLookup lookup)
return this;
}
- public Builder withDatasources(Collection<ImmutableDruidDataSource> dataSourcesCollection)
+ public Builder withDataSources(Map<String, VersionedIntervalTimeline<String, DataSegment>> dataSources)
{
- dataSources.addAll(Collections.unmodifiableCollection(dataSourcesCollection));
+ this.dataSources = dataSources;
+ return this;
+ }
+
+ public Builder withDataSources(Collection<ImmutableDruidDataSource> dataSourcesCollection)
+ {
+ dataSourcesCollection.forEach(
+ dataSource -> {
+ VersionedIntervalTimeline<String, DataSegment> timeline = dataSources.computeIfAbsent(
+ dataSource.getName(),
+ k -> new VersionedIntervalTimeline<>(String.CASE_INSENSITIVE_ORDER)
Review comment:
Hmm I don't remember, but it looks wrong. It would be better to call `VersionedIntervalTimeline.forSegments`.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org