siddharthteotia commented on code in PR #10171:
URL: https://github.com/apache/pinot/pull/10171#discussion_r1092325667
##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java:
##########
@@ -79,44 +84,45 @@ public static class PerQueryCPUMemResourceUsageAccountant
extends Tracing.Defaul
return thread;
});
- // number of total threads
- private final int _numThreads;
private final PinotConfiguration _config;
- private final RunnerWorkerThreadOffsetProvider
_runnerWorkerThreadOffsetProvider;
- // query_id, task_id per runner/worker thread
- private final CPUMemThreadLevelAccountingObjects.TaskEntryHolder[]
_taskStatus;
+ private final ConcurrentHashMap<Thread,
CPUMemThreadLevelAccountingObjects.ThreadEntry> _threadEntriesMap
+ = new ConcurrentHashMap<>();
+
+ private final HashMap<String, Long> _finishedTaskCPUStatsAggregator = new
HashMap<>();
+ private final HashMap<String, Long> _finishedTaskMemStatsAggregator = new
HashMap<>();
+
+ private final ConcurrentHashMap<String, Long>
_concurrentTaskCPUStatsAggregator = new ConcurrentHashMap<>();
+ private final ConcurrentHashMap<String, Long>
_concurrentTaskMemStatsAggregator = new ConcurrentHashMap<>();
Review Comment:
(nit) suggest moving the concurrent structures together for readability
--
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]