From bed8fe7f51d2331041cc600cdf0571357db6dbbf Mon Sep 17 00:00:00 2001 From: Ashish Singhi Date: Sun, 14 Jan 2018 17:06:29 +0530 Subject: [PATCH 1/1] HBASE-19796 ReplicationSynUp tool is not replicating the data if the WAL is moved to splitting directory --- .../hadoop/hbase/replication/regionserver/ReplicationSource.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index d156a36..78b465c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -864,8 +864,13 @@ public class ReplicationSource extends Thread // We found the right new location LOG.info("Log " + this.currentPath + " still exists at " + possibleLogLocation); - // Breaking here will make us sleep since reader is null - // TODO why don't we need to set currentPath and call openReader here? + // When running ReplicationSyncUp tool, we should replicate the data from WAL + // which is moved to WAL splitting directory also. + if (stopper instanceof ReplicationSyncUp.DummyServer) { + // Open the log at the this location + this.currentPath = possibleLogLocation; + this.openReader(sleepMultiplier); + } return true; } } -- 2.7.4