diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index f070957a22a..db699c7d978 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -1612,10 +1612,13 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa if (this.replicationSourceHandler == this.replicationSinkHandler && this.replicationSourceHandler != null) { this.replicationSourceHandler.startReplicationService(); - } else if (this.replicationSourceHandler != null) { - this.replicationSourceHandler.startReplicationService(); - } else if (this.replicationSinkHandler != null) { - this.replicationSinkHandler.startReplicationService(); + } else { + if (this.replicationSourceHandler != null) { + this.replicationSourceHandler.startReplicationService(); + } + if (this.replicationSinkHandler != null) { + this.replicationSinkHandler.startReplicationService(); + } } // Start Server. This service is like leases in that it internally runs diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java index 258560ef9f2..37bb46e7bdb 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java @@ -220,7 +220,7 @@ public class ReplicationSink { * @param rows list of actions * @throws IOException */ - private void batch(TableName tableName, Collection> allRows) throws IOException { + protected void batch(TableName tableName, Collection> allRows) throws IOException { if (allRows.isEmpty()) { return; }