You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by an...@apache.org on 2013/11/16 08:40:51 UTC

svn commit: r1542472 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase: regionserver/HRegionServer.java replication/regionserver/ReplicationSink.java

Author: anoopsamjohn
Date: Sat Nov 16 07:40:51 2013
New Revision: 1542472

URL: http://svn.apache.org/r1542472
Log:
HBASE-9975 Not starting ReplicationSink when using custom implementation for the ReplicationSink

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1542472&r1=1542471&r2=1542472&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Sat Nov 16 07:40:51 2013
@@ -1612,10 +1612,13 @@ public class HRegionServer implements Cl
     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

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java?rev=1542472&r1=1542471&r2=1542472&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java Sat Nov 16 07:40:51 2013
@@ -220,7 +220,7 @@ public class ReplicationSink {
    * @param rows list of actions
    * @throws IOException
    */
-  private void batch(TableName tableName, Collection<List<Row>> allRows) throws IOException {
+  protected void batch(TableName tableName, Collection<List<Row>> allRows) throws IOException {
     if (allRows.isEmpty()) {
       return;
     }