[
https://issues.apache.org/jira/browse/AMBARI-9965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tom Beerbower updated AMBARI-9965:
----------------------------------
Attachment: AMBARI-9965.patch
> RU - Improve performance for large cluster in StackVersionListener
> ------------------------------------------------------------------
>
> Key: AMBARI-9965
> URL: https://issues.apache.org/jira/browse/AMBARI-9965
> Project: Ambari
> Issue Type: Task
> Reporter: Tom Beerbower
> Assignee: Tom Beerbower
> Fix For: 2.0.0
>
> Attachments: AMBARI-9965.patch
>
>
> On a large cluster, all of the agents will heartbeat during registration at
> the same time, so the HearbeatHandler has to be fast. Right now, the logic to
> handle host versions is done as part of StackVersionListener, which uses the
> AmbariEventPublisher, and acquires a lock.
> *This means that the heartbeats will compete for the same lock in a piece of
> code that makes a lot of DB calls.*
> Use a separate EventBus since we should not listen for host version changes
> using AmbariEventPublisher
> We should also move HearbeatHandler.java (around line 520)
> {code}
> HostComponentVersionEvent event = new HostComponentVersionEvent(cl, scHost);
> ambariEventPublisher.publish(event);
> {code}
> inside the handleComponentVersionReceived() method.
> As an optimization, we should consider only registering the event if
> "previousVersion" differs from the new value.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)