From 335071f34225a4ce8b476c0fe9dbaf149ee142d9 Mon Sep 17 00:00:00 2001 From: anoopsamjohn Date: Tue, 19 Nov 2013 17:10:32 +0000 Subject: [PATCH] HBASE-9995 Not stopping ReplicationSink when using custom implementation for the ReplicationSink git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1543501 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop/hbase/regionserver/HRegionServer.java | 11 +++++++---- .../replication/regionserver/ReplicationSink.java | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) 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 bfa386aaea3..291b116c520 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 @@ -1878,10 +1878,13 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa if (this.replicationSourceHandler != null && this.replicationSourceHandler == this.replicationSinkHandler) { this.replicationSourceHandler.stopReplicationService(); - } else if (this.replicationSourceHandler != null) { - this.replicationSourceHandler.stopReplicationService(); - } else if (this.replicationSinkHandler != null) { - this.replicationSinkHandler.stopReplicationService(); + } else { + if (this.replicationSourceHandler != null) { + this.replicationSourceHandler.stopReplicationService(); + } + if (this.replicationSinkHandler != null) { + this.replicationSinkHandler.stopReplicationService(); + } } } 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 37bb46e7bdb..c3c7c0411c9 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 @@ -217,7 +217,7 @@ public class ReplicationSink { /** * Do the changes and handle the pool * @param tableName table to insert into - * @param rows list of actions + * @param allRows list of actions * @throws IOException */ protected void batch(TableName tableName, Collection> allRows) throws IOException {