swamirishi commented on code in PR #8423:
URL: https://github.com/apache/ozone/pull/8423#discussion_r2084451570


##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdb/util/RdbUtil.java:
##########
@@ -49,4 +55,17 @@ public static Set<String> getSSTFilesForComparison(
         .map(lfm -> new File(lfm.path(), lfm.fileName()).getPath())
         .collect(Collectors.toCollection(HashSet::new));
   }
+
+  public static Map<Object, String> getSSTFilesWithInodesForComparison(final 
ManagedRocksDB rocksDB, List<String> cfs) {
+    return getLiveSSTFilesForCFs(rocksDB, cfs).stream()
+        .map(lfm -> {
+          File sstFile = new File(lfm.path(), lfm.fileName());
+          try {
+            Object inode = Files.readAttributes(sstFile.toPath(), 
BasicFileAttributes.class).fileKey();
+            return new AbstractMap.SimpleEntry<>(inode, sstFile.getPath());
+          } catch (IOException e) {
+            throw new UncheckedIOException("Failed to read inode for " + 
sstFile.getPath(), e);

Review Comment:
   Don't throw UncheckedIOException throw the actual IOException instead.



-- 
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]

Reply via email to