You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by as...@apache.org on 2018/01/17 05:14:56 UTC

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

Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 28f811420 -> 04bb40824


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

Signed-off-by: Ashish Singhi <as...@apache.org>


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

Branch: refs/heads/branch-1.3
Commit: 04bb4082438faf87c19627a7109c714bf17113b1
Parents: 28f8114
Author: Ashish Singhi <as...@apache.org>
Authored: Wed Jan 17 10:43:42 2018 +0530
Committer: Ashish Singhi <as...@apache.org>
Committed: Wed Jan 17 10:43:42 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/04bb4082/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 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;
                 }
               }