sidkhillon commented on code in PR #7346:
URL: https://github.com/apache/hbase/pull/7346#discussion_r2399317164
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java:
##########
@@ -252,9 +255,24 @@ private void updateFileLists(List<String> activeFiles,
List<String> archiveFiles
}
}
- if (newlyArchived.size() > 0) {
+ if (!newlyArchived.isEmpty()) {
+ String rootDir = CommonFSUtils.getRootDir(conf).toString();
+
activeFiles.removeAll(newlyArchived);
- archiveFiles.addAll(newlyArchived);
+ for (String file : newlyArchived) {
+ String archivedFile = file.substring(rootDir.length() + 1);
+ Path archivedFilePath = new
Path(HFileArchiveUtil.getArchivePath(conf), archivedFile);
+ archivedFile = archivedFilePath.toString();
+
+ if (!fs.exists(archivedFilePath)) {
+ throw new IOException(
+ String.format("File %s not longer exists, and no archived file %s
exists for it", file,
Review Comment:
Whoops, just fixed that. Thanks for the review!
--
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]