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:39:57 UTC
svn commit: r1542470 - in
/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase:
regionserver/HRegionServer.java replication/regionserver/ReplicationSink.java
Author: anoopsamjohn
Date: Sat Nov 16 07:39:57 2013
New Revision: 1542470
URL: http://svn.apache.org/r1542470
Log:
HBASE-9975 Not starting ReplicationSink when using custom implementation for the ReplicationSink
Modified:
hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1542470&r1=1542469&r2=1542470&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Sat Nov 16 07:39:57 2013
@@ -1713,10 +1713,13 @@ public class HRegionServer implements HR
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/branches/0.94/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java?rev=1542470&r1=1542469&r2=1542470&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java Sat Nov 16 07:39:57 2013
@@ -203,7 +203,7 @@ public class ReplicationSink {
* @param rows list of actions
* @throws IOException
*/
- private void batch(byte[] tableName, Collection<List<Row>> allRows) throws IOException {
+ protected void batch(byte[] tableName, Collection<List<Row>> allRows) throws IOException {
if (allRows.isEmpty()) {
return;
}