You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Tom Beerbower (JIRA)" <ji...@apache.org> on 2015/03/06 20:27:38 UTC
[jira] [Created] (AMBARI-9965) RU - Improve performance for large
cluster in StackVersionListener
Tom Beerbower created AMBARI-9965:
-------------------------------------
Summary: 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
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 heatbeats 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)