devmadhuu commented on code in PR #3974:
URL: https://github.com/apache/ozone/pull/3974#discussion_r1031041661


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskDbEventHandler.java:
##########
@@ -194,4 +204,24 @@ protected void handleDeleteDirEvent(OmDirectoryInfo 
directoryInfo,
     nsSummary.removeChildDir(objectId);
     nsSummaryMap.put(parentObjectId, nsSummary);
   }
+
+  protected boolean flushAndCommitNSToDB(Map<Long, NSSummary> nsSummaryMap) {
+    try {
+      writeNSSummariesToDB(nsSummaryMap);
+    } catch (IOException e) {
+      LOG.error("Unable to write Namespace Summary data in Recon DB.", e);
+      return false;
+    }
+    return true;
+  }
+
+  protected boolean checkAndCallFlushToDB(
+      Map<Long, NSSummary> nsSummaryMap) {
+    // if map contains more than entries, flush to DB and clear the map

Review Comment:
   done @szetszwo 



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