diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java index 0d47d313471..3ff7a1888a6 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java @@ -239,9 +239,9 @@ public class Replication implements WALActionsListener, return; } String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS); - if (!plugins.contains(ReplicationLogCleaner.class.toString())) { - conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS, - plugins + "," + ReplicationLogCleaner.class.getCanonicalName()); + String cleanerClass = ReplicationLogCleaner.class.getCanonicalName(); + if (!plugins.contains(cleanerClass)) { + conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + "," + cleanerClass); } }