devmadhuu commented on code in PR #7743:
URL: https://github.com/apache/ozone/pull/7743#discussion_r1952329889
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OmTableInsightTask.java:
##########
@@ -157,35 +166,32 @@ public Collection<String> getTaskTables() {
@Override
public Pair<String, Boolean> process(OMUpdateEventBatch events) {
Iterator<OMDBUpdateEvent> eventIterator = events.getIterator();
- // Initialize maps to store count and size information
- HashMap<String, Long> objectCountMap = initializeCountMap();
- HashMap<String, Long> unReplicatedSizeMap = initializeSizeMap(false);
- HashMap<String, Long> replicatedSizeMap = initializeSizeMap(true);
- final Collection<String> taskTables = getTaskTables();
Review Comment:
@sumitagrawl thanks for pointing it out. This edge case for startup of
Recon in existing DB case has been taken care now.
Though taskTables() have data already initialized and kept in memory, but
we are always returning with new ArrayList and it is short lived object and
creating som many objects of array list in frequent process call when high TPS
should be avoided.
--
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]