mayankshriv commented on a change in pull request #7961:
URL: https://github.com/apache/pinot/pull/7961#discussion_r779936762



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java
##########
@@ -102,6 +103,12 @@ public void init(TableDataManagerConfig 
tableDataManagerConfig, String instanceI
     if (!_indexDir.exists()) {
       Preconditions.checkState(_indexDir.mkdirs());
     }
+    _resourceTmpDir = new File(_indexDir, "tmp");
+    // Delete and recreate the tmp directory if it exists as it may contain 
old files from previous runs.
+    _resourceTmpDir.delete();

Review comment:
       Could we use `FileUtils.deleteQuietly`, also is the `exists` check 
needed? I take it that the `exists()` check is needed in case the delete failed 
to delete existing directory?




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to