jihoonson commented on a change in pull request #5102: Automatic compaction by 
coordinators
URL: https://github.com/apache/incubator-druid/pull/5102#discussion_r268329602
 
 

 ##########
 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:
   I meant it's wrong in terms of what other places do. But, it shouldn't cause 
any real bug or error because currently version is a string representation of 
`DateTime`. 

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