[06/24] hbase git commit: HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner

2016-04-11 Thread syuanjiang
HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner


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

Branch: refs/heads/hbase-12439
Commit: 33396c3629a83f2379a69f3a3b493ae8e6ee0a13
Parents: 79868bd
Author: Ashish Singhi 
Authored: Mon Apr 4 15:02:19 2016 +0530
Committer: Ashish Singhi 
Committed: Mon Apr 4 15:02:19 2016 +0530

--
 .../master/ReplicationHFileCleaner.java | 48 +-
 .../cleaner/TestReplicationHFileCleaner.java| 70 
 2 files changed, 100 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/33396c36/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
index 9bfea4b..5df9379 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
@@ -10,6 +10,7 @@
  */
 package org.apache.hadoop.hbase.replication.master;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -41,12 +42,11 @@ import org.apache.zookeeper.KeeperException;
  * deleting it from hfile archive directory.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
-public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate 
implements Abortable {
+public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate {
   private static final Log LOG = 
LogFactory.getLog(ReplicationHFileCleaner.class);
   private ZooKeeperWatcher zkw;
   private ReplicationQueuesClient rqc;
   private boolean stopped = false;
-  private boolean aborted;
 
   @Override
   public Iterable getDeletableFiles(Iterable files) {
@@ -129,18 +129,27 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 // Make my own Configuration. Then I'll have my own connection to zk that
 // I can close myself when time comes.
 Configuration conf = new Configuration(config);
+try {
+  setConf(conf, new ZooKeeperWatcher(conf, "replicationHFileCleaner", 
null));
+} catch (IOException e) {
+  LOG.error("Error while configuring " + this.getClass().getName(), e);
+}
+  }
+
+  @VisibleForTesting
+  public void setConf(Configuration conf, ZooKeeperWatcher zk) {
 super.setConf(conf);
 try {
-  initReplicationQueuesClient(conf);
+  initReplicationQueuesClient(conf, zk);
 } catch (IOException e) {
   LOG.error("Error while configuring " + this.getClass().getName(), e);
 }
   }
 
-  private void initReplicationQueuesClient(Configuration conf)
+  private void initReplicationQueuesClient(Configuration conf, 
ZooKeeperWatcher zk)
   throws ZooKeeperConnectionException, IOException {
-this.zkw = new ZooKeeperWatcher(conf, "replicationHFileCleaner", null);
-this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, this);
+this.zkw = zk;
+this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, new 
WarnOnlyAbortable());
   }
 
   @Override
@@ -161,18 +170,6 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
   }
 
   @Override
-  public void abort(String why, Throwable e) {
-LOG.warn("Aborting ReplicationHFileCleaner because " + why, e);
-this.aborted = true;
-stop(why);
-  }
-
-  @Override
-  public boolean isAborted() {
-return this.aborted;
-  }
-
-  @Override
   public boolean isFileDeletable(FileStatus fStat) {
 Set hfileRefsFromQueue;
 // all members of this class are null if replication is disabled,
@@ -190,4 +187,19 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 }
 return !hfileRefsFromQueue.contains(fStat.getPath().getName());
   }
+
+  private static class WarnOnlyAbortable implements Abortable {
+@Override
+public void abort(String why, Throwable e) {
+  LOG.warn("ReplicationHFileCleaner received abort, ignoring.  Reason: " + 
why);
+  if (LOG.isDebugEnabled()) {
+LOG.debug(e);
+  }
+}
+
+@Override
+public boolean isAborted() {
+  return false;
+}
+  }
 }


[31/52] [abbrv] hbase git commit: HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner

2016-04-08 Thread eclark
HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner


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

Branch: refs/heads/HBASE-14850
Commit: 33396c3629a83f2379a69f3a3b493ae8e6ee0a13
Parents: 79868bd
Author: Ashish Singhi 
Authored: Mon Apr 4 15:02:19 2016 +0530
Committer: Ashish Singhi 
Committed: Mon Apr 4 15:02:19 2016 +0530

--
 .../master/ReplicationHFileCleaner.java | 48 +-
 .../cleaner/TestReplicationHFileCleaner.java| 70 
 2 files changed, 100 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/33396c36/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
index 9bfea4b..5df9379 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
@@ -10,6 +10,7 @@
  */
 package org.apache.hadoop.hbase.replication.master;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -41,12 +42,11 @@ import org.apache.zookeeper.KeeperException;
  * deleting it from hfile archive directory.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
