You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "P. Taylor Goetz (JIRA)" <ji...@apache.org> on 2019/03/22 20:11:00 UTC
[jira] [Updated] (STORM-3339) Port all the AtomicReference to
ConcurrentHashMap for Nimbus
[ https://issues.apache.org/jira/browse/STORM-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
P. Taylor Goetz updated STORM-3339:
-----------------------------------
Fix Version/s: (was: 2.0.0)
> Port all the AtomicReference to ConcurrentHashMap for Nimbus
> ------------------------------------------------------------
>
> Key: STORM-3339
> URL: https://issues.apache.org/jira/browse/STORM-3339
> Project: Apache Storm
> Issue Type: Improvement
> Components: storm-core
> Affects Versions: 2.0.0
> Reporter: Danny Chan
> Assignee: Danny Chan
> Priority: Major
>
> Now for many concurrent access resource in Nimbus.java, we use AtomicReference to make them multi thread safe. The resources summarized below:
> 1. heartbeatsCache
> 2. schedulingStartTimeNs
> 3. idToSchedStatus
> 4. nodeIdToResources
> 5. idToWorkerResources
> 6. idToExecutors
> The 1, 4, 5 and 6 may grows huge if we have hundreds of topologies on cluster, when we update AtomicReference, actually we passed in a Function and use compareAndSet to update the whole val to the new returned by the Function, in that case, we must do a reference copy and merge the changes, which seems not necessary.
> I think the reason to use AtomicReference is a legacy from old Clojure code, we can replace them totally with ConcurrentHashMap which supported better performance.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)