sadanand48 commented on code in PR #8423:
URL: https://github.com/apache/ozone/pull/8423#discussion_r2085887719
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -1217,6 +1222,28 @@ Set<String> getDeltaFiles(OmSnapshot fromSnapshot,
toSnapshot.getSnapshotTableKey()));
}
+ private Set<String> getDiffFiles(OmSnapshot fromSnapshot, OmSnapshot
toSnapshot, List<String> tablesToLookUp) {
+ Set<String> diffFiles;
+ try {
+ Map<Object, String> fromSnapshotFiles =
getSSTFileMapForSnapshot(fromSnapshot, tablesToLookUp);
+ Map<Object, String> toSnapshotFiles =
getSSTFileMapForSnapshot(toSnapshot, tablesToLookUp);
+ diffFiles = Stream.concat(
+ fromSnapshotFiles.entrySet().stream()
+ .filter(e -> !toSnapshotFiles.containsKey(e.getKey())),
+ toSnapshotFiles.entrySet().stream()
+ .filter(e -> !fromSnapshotFiles.containsKey(e.getKey())))
+ .map(Map.Entry::getValue)
+ .collect(Collectors.toSet());
+ } catch (IOException e) {
+ // In case of exception during inode read use all files
+ LOG.error("Exception occurred while populating delta files for
snapDiff", e);
+ diffFiles = new HashSet<>();
+ diffFiles.addAll(getSSTFileListForSnapshot(fromSnapshot,
tablesToLookUp));
+ diffFiles.addAll(getSSTFileListForSnapshot(toSnapshot, tablesToLookUp));
Review Comment:
done. however for someone who doesn't have much context of code, I don't
think this log line makes much sense.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]