sadanand48 commented on code in PR #8423: URL: https://github.com/apache/ozone/pull/8423#discussion_r2084453612
########## 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: lambda doesnt allow throwing a checked (Actual IOException) ########## 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: lambda doesn't allow throwing a checked (Actual IOException) -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org