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/12 23:52:16 UTC

[GitHub] [pinot] zhouxiz9 commented on a diff in pull request #10979: Skip generating rollup task with all merged segments

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


##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskGenerator.java:
##########
@@ -656,18 +666,25 @@ private List<PinotTaskConfig> createPinotTaskConfigs(List<SegmentZKMetadata> sel
     int numRecordsPerTask = 0;
     List<List<String>> segmentNamesList = new ArrayList<>();
     List<List<String>> downloadURLsList = new ArrayList<>();
+    List<SegmentZKMetadata> segments = new ArrayList<>();
     List<String> segmentNames = new ArrayList<>();
     List<String> downloadURLs = new ArrayList<>();
 
     for (int i = 0; i < selectedSegments.size(); i++) {
       SegmentZKMetadata targetSegment = selectedSegments.get(i);
+      segments.add(targetSegment);
       segmentNames.add(targetSegment.getSegmentName());
       downloadURLs.add(targetSegment.getDownloadUrl());
       numRecordsPerTask += targetSegment.getTotalDocs();
       if (numRecordsPerTask >= maxNumRecordsPerTask || i == selectedSegments.size() - 1) {
-        segmentNamesList.add(segmentNames);
-        downloadURLsList.add(downloadURLs);
+        // Skip generating rollup task with all merged segments
+        if (MergeTaskUtils.getMergeType(mergeConfigs) != MergeType.ROLLUP

Review Comment:
   I think it can be applied to concat an dedup as well. Let me update.



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