swamirishi commented on code in PR #9169:
URL: https://github.com/apache/ozone/pull/9169#discussion_r2441230729
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -1426,6 +1431,79 @@ public static void invalidateCacheEntry(String cacheKey)
{
}
}
+ public List<String> getCompactionLogSstFiles(Path checkpointPath)
Review Comment:
We can directly pass the checkpoint OMMetadataManager initiazed using
https://github.com/apache/ozone/blob/da030c0fac84123ff7ebd15eb3edbaf6ba0e4aff/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java#L220
and access
https://github.com/apache/ozone/blob/da030c0fac84123ff7ebd15eb3edbaf6ba0e4aff/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java#L1668
which would avoid redundantly initializing this rocksdb open code
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServletInodeBasedXfer.java:
##########
@@ -486,13 +487,28 @@ private boolean writeDBToArchive(Set<String>
sstFilesToExclude, Path dbDir, Atom
*/
private DBCheckpoint createAndPrepareCheckpoint(Path tmpdir, boolean flush)
throws IOException {
// make tmp directories to contain the copies
- Path tmpCompactionLogDir =
tmpdir.resolve(getCompactionLogDir().getFileName());
Path tmpSstBackupDir = tmpdir.resolve(getSstBackupDir().getFileName());
+ Files.createDirectories(tmpSstBackupDir);
- // Create checkpoint and then copy the files so that it has all the
compaction entries and files.
+ // Create checkpoint.
DBCheckpoint dbCheckpoint = getDbStore().getCheckpoint(flush);
- FileUtils.copyDirectory(getCompactionLogDir().toFile(),
tmpCompactionLogDir.toFile());
- OmSnapshotUtils.linkFiles(getSstBackupDir().toFile(),
tmpSstBackupDir.toFile());
+
+ try {
+ RocksDBCheckpointDiffer differ =
getDbStore().getRocksDBCheckpointDiffer();
+ List<String> sstFiles =
Review Comment:
Create Checkpoint OmMetadataManager instance here
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -1426,6 +1431,79 @@ public static void invalidateCacheEntry(String cacheKey)
{
}
}
+ public List<String> getCompactionLogSstFiles(Path checkpointPath)
Review Comment:
This logic would be very simplified after that
--
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]