-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31808/#review75610
-----------------------------------------------------------

Ship it!


Ship It!

- Jonathan Hurley


On March 6, 2015, 2:33 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31808/
> -----------------------------------------------------------
> 
> (Updated March 6, 2015, 2:33 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate 
> Cole.
> 
> 
> Bugs: AMBARI-9965
>     https://issues.apache.org/jira/browse/AMBARI-9965
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 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)
> 
>     HostComponentVersionEvent event = new HostComponentVersionEvent(cl, 
> scHost);
>     ambariEventPublisher.publish(event);
> 
> inside the handleComponentVersionReceived() method.
> 
> As an optimization, we should consider only registering the event if 
> "previousVersion" differs from the new value.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
>  539af00 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListener.java
>  5460092 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/publishers/VersionEventPublisher.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListenerTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/events/publishers/VersionEventPublisherTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/31808/diff/
> 
> 
> Testing
> -------
> 
> Manual tested upgrade.
> 
> New unit tests added.
> 
> All tests pass ...
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 34:25 min
> [INFO] Finished at: 2015-03-06T12:09:54-05:00
> [INFO] Final Memory: 45M/565M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>

Reply via email to