hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject svn commit: r1517609 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
Date Mon, 26 Aug 2013 17:08:43 GMT
Author: mbertozzi
Date: Mon Aug 26 17:08:43 2013
New Revision: 1517609

URL: http://svn.apache.org/r1517609
Log:
HBASE-9329 SnapshotManager should check for directory existance before throwing a warning
(Jean-Marc Spaggiari)

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java?rev=1517609&r1=1517608&r2=1517609&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
Mon Aug 26 17:08:43 2013
@@ -263,8 +263,10 @@ public class SnapshotManager implements 
   void resetTempDir() throws IOException {
     // cleanup any existing snapshots.
     Path tmpdir = SnapshotDescriptionUtils.getWorkingSnapshotDir(rootDir);
-    if (!master.getMasterFileSystem().getFileSystem().delete(tmpdir, true)) {
-      LOG.warn("Couldn't delete working snapshot directory: " + tmpdir);
+    if (master.getMasterFileSystem().getFileSystem().exists(tmpdir)) {
+      if (!master.getMasterFileSystem().getFileSystem().delete(tmpdir, true)) {
+        LOG.warn("Couldn't delete working snapshot directory: " + tmpdir);
+      }
     }
   }
 



Mime
View raw message