ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole" <nc...@hortonworks.com>
Subject Re: Review Request 22488: Ambari should return alerts for Flume
Date Thu, 12 Jun 2014 14:51:18 GMT


> On June 12, 2014, 10:39 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/resources/stacks/HDP/2.0.6/services/FLUME/package/scripts/flume_handler.py,
line 67
> > <https://reviews.apache.org/r/22488/diff/1/?file=607868#file607868line67>
> >
> >     It's not easy to tell from the flume_status() function if 'name' includes a
PID identifier. If it doesn't, then we should have PID identifier in this structure so that
we can tell one flume process from another.

The flume agent name is a unique identifier.  PID doesn't tell you which one has which state
in the UI ("Flume Agent is running with PID 1234"), and we won't know a PID for a non-running
instance ("Flume Agent has no PID" or "Flume Agent is not running on PID 1234").  The instance
attribute can be any string.


> On June 12, 2014, 10:39 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java, line 51
> > <https://reviews.apache.org/r/22488/diff/1/?file=607864#file607864line51>
> >
> >     The switch statement on getState() assumes not-null. I'd do a null check here
and keep AlertState.UNKNOWN if the passed in state was null.

The passed Alert class defaults to UNKNOWN.  Since this is a temporary bridge, I think it's
ok to assume non-null.


> On June 12, 2014, 10:39 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java, line 136
> > <https://reviews.apache.org/r/22488/diff/1/?file=607864#file607864line136>
> >
> >     For equality checks, would just comparing Alert.class == o.class be better?
isInstance(...) will return true on subclasses as well I think and that might lead to side
effects if we don't want subclasses being equal to a parent instance.

Even subclasses must meet these conditions if equals() is not overridden.


> On June 12, 2014, 10:39 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java,
line 1581
> > <https://reviews.apache.org/r/22488/diff/1/?file=607867#file607867line1581>
> >
> >     I agree that clusterAlters needs a ReadWriteLock; but here we're using the cluster's
ReadWriteLock. 
> >     
> >     The clusterAlerts data structure could have its own in this case and be isolated
from cluster locking.

I agree, but that doesn't follow how we do locking elsewhere (not that those are correct either).
 What about using a CopyOnWriteArraySet or something?


- Nate


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


On June 11, 2014, 9:15 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22488/
> -----------------------------------------------------------
> 
> (Updated June 11, 2014, 9:15 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Sid Wagle.
> 
> 
> Bugs: AMBARI-6092
>     https://issues.apache.org/jira/browse/AMBARI-6092
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add the ability for agents (in this case, Flume) to return Alert information to Ambari.
> * Only reports alerts and shows them in the UI.  Another JIRA will actually get the alerts
to Nagios for distribution.
> * This is the first step of a much larger design with eventual removal of Nagios collecting
alerts, so this patch may get refactored as we go, but is a good first step.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py 9defc7d 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 5c433f9 
>   ambari-server/src/main/java/org/apache/ambari/server/agent/AgentAlert.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/agent/ComponentStatus.java 292247f

>   ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java 0f4acd7

>   ambari-server/src/main/java/org/apache/ambari/server/controller/nagios/NagiosAlert.java
ba637c2 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/nagios/NagiosPropertyProvider.java
ba7309a 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java e1a3e42 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
f7e31b2 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/FLUME/package/scripts/flume_handler.py
19d4afa 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-servicegroups.cfg.j2
49e8fb0 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-services.cfg.j2
8ab3f7a 
>   ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
090aa81 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/nagios/NagiosPropertyProviderTest.java
b16457d 
>   ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py d0df762 
> 
> Diff: https://reviews.apache.org/r/22488/diff/
> 
> 
> Testing
> -------
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:54.202s
> [INFO] Finished at: Wed Jun 11 18:24:40 EDT 2014
> [INFO] Final Memory: 21M/123M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message