-public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate 
implements Abortable {
+public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate {
   private static final Log LOG = 
LogFactory.getLog(ReplicationHFileCleaner.class);
   private ZooKeeperWatcher zkw;
   private ReplicationQueuesClient rqc;
   private boolean stopped = false;
-  private boolean aborted;
 
   @Override
   public Iterable getDeletableFiles(Iterable files) {
@@ -129,18 +129,27 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 // Make my own Configuration. Then I'll have my own connection to zk that
 // I can close myself when time comes.
 Configuration conf = new Configuration(config);
+try {
+  setConf(conf, new ZooKeeperWatcher(conf, "replicationHFileCleaner", 
null));
+} catch (IOException e) {
+  LOG.error("Error while configuring " + this.getClass().getName(), e);
+}
+  }
+
+  @VisibleForTesting
+  public void setConf(Configuration conf, ZooKeeperWatcher zk) {
 super.setConf(conf);
 try {
-  initReplicationQueuesClient(conf);
+  initReplicationQueuesClient(conf, zk);
 } catch (IOException e) {
   LOG.error("Error while configuring " + this.getClass().getName(), e);
 }
   }
 
-  private void initReplicationQueuesClient(Configuration conf)
+  private void initReplicationQueuesClient(Configuration conf, 
ZooKeeperWatcher zk)
   throws ZooKeeperConnectionException, IOException {
-this.zkw = new ZooKeeperWatcher(conf, "replicationHFileCleaner", null);
-this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, this);
+this.zkw = zk;
+this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, new 
WarnOnlyAbortable());
   }
 
   @Override
@@ -161,18 +170,6 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
   }
 
   @Override
-  public void abort(String why, Throwable e) {
-LOG.warn("Aborting ReplicationHFileCleaner because " + why, e);
-this.aborted = true;
-stop(why);
-  }
-
-  @Override
-  public boolean isAborted() {
-return this.aborted;
-  }
-
-  @Override
   public boolean isFileDeletable(FileStatus fStat) {
 Set hfileRefsFromQueue;
 // all members of this class are null if replication is disabled,
@@ -190,4 +187,19 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 }
 return !hfileRefsFromQueue.contains(fStat.getPath().getName());
   }
+
+  private static class WarnOnlyAbortable implements Abortable {
+@Override
+public void abort(String why, Throwable e) {
+  LOG.warn("ReplicationHFileCleaner received abort, ignoring.  Reason: " + 
why);
+  if (LOG.isDebugEnabled()) {
+LOG.debug(e);
+  }
+}
+
+@Override
+public boolean isAborted() {
+  return false;
+}
+  }
 }


hbase git commit: HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner

2016-04-04 Thread ashishsinghi
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 643116d0b -> dc89473fa


HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner


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

Branch: refs/heads/branch-1.3
Commit: dc89473faf902897441e41552d727e081e5a94f5
Parents: 643116d
Author: Ashish Singhi 
Authored: Mon Apr 4 15:02:19 2016 +0530
Committer: Ashish Singhi 
Committed: Mon Apr 4 15:10:31 2016 +0530

--
 .../master/ReplicationHFileCleaner.java | 48 +-
 .../cleaner/TestReplicationHFileCleaner.java| 70 
 2 files changed, 100 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/dc89473f/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
index 9bfea4b..5df9379 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
@@ -10,6 +10,7 @@
  */
 package org.apache.hadoop.hbase.replication.master;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -41,12 +42,11 @@ import org.apache.zookeeper.KeeperException;
  * deleting it from hfile archive directory.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
-public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate 
implements Abortable {
+public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate {
   private static final Log LOG = 
LogFactory.getLog(ReplicationHFileCleaner.class);
   private ZooKeeperWatcher zkw;
   private ReplicationQueuesClient rqc;
   private boolean stopped = false;
-  private boolean aborted;
 
   @Override
   public Iterable getDeletableFiles(Iterable files) {
@@ -129,18 +129,27 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 // Make my own Configuration. Then I'll have my own connection to zk that
 // I can close myself when time comes.
 Configuration conf = new Configuration(config);
+try {
+  setConf(conf, new ZooKeeperWatcher(conf, "replicationHFileCleaner", 
null));
+} catch (IOException e) {
+  LOG.error("Error while configuring " + this.getClass().getName(), e);
+}
+  }
+
+  @VisibleForTesting
+  public void setConf(Configuration conf, ZooKeeperWatcher zk) {
 super.setConf(conf);
 try {
-  initReplicationQueuesClient(conf);
+  initReplicationQueuesClient(conf, zk);
 } catch (IOException e) {
   LOG.error("Error while configuring " + this.getClass().getName(), e);
 }
   }
 
-  private void initReplicationQueuesClient(Configuration conf)
+  private void initReplicationQueuesClient(Configuration conf, 
ZooKeeperWatcher zk)
   throws ZooKeeperConnectionException, IOException {
-this.zkw = new ZooKeeperWatcher(conf, "replicationHFileCleaner", null);
-this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, this);
+this.zkw = zk;
+this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, new 
WarnOnlyAbortable());
   }
 
   @Override
