smengcl commented on code in PR #4045:
URL: https://github.com/apache/ozone/pull/4045#discussion_r1049031220


##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -600,13 +638,14 @@ synchronized void processCompactionLogLine(String line) {
       // Read sequence number, and snapshot ID
       LOG.debug("Reading sequence number as snapshot generation, "
           + "and snapshot ID");
-      final String trimmedStr =
-          line.substring(COMPACTION_LOG_SEQNUM_LINE_PREFIX.length()).trim();
-      final Scanner input = new Scanner(trimmedStr);
-      // This would the snapshot generation for the nodes to come
-      reconstructionSnapshotGeneration = input.nextLong();
-      // This is the snapshotID assigned to every single CompactionNode to come
-      reconstructionLastSnapshotID = input.nextLine().trim();
+      String[] splits = line.split(" ");
+      assert (splits.length == 5);

Review Comment:
   We probably want to prepend `OM_DB_NAME` to `snapshotInfoTable` entries' 
`checkpointDir`. Currently, `SnapshotInfo#getCheckpointDirName` is only 
returning the suffix of the actual DB checkpoint. e.g. 
`-71d04800-7962-4e88-b0bc-ea54cfcd657c`
   
   This implies the read path here would need to be slightly modified as well:
   
   
https://github.com/apache/ozone/blob/229a915ea61c272ed60fcf5229aee6880933d0d9/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java#L308-L309
   
   We can do this in another jira.
   
   cc @neils-dev @GeorgeJahad 



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