ajantha-bhat commented on a change in pull request #3622: [CARBONDATA-3702] 
Clean temp index files in parallel in merge index flow
URL: https://github.com/apache/carbondata/pull/3622#discussion_r379984005
 
 

 ##########
 File path: 
integration/spark-common/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala
 ##########
 @@ -191,6 +193,27 @@ object CarbonMergeFilesRDD {
     mergeIndexSize
   }
 
+  /**
+   * delete the file with retry
+   */
+  def deleteFileWithRetry(filePath: String, _retryTimes: Integer): Unit = {
+    var retryTimes = _retryTimes
+    while (!deleteFile(filePath) && retryTimes > 0) {
 
 Review comment:
   why not use `deleteAllCarbonFilesOfDir` ?
   
   Because line 175: you have to loop again to delete the directories. May be 
slow on s3

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to