abhishekbafna commented on code in PR #15030: URL: https://github.com/apache/pinot/pull/15030#discussion_r1951948871
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SegmentPushUtils.java: ########## @@ -458,10 +438,70 @@ public static void sendSegmentsUriAndMetadata(SegmentGenerationJobSpec spec, Pin }); } } finally { - for (Map.Entry<String, File> metadataFileEntry: segmentMetadataFileMap.entrySet()) { + for (Map.Entry<String, File> metadataFileEntry : segmentMetadataFileMap.entrySet()) { FileUtils.deleteQuietly(metadataFileEntry.getValue()); } - FileUtils.forceDelete(allSegmentsMetadataTarFile); + if (allSegmentsMetadataTarFile != null) { + FileUtils.deleteQuietly(allSegmentsMetadataTarFile); + } + } + } + + @VisibleForTesting + public static void generateSegmentMetadataFiles(SegmentGenerationJobSpec spec, PinotFS fileSystem, + Map<String, String> segmentUriToTarPathMap, ConcurrentHashMap<String, File> segmentMetadataFileMap, + ConcurrentLinkedQueue<String> segmentURIs) { + ExecutorService executor = Executors.newFixedThreadPool(spec.getPushJobSpec().getPushParallelism()); + List<Future<Void>> futures = new ArrayList<>(); + + for (String segmentUriPath : segmentUriToTarPathMap.keySet()) { Review Comment: @swaminathanmanish I have introduced a new config in the push job spec `_segmentMetadataGenerationParallelism`. -- 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