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


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ContainerKeyMapperHelper.java:
##########
@@ -125,17 +165,21 @@ public static boolean reprocess(OMMetadataManager 
omMetadataManager,
       Instant end = Instant.now();
       long durationMillis = Duration.between(start, end).toMillis();
       double durationSeconds = (double) durationMillis / 1000.0;
-      LOG.debug("Completed 'reprocess' for {}. Processed {} keys in {} ms ({} 
seconds).",
-          taskName, omKeyCount, durationMillis, durationSeconds);
-
-    } catch (IOException ioEx) {
-      LOG.error("Error populating Container Key data for {} in Recon DB.", 
taskName, ioEx);
+      long keysProcessed = omKeyCount.get();
+      double throughput = keysProcessed / Math.max(durationSeconds, 0.001);
+      
+      LOG.info("{}: Parallel reprocess completed. Processed {} keys in {} ms 
({} sec) - " +
+          "Throughput: {} keys/sec - Containers: {}, Container-Key mappings: 
{}",
+          taskName, keysProcessed, durationMillis, String.format("%.2f", 
durationSeconds),
+          String.format("%.2f", throughput), containerKeyCountMap.size(), 
containerKeyMap.size());
+    } catch (Exception ex) {
+      LOG.error("Error populating Container Key data for {} in Recon DB.", 
taskName, ex);
       return false;
     }
     return true;
   }
 
-  private static boolean checkAndCallFlushToDB(Map<ContainerKeyPrefix, 
Integer> containerKeyMap,
+  private static synchronized boolean 
checkAndCallFlushToDB(Map<ContainerKeyPrefix, Integer> containerKeyMap,

Review Comment:
   Thanks for the catch!
   have made the change by removing synchronized from method.



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