You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/03/22 14:26:18 UTC

[GitHub] [hive] klcopp commented on a change in pull request #2086: HIVE-24900 Failed compaction does not cleanup the directories

klcopp commented on a change in pull request #2086:
URL: https://github.com/apache/hive/pull/2086#discussion_r598763036



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -555,6 +559,11 @@ protected Boolean findNextCompactionAndExecute(boolean computeStats) throws Inte
         LOG.error("Caught exception while trying to compact " + ci +
             ".  Marking failed to avoid repeated failures", e);
         markFailed(ci, e);
+        // remove the new directories created by compaction
+        if (resultDir != null) {
+          FileSystem fs = resultDir.getFileSystem(conf);
+          fs.delete(resultDir, true);

Review comment:
       Better: catch FileNotFoundExceptions




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org