Kejian-Li commented on a change in pull request #3976:
URL: https://github.com/apache/carbondata/pull/3976#discussion_r503000913



##########
File path: 
core/src/main/java/org/apache/carbondata/core/statusmanager/StageInputCollector.java
##########
@@ -65,8 +65,15 @@
     collectStageFiles(table, hadoopConf, stageInputFiles, successFiles);
     if (stageInputFiles.size() > 0) {
       int numThreads = Math.min(Math.max(stageInputFiles.size(), 1), 10);
-      ExecutorService executorService = 
Executors.newFixedThreadPool(numThreads);
-      return createInputSplits(executorService, stageInputFiles);
+      ExecutorService executorService = null;
+      try {
+        executorService = Executors.newFixedThreadPool(numThreads);
+        return createInputSplits(executorService, stageInputFiles);
+      } finally {
+        if (executorService != null && !executorService.isShutdown()) {
+          executorService.shutdownNow();
+        }
+      }

Review comment:
       executorService has already been shut down, and then pass it in 
createInputSplits, is that okay?




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

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


Reply via email to