rajagopr commented on code in PR #15030:
URL: https://github.com/apache/pinot/pull/15030#discussion_r1953067309


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SegmentPushUtils.java:
##########
@@ -458,10 +438,71 @@ 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,

Review Comment:
   Can we make the following changes:
   1) Reduce visibility for this method to package level
   2) Pass in the executor service as an arg to this method
   3) Close the executor service in the finally block of the calling method.



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

Reply via email to