hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject svn commit: r1483046 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
Date Wed, 15 May 2013 19:42:59 GMT
Author: mbertozzi
Date: Wed May 15 19:42:59 2013
New Revision: 1483046

URL: http://svn.apache.org/r1483046
Log:
HBASE-8540 SnapshotFileCache logs too many times if snapshot dir doesn't exists

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

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java?rev=1483046&r1=1483045&r2=1483046&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
Wed May 15 19:42:59 2013
@@ -188,7 +188,9 @@ public class SnapshotFileCache implement
     try {
       status = fs.getFileStatus(snapshotDir);
     } catch (FileNotFoundException e) {
-      LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");
+      if (this.cache.size() > 0) {
+        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");
+      }
       return;
     }
     // if the snapshot directory wasn't modified since we last check, we are done
@@ -210,7 +212,9 @@ public class SnapshotFileCache implement
     FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);
     if (snapshots == null) {
       // remove all the remembered snapshots because we don't have any left
-      LOG.debug("No snapshots on-disk, cache empty");
+      if (LOG.isDebugEnabled() && this.snapshots.size() > 0) {
+        LOG.debug("No snapshots on-disk, cache empty");
+      }
       this.snapshots.clear();
       return;
     }



Mime
View raw message