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 64ccd2b295
commit c44e886860
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)