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

This commit is contained in:
zhangduo 2018-03-24 16:25:20 +08:00
parent 9369cf26eb
commit 6f13b28c19
1 changed files with 2 additions and 1 deletions

View File

@ -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)