devmadhuu commented on code in PR #5037:
URL: https://github.com/apache/ozone/pull/5037#discussion_r1406107915
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OpenFileTableHandler.java:
##########
@@ -0,0 +1,144 @@
+package org.apache.hadoop.ozone.recon.tasks;
+
+import org.apache.commons.lang3.tuple.Triple;
+import org.apache.hadoop.hdds.utils.db.Table;
+import org.apache.hadoop.hdds.utils.db.TableIterator;
+import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+
+
+/**
+ * Manages records in the OpenFile Table, updating counts and sizes of
+ * open files in the backend.
+ */
+public class OpenFileTableHandler implements OmTableHandler {
+
+ private static final Logger LOG =
+ LoggerFactory.getLogger(OpenFileTableHandler.class);
+
+ @Override
+ public void handlePutEvent(OMDBUpdateEvent<String, Object> event,
+ String tableName,
+ Collection<String> sizeRelatedTables,
+ HashMap<String, Long> objectCountMap,
+ HashMap<String, Long> unreplicatedSizeCountMap,
Review Comment:
`replicatedSizeCountMap` and `unreplicatedSizeCountMap` variable name
convention seems confusing. We are storing only size not count here. Pls rename
and correct in all classes.
--
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]