Airliquide76 commented on code in PR #9568: URL: https://github.com/apache/pinot/pull/9568#discussion_r1071082744
########## pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/purge/PurgeTaskGenerator.java: ########## @@ -150,4 +162,46 @@ public List<PinotTaskConfig> generateTasks(List<TableConfig> tableConfigs) { } return pinotTaskConfigs; } -} + + /** + * Fetch completed (DONE/UPLOADED) segment and partition information + * + * @param realtimeTableName the realtime table name + * @param completedSegmentsZKMetadata list for collecting the completed (DONE/UPLOADED) segments ZK metadata + * @param partitionToLatestLLCSegmentName map for collecting the partitionId to the latest LLC segment name + * @param allPartitions set for collecting all partition ids + */ + private void getCompletedSegmentsInfo(String realtimeTableName, List<SegmentZKMetadata> completedSegmentsZKMetadata, + Map<Integer, String> partitionToLatestLLCSegmentName, Set<Integer> allPartitions) { + List<SegmentZKMetadata> segmentsZKMetadata = _clusterInfoAccessor.getSegmentsZKMetadata(realtimeTableName); + + Map<Integer, LLCSegmentName> latestLLCSegmentNameMap = new HashMap<>(); + for (SegmentZKMetadata segmentZKMetadata : segmentsZKMetadata) { + CommonConstants.Segment.Realtime.Status status = segmentZKMetadata.getStatus(); + if (status.isCompleted()) { + completedSegmentsZKMetadata.add(segmentZKMetadata); + } + + // Skip UPLOADED segments that don't conform to the LLC segment name Review Comment: Yes remove this never used part ! -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org