Sigma-Ma commented on code in PR #8512:
URL: https://github.com/apache/hbase/pull/8512#discussion_r3688015793
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalBackupManager.java:
##########
@@ -184,10 +184,10 @@ private List<String> getLogFilesForNewBackup(Map<String,
Long> olderTimestamps,
}
// Include the .oldlogs files too.
- FileStatus[] oldlogs = fs.listStatus(oldLogDir);
- for (FileStatus oldlog : oldlogs) {
- p = oldlog.getPath();
- currentLogFile = p.toString();
+ List<String> oldlogs = BackupUtils.getFiles(fs, oldLogDir, new
ArrayList<>(), path -> true);
Review Comment:
BackupUtils.parseHostFromOldLog now checks whether the parent directory is a
full ServerName and uses it to derive host:port. The existing filename parsing
is retained as the fallback for the flat oldWAL layout.
I also updated TestIncrementalBackupManager to use
oldWALs/<serverName>/wal.<timestamp>, so the regression test now covers the
hostless WAL filename case directly.
TestBackupUtils and TestIncrementalBackupManager both pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]