HBASE-23045 currentPath may be stitched in a loop in replication source code. (#1006)

Co-authored-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Gkkkk302 2020-01-28 23:15:25 +05:30 committed by Viraj Jasani
parent dfe636017d
commit 66f1658167
No known key found for this signature in database
GPG Key ID: E906DFF511D3E5DB
1 changed files with 3 additions and 2 deletions

View File

@ -938,8 +938,9 @@ public class ReplicationSource extends Thread implements ReplicationSourceInterf
Path p = rs.getPath();
FileStatus[] logs = fs.listStatus(p);
for (FileStatus log : logs) {
String logName = log.getPath().getName();
if (logName.equals(path.getName())) {
p = new Path(p, log.getPath().getName());
if (p.getName().equals(path.getName())) {
LOG.info("Log " + p.getName() + " found at " + p);
return p;
}