hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-18808 Ineffective config check in BackupLogCleaner#getDeletableFiles()
Date Mon, 18 Sep 2017 17:16:26 GMT
Repository: hbase
Updated Branches:
  refs/heads/master ff0c1d2fa -> 9f0863ce5


HBASE-18808 Ineffective config check in BackupLogCleaner#getDeletableFiles()

Signed-off-by: tedyu <yuzhihong@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9f0863ce
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9f0863ce
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9f0863ce

Branch: refs/heads/master
Commit: 9f0863ce5f25276e22ac0d3b2c03b4f6f2296578
Parents: ff0c1d2
Author: Reid Chan <reidddchan@outlook.com>
Authored: Mon Sep 18 14:51:09 2017 +0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Mon Sep 18 10:16:14 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/backup/master/BackupLogCleaner.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9f0863ce/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
----------------------------------------------------------------------
diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
index 08a7eba..0f1722f 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
@@ -76,8 +76,10 @@ public class BackupLogCleaner extends BaseLogCleanerDelegate {
     // all members of this class are null if backup is disabled,
     // so we cannot filter the files
     if (this.getConf() == null || !BackupManager.isBackupEnabled(getConf())) {
-      LOG.warn("Backup is not enabled. Check your " + BackupRestoreConstants.BACKUP_ENABLE_KEY
-          + " setting");
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Backup is not enabled. Check your "
+            + BackupRestoreConstants.BACKUP_ENABLE_KEY + " setting");
+      }
       return files;
     }
 
@@ -117,12 +119,11 @@ public class BackupLogCleaner extends BaseLogCleanerDelegate {
   @Override
   public void setConf(Configuration config) {
     // If backup is disabled, keep all members null
+    super.setConf(config);
     if (!config.getBoolean(BackupRestoreConstants.BACKUP_ENABLE_KEY,
       BackupRestoreConstants.BACKUP_ENABLE_DEFAULT)) {
       LOG.warn("Backup is disabled - allowing all wals to be deleted");
-      return;
     }
-    super.setConf(config);
   }
 
   @Override


Mime
View raw message