Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7B13D04A for ; Wed, 15 May 2013 19:43:22 +0000 (UTC) Received: (qmail 60488 invoked by uid 500); 15 May 2013 19:43:22 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 60452 invoked by uid 500); 15 May 2013 19:43:22 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 60444 invoked by uid 99); 15 May 2013 19:43:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 19:43:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 19:43:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A8AB123889E7; Wed, 15 May 2013 19:42:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hbase.apache.org From: mbertozzi@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130515194259.A8AB123889E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }