You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "zhouxiz9 (via GitHub)" <gi...@apache.org> on 2023/07/28 06:53:42 UTC

[GitHub] [pinot] zhouxiz9 commented on a diff in pull request #10979: Skip generating rollup task with all merged segments when "skipAllMerged" mode is enabled

zhouxiz9 commented on code in PR #10979:
URL: https://github.com/apache/pinot/pull/10979#discussion_r1277178898


##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java:
##########
@@ -663,18 +672,26 @@ private List<PinotTaskConfig> createPinotTaskConfigs(List<SegmentZKMetadata> sel
       int numRecordsPerTask = 0;
       List<List<String>> segmentNamesList = new ArrayList<>();
       List<List<String>> downloadURLsList = new ArrayList<>();
+      List<SegmentZKMetadata> segmentZKMetadataList = new ArrayList<>();
       List<String> segmentNames = new ArrayList<>();
       List<String> downloadURLs = new ArrayList<>();
 
       for (int i = 0; i < segments.size(); i++) {
         SegmentZKMetadata targetSegment = segments.get(i);
+        segmentZKMetadataList.add(targetSegment);
         segmentNames.add(targetSegment.getSegmentName());
         downloadURLs.add(targetSegment.getDownloadUrl());
         numRecordsPerTask += targetSegment.getTotalDocs();
         if (numRecordsPerTask >= maxNumRecordsPerTask || i == segments.size() - 1) {
-          segmentNamesList.add(segmentNames);
-          downloadURLsList.add(downloadURLs);
+          // If "skipAllMerged" mode is enabled, skip generating task with all merged segments
+          boolean skipAllMerged = MergeTask.SKIP_ALL_MERGED_MODE.equalsIgnoreCase(taskConfigs.get(MergeTask.MODE));

Review Comment:
   That makes sense. Since `processAll` and `skipAllMerged` are not mutually exclusive and have some functionality overlap, I feel that it is more appropriate to not make `skipAllMerged` as a mode but as a new configuration. I've updated the implementation.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org