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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServletInodeBasedXfer.java:
##########
@@ -371,13 +370,6 @@ private static void writeHardlinkFile(OzoneConfiguration 
conf, Map<String, Strin
       Path p = Paths.get(entry.getKey());
       String fileId = entry.getValue();
       Path relativePath = metaDirPath.relativize(p);
-      // if the file is in "om.db" directory, strip off the 'o
-      // m.db' name from the path
-      // and only keep the file name as this would be created in the current 
dir of the untarred dir
-      // on the follower.
-      if (relativePath.startsWith(OM_DB_NAME)) {
-        relativePath = relativePath.getFileName();
-      }
       sb.append(relativePath).append('\t').append(fileId).append('\n');

Review Comment:
   Move this to "\t" delmiter to a constant



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/RDBSnapshotProvider.java:
##########
@@ -121,13 +122,13 @@ public DBCheckpoint downloadDBSnapshotFromLeader(String 
leaderNodeID)
       numDownloaded.incrementAndGet();
       injectPause();
 
-      RocksDBCheckpoint checkpoint = getCheckpointFromSnapshotFile(targetFile,
+      Path unTarredDb = untarContentsOfTarball(targetFile,
           candidateDir, true);
       LOG.info("Successfully untar the downloaded snapshot {} at {}.",
-          targetFile, checkpoint.getCheckpointLocation());
-      if (ratisSnapshotComplete(checkpoint.getCheckpointLocation())) {
+          targetFile, unTarredDb.toAbsolutePath());
+      if (ratisSnapshotComplete(unTarredDb)) {
         LOG.info("Ratis snapshot transfer is complete.");
-        return checkpoint;
+        return new InodeMetadataRocksDBCheckpoint(unTarredDb);

Review Comment:
   Don't send InodeMetadaROcksDBCheckpoint here. It is the job of the 
OmRatisSnapshotProvider to initialize this. Overide the method 
getCheckpointFromSnapshotFile



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/RDBSnapshotProvider.java:
##########
@@ -185,14 +186,29 @@ public String getSnapshotFileName(String leaderNodeID) {
    */
   public RocksDBCheckpoint getCheckpointFromSnapshotFile(File snapshot,
       File untarDir, boolean deleteSnapshot) throws IOException {
+    Path untarredDbDir = untarContentsOfTarball(snapshot, untarDir, 
deleteSnapshot);

Review Comment:
   nit: We don't need to change this implementation at all.



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