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 21548566cee..7ba347feb6c 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)