guluo2016 commented on code in PR #5880:
URL: https://github.com/apache/hbase/pull/5880#discussion_r1592695817


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.java:
##########
@@ -252,11 +252,11 @@ public void process() {
       try {
         // if the working dir is still present, the snapshot has failed. it is 
present we delete
         // it.
-        if (!workingDirFs.delete(workingDir, true)) {
-          LOG.error("Couldn't delete snapshot working directory:" + 
workingDir);
+        if (workingDirFs.exists(workingDir) && 
!workingDirFs.delete(workingDir, true)) {
+          LOG.error("Couldn't delete snapshot working directory: {}", 
workingDir);
         }
       } catch (IOException e) {
-        LOG.error("Couldn't delete snapshot working directory:" + workingDir);
+        LOG.error("Couldn't get or delete snapshot working directory: {}", 
workingDir, e);

Review Comment:
   Printing exception stack if hbase throws exception in here



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

Reply via email to