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/08 03:40:13 UTC
[15/20] 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/5510389b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5510389b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5510389b
Branch: refs/heads/HBASE-20046-branch-2
Commit: 5510389bf76dfcc14afa3411502ba0c58b1bc189
Parents: 2d5c0e2
Author: zhangduo <zh...@apache.org>
Authored: Sat Mar 24 16:25:20 2018 +0800
Committer: zhangduo <zh...@apache.org>
Committed: Sun Apr 8 11:21:41 2018 +0800
----------------------------------------------------------------------
.../replication/regionserver/ReplicationSourceWALReader.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/5510389b/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)