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/04/09 07:19:38 UTC
[18/22] hbase git commit: HBASE-20271
ReplicationSourceWALReader.switched should use the file name instead of the
path object directly
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/6f13b28c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6f13b28c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6f13b28c
Branch: refs/heads/HBASE-20046-branch-2
Commit: 6f13b28c1988630e4ae7de70f613502cdbc3dfa1
Parents: 9369cf2
Author: zhangduo <zh...@apache.org>
Authored: Sat Mar 24 16:25:20 2018 +0800
Committer: zhangduo <zh...@apache.org>
Committed: Mon Apr 9 15:18:44 2018 +0800
----------------------------------------------------------------------
.../replication/regionserver/ReplicationSourceWALReader.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/6f13b28c/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)