sumitagrawl commented on code in PR #6752:
URL: https://github.com/apache/ozone/pull/6752#discussion_r1622314814


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/StorageContainerServiceProviderImpl.java:
##########
@@ -179,58 +185,80 @@ public DBCheckpoint getSCMDBSnapshot() {
         System.currentTimeMillis();
     File targetFile = new File(scmSnapshotDBParentDir, snapshotFileName +
             ".tar");
-
     try {
       if (!SCMHAUtils.isSCMHAEnabled(configuration)) {
-        SecurityUtil.doAsLoginUser(() -> {
-          try (InputStream inputStream = reconUtils.makeHttpCall(
-              connectionFactory, getScmDBSnapshotUrl(),
-              isOmSpnegoEnabled()).getInputStream()) {
-            FileUtils.copyInputStreamToFile(inputStream, targetFile);
-          }
-          return null;
-        });
+        fetchSCMDBSnapshotUsingHttpClient(targetFile);
         LOG.info("Downloaded SCM Snapshot from SCM");
       } else {

Review Comment:
   @nandakumar131 
   Recon is derived from SCM, So many code functionality is implicitly 
available in recon from scm code. We may need fix Recon before startup to know 
if SCM is in HA or not for others also.
   
   Also, this is used in freon , datanode, and cli tool via HAUtils for getting 
CA certificates. This can impact them as per code.
   
   This needs different solution, getting rid of this from all places.



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