ArafatKhan2198 commented on code in PR #6640:
URL: https://github.com/apache/ozone/pull/6640#discussion_r1594238580


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java:
##########
@@ -366,6 +374,14 @@ connectionFactory, getOzoneManagerSnapshotUrl(),
       reconUtils.untarCheckpointFile(targetFile, untarredDbDir);
       FileUtils.deleteQuietly(targetFile);
 
+      // Validate the presence of required SST files
+      File[] sstFiles = untarredDbDir.toFile().listFiles((dir, name) -> 
name.endsWith(".sst"));
+      if (sstFiles == null || sstFiles.length == 0) {
+        LOG.warn("No SST files found in the OM snapshot directory: {}", 
untarredDbDir);
+        return null;
+      }
+      LOG.info("Valid OM snapshot with SST files found at: {}", untarredDbDir);

Review Comment:
   This gets printed only once when we are fetching the snapshot, should we set 
it to debug?



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