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/01/02 21:13:32 UTC

[GitHub] jihoonson commented on a change in pull request #6782: Improve doc for auto compaction

jihoonson commented on a change in pull request #6782: Improve doc for auto compaction
URL: https://github.com/apache/incubator-druid/pull/6782#discussion_r244856133
 
 

 ##########
 File path: docs/content/design/coordinator.md
 ##########
 @@ -86,17 +86,30 @@ Once a compact task fails, the coordinator simply finds the segments for the int
 
 #### Newest Segment First Policy
 
-This policy searches the segments of _all dataSources_ in inverse order of their intervals.
-For example, let me assume there are 3 dataSources (`ds1`, `ds2`, `ds3`) and 5 segments (`seg_ds1_2017-10-01_2017-10-02`, `seg_ds1_2017-11-01_2017-11-02`, `seg_ds2_2017-08-01_2017-08-02`, `seg_ds3_2017-07-01_2017-07-02`, `seg_ds3_2017-12-01_2017-12-02`) for those dataSources.
-The segment name indicates its dataSource and interval. The search result of newestSegmentFirstPolicy is [`seg_ds3_2017-12-01_2017-12-02`, `seg_ds1_2017-11-01_2017-11-02`, `seg_ds1_2017-10-01_2017-10-02`, `seg_ds2_2017-08-01_2017-08-02`, `seg_ds3_2017-07-01_2017-07-02`].
-
-Every run, this policy starts searching from the (very latest interval - [skipOffsetFromLatest](../configuration/index.html#compaction-dynamic-configuration)).
-This is to handle the late segments ingested to realtime dataSources.
+At every coordinator run, this policy searches segments to compact by iterating segments from the latest to the oldest.
+Once it finds the latest segment among all dataSources, it checks the segment is _compactible_ with other segments of the same dataSource which have the same or abutting intervals.
+Note that segments are compactible if their total size is smaller than or equal to the configured `inputSegmentSizeBytes`.
+
+Let me give you some more details with an example. Let me assume we have two dataSources (`foo`, `bar`)
 
 Review comment:
   Sounds good. Fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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