@@ -161,18 +170,6 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
   }
 
   @Override
-  public void abort(String why, Throwable e) {
-LOG.warn("Aborting ReplicationHFileCleaner because " + why, e);
-this.aborted = true;
-stop(why);
-  }
-
-  @Override
-  public boolean isAborted() {
-return this.aborted;
-  }
-
-  @Override
   public boolean isFileDeletable(FileStatus fStat) {
 Set hfileRefsFromQueue;
 // all members of this class are null if replication is disabled,
@@ -190,4 +187,19 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 }
 return !hfileRefsFromQueue.contains(fStat.getPath().getName());
   }
+
+  private static class WarnOnlyAbortable implements Abortable {
+@Override
+public void abort(String why, Throwable e) {
+  LOG.warn("ReplicationHFileCleaner received abort, ignoring.  Reason: " + 
why);
+  if (LOG.isDebugEnabled()) {
+LOG.debug(e);
+  }
+}
+
+@Override
+public 

hbase git commit: HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner

2016-04-04 Thread ashishsinghi
Repository: hbase
Updated Branches:
  refs/heads/branch-1 4bae771b6 -> e5fb045aa


HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner


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

Branch: refs/heads/branch-1
Commit: e5fb045aa9f56969f9ac0f444be90f92bde37af0
Parents: 4bae771
Author: Ashish Singhi 
Authored: Mon Apr 4 15:02:19 2016 +0530
Committer: Ashish Singhi 
Committed: Mon Apr 4 15:07:56 2016 +0530

--
 .../master/ReplicationHFileCleaner.java | 48 +-
 .../cleaner/TestReplicationHFileCleaner.java| 70 
 2 files changed, 100 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e5fb045a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
index 9bfea4b..5df9379 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
@@ -10,6 +10,7 @@
  */
 package org.apache.hadoop.hbase.replication.master;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -41,12 +42,11 @@ import org.apache.zookeeper.KeeperException;
  * deleting it from hfile archive directory.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
-public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate 
implements Abortable {
+public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate {
   private static final Log LOG = 
LogFactory.getLog(ReplicationHFileCleaner.class);
   private ZooKeeperWatcher zkw;
   private ReplicationQueuesClient rqc;
   private boolean stopped = false;
-  private boolean aborted;
 
   @Override
   public Iterable getDeletableFiles(Iterable files) {
@@ -129,18 +129,27 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 // Make my own Configuration. Then I'll have my own connection to zk that
 // I can close myself when time comes.
 Configuration conf = new Configuration(config);
+try {
+  setConf(conf, new ZooKeeperWatcher(conf, "replicationHFileCleaner", 
null));
+} catch (IOException e) {
+  LOG.error("Error while configuring " + this.getClass().getName(), e);
+}
+  }
+
+  @VisibleForTesting
+  public void setConf(Configuration conf, ZooKeeperWatcher zk) {
 super.setConf(conf);
 try {
-  initReplicationQueuesClient(conf);
+  initReplicationQueuesClient(conf, zk);
 } catch (IOException e) {
   LOG.error("Error while configuring " + this.getClass().getName(), e);
 }
   }
 
-  private void initReplicationQueuesClient(Configuration conf)
+  private void initReplicationQueuesClient(Configuration conf, 
ZooKeeperWatcher zk)
   throws ZooKeeperConnectionException, IOException {
-this.zkw = new ZooKeeperWatcher(conf, "replicationHFileCleaner", null);
-this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, this);
+this.zkw = zk;
+this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, new 
WarnOnlyAbortable());
   }
 
   @Override
@@ -161,18 +170,6 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
   }
 
   @Override
