Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 1a97b33e1 -> 45e99ffa6


HBASE-19796 ReplicationSynUp tool is not replicating the data if the WAL is 
moved to splitting directory

Signed-off-by: Ashish Singhi <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/45e99ffa
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/45e99ffa
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/45e99ffa

Branch: refs/heads/branch-1.2
Commit: 45e99ffa68c9a7dd71173ffcb707110898950802
Parents: 1a97b33
Author: Ashish Singhi <[email protected]>
Authored: Wed Jan 17 10:47:04 2018 +0530
Committer: Ashish Singhi <[email protected]>
Committed: Wed Jan 17 10:48:14 2018 +0530

----------------------------------------------------------------------
 .../hbase/replication/regionserver/ReplicationSource.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/45e99ffa/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
----------------------------------------------------------------------
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 4175ad2..ff79976 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
@@ -780,8 +780,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;
                 }
               }

Reply via email to