QiangCai commented on a change in pull request #3976:
URL: https://github.com/apache/carbondata/pull/3976#discussion_r503000562



##########
File path: 
integration/spark/src/main/scala/org/apache/carbondata/indexserver/IndexServer.scala
##########
@@ -123,6 +123,9 @@ object IndexServer extends ServerInterface {
         t
       }
     })
+    indexServerExecutorService.get.shutdown()

Review comment:
       It will not accept more tasks.

##########
File path: 
integration/spark/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala
##########
@@ -158,20 +158,27 @@ object CarbonMergeFilesRDD {
       // remove all tmp folder of index files
       val startDelete = System.currentTimeMillis()
       val numThreads = Math.min(Math.max(partitionInfo.size(), 1), 10)
-      val executorService = Executors.newFixedThreadPool(numThreads)
-      val carbonSessionInfo = ThreadLocalSessionInfo.getCarbonSessionInfo
-      partitionInfo
-        .asScala
-        .map { partitionPath =>
-          executorService.submit(new Runnable {
-            override def run(): Unit = {
-              ThreadLocalSessionInfo.setCarbonSessionInfo(carbonSessionInfo)
-              FileFactory.deleteAllCarbonFilesOfDir(
-                FileFactory.getCarbonFile(partitionPath + "/" + 
tempFolderPath))
-            }
-          })
+      var executorService: ExecutorService = null
+      try {
+        executorService = Executors.newFixedThreadPool(numThreads)

Review comment:
       move line 163 to line 161

##########
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);

Review comment:
       move line 70 to line 68




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