-  public void abort(String why, Throwable e) {
-LOG.warn("Aborting ReplicationHFileCleaner because " + why, e);
-this.aborted = true;
-stop(why);
-  }
-
-  @Override
-  public boolean isAborted() {
-return this.aborted;
-  }
-
-  @Override
   public boolean isFileDeletable(FileStatus fStat) {
 Set hfileRefsFromQueue;
 // all members of this class are null if replication is disabled,
@@ -190,4 +187,19 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 }
 return !hfileRefsFromQueue.contains(fStat.getPath().getName());
   }
+
+  private static class WarnOnlyAbortable implements Abortable {
+@Override
+public void abort(String why, Throwable e) {
+  LOG.warn("ReplicationHFileCleaner received abort, ignoring.  Reason: " + 
why);
+  if (LOG.isDebugEnabled()) {
+LOG.debug(e);
+  }
+}
+
+@Override
+public 

hbase git commit: HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner

2016-04-04 Thread ashishsinghi
Repository: hbase
Updated Branches:
  refs/heads/master 79868bd39 -> 33396c362


HBASE-15578 Handle HBASE-15234 for ReplicationHFileCleaner


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

Branch: refs/heads/master
Commit: 33396c3629a83f2379a69f3a3b493ae8e6ee0a13
Parents: 79868bd
Author: Ashish Singhi 
Authored: Mon Apr 4 15:02:19 2016 +0530
Committer: Ashish Singhi 
Committed: Mon Apr 4 15:02:19 2016 +0530

--
 .../master/ReplicationHFileCleaner.java | 48 +-
 .../cleaner/TestReplicationHFileCleaner.java| 70 
 2 files changed, 100 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/33396c36/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
index 9bfea4b..5df9379 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java
@@ -10,6 +10,7 @@
  */
 package org.apache.hadoop.hbase.replication.master;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -41,12 +42,11 @@ import org.apache.zookeeper.KeeperException;
  * deleting it from hfile archive directory.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
-public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate 
implements Abortable {
+public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate {
   private static final Log LOG = 
LogFactory.getLog(ReplicationHFileCleaner.class);
   private ZooKeeperWatcher zkw;
   private ReplicationQueuesClient rqc;
   private boolean stopped = false;
-  private boolean aborted;
 
   @Override
   public Iterable getDeletableFiles(Iterable files) {
@@ -129,18 +129,27 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 // Make my own Configuration. Then I'll have my own connection to zk that
 // I can close myself when time comes.
 Configuration conf = new Configuration(config);
+try {
+  setConf(conf, new ZooKeeperWatcher(conf, "replicationHFileCleaner", 
null));
+} catch (IOException e) {
+  LOG.error("Error while configuring " + this.getClass().getName(), e);
+}
+  }
+
+  @VisibleForTesting
+  public void setConf(Configuration conf, ZooKeeperWatcher zk) {
 super.setConf(conf);
 try {
-  initReplicationQueuesClient(conf);
+  initReplicationQueuesClient(conf, zk);
 } catch (IOException e) {
   LOG.error("Error while configuring " + this.getClass().getName(), e);
 }
   }
 
-  private void initReplicationQueuesClient(Configuration conf)
+  private void initReplicationQueuesClient(Configuration conf, 
ZooKeeperWatcher zk)
   throws ZooKeeperConnectionException, IOException {
-this.zkw = new ZooKeeperWatcher(conf, "replicationHFileCleaner", null);
-this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, this);
+this.zkw = zk;
+this.rqc = ReplicationFactory.getReplicationQueuesClient(zkw, conf, new 
WarnOnlyAbortable());
   }
 
   @Override
@@ -161,18 +170,6 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
   }
 
   @Override
-  public void abort(String why, Throwable e) {
-LOG.warn("Aborting ReplicationHFileCleaner because " + why, e);
-this.aborted = true;
-stop(why);
-  }
-
-  @Override
-  public boolean isAborted() {
-return this.aborted;
-  }
-
-  @Override
   public boolean isFileDeletable(FileStatus fStat) {
 Set hfileRefsFromQueue;
 // all members of this class are null if replication is disabled,
@@ -190,4 +187,19 @@ public class ReplicationHFileCleaner extends 
BaseHFileCleanerDelegate implements
 }
 return !hfileRefsFromQueue.contains(fStat.getPath().getName());
   }
+
+  private static class WarnOnlyAbortable implements Abortable {
+@Override
+public void abort(String why, Throwable e) {
+  LOG.warn("ReplicationHFileCleaner received abort, ignoring.  Reason: " + 
why);
+  if (LOG.isDebugEnabled()) {
+LOG.debug(e);
+  }
+}
+
+@Override
+public boolean