You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2018/03/24 13:13:34 UTC

hbase git commit: HBASE-20271 ReplicationSourceWALReader.switched should use the file name instead of the path object directly

Repository: hbase
Updated Branches:
  refs/heads/master 64ccd2b29 -> c44e88686


HBASE-20271 ReplicationSourceWALReader.switched should use the file name instead of the path object directly


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

Branch: refs/heads/master
Commit: c44e88686084a60be7d4dd5afeabab22f7cddfd8
Parents: 64ccd2b
Author: zhangduo <zh...@apache.org>
Authored: Sat Mar 24 16:25:20 2018 +0800
Committer: zhangduo <zh...@apache.org>
Committed: Sat Mar 24 21:12:40 2018 +0800

----------------------------------------------------------------------
 .../replication/regionserver/ReplicationSourceWALReader.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c44e8868/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
index 2154856..7ba347f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
@@ -174,7 +174,8 @@ class ReplicationSourceWALReader extends Thread {
   }
 
   protected static final boolean switched(WALEntryStream entryStream, Path path) {
-    return !path.equals(entryStream.getCurrentPath());
+    Path newPath = entryStream.getCurrentPath();
+    return newPath == null || !path.getName().equals(newPath.getName());
   }
 
   protected WALEntryBatch readWALEntries(WALEntryStream entryStream)