> On Dec. 5, 2014, 2:49 p.m., Nate Cole wrote:
> > Overall, looks good - but these descriptions are way to wordy.  You don't 
> > have to say 'host-level' on every alert - especially when already defined 
> > as host-only.  Let the UI decide how best to describe a host-only thing.
> 
> Jonathan Hurley wrote:
>     The wording was not mine; I was just told what to put in :)

Nevermind then :)


> On Dec. 5, 2014, 2:49 p.m., Nate Cole wrote:
> > ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py, lines 
> > 101-105
> > <https://reviews.apache.org/r/28765/diff/1/?file=783857#file783857line101>
> >
> >     Seems weird to make people do a lower() every single time.  Maybe the 
> > argument 'state' should be .upper()'ed before passing to the function?
> 
> Jonathan Hurley wrote:
>     I didn't want to force a particular case for state before it was passed 
> in; seemed too error prone. So, once the state was in the function, I had two 
> choices:
>     - do a lower() on the RESULT_XXX
>     - do an upper() on state
>     
>     lower() seemed more right. Essentially I just needed an equalsIgnoreCase, 
> but I think this is the closest thing Python has to that. 
>     
>     So, if I don't want to pass in an upper()'d state, should I keep it 
> lower() or should I just hardcode 'ok' and 'warning' and 'critical' ?

Doesn't seem as though constants should be lower()'ed for comparison purposes.  
The  variable "result_state" should be passed in the function, not 
"reporting_state".  Then the subclasses can easily compare with constants.


- Nate


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


On Dec. 5, 2014, 2:37 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28765/
> -----------------------------------------------------------
> 
> (Updated Dec. 5, 2014, 2:37 p.m.)
> 
> 
> Review request for Ambari and Nate Cole.
> 
> 
> Bugs: AMBARI-8569
>     https://issues.apache.org/jira/browse/AMBARI-8569
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Adding descriptions to the alert JSON files. Also noticed an issue where a 
> missing reporting structure would cause the alert report back improper text.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py 67c1568 
>   ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py c8e7b3a 
>   ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py 764d40a 
>   ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py c967c8e 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py c340a53 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/FLUME/alerts.json 
> 86fb854 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/GANGLIA/alerts.json
>  05053a3 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HBASE/alerts.json 
> b8b8cab 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/alerts.json 
> f356426 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HIVE/alerts.json 
> 3c279a8 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/OOZIE/alerts.json 
> 478f887 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/YARN/alerts.json 
> e0100e5 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/ZOOKEEPER/alerts.json
>  be210ea 
>   
> ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/alerts.json
>  4639337 
>   
> ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/alerts.json 
> 3cf10d5 
>   ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/alerts.json 
> 541c0e5 
>   ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/alerts.json 
> f55e692 
>   
> ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/alerts.json
>  698560d 
>   
> ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/alerts.json 
> a8e63e8 
>   
> ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/alerts.json
>  be210ea 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/services/FLUME/alerts.json 
> 26f59bd 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/alerts.json
>  05053a3 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/alerts.json 
> b8b8cab 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json 
> 595ae9c 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/alerts.json 
> 6981de9 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/alerts.json 
> 3443dc4 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/alerts.json 
> 20ef1ca 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/alerts.json
>  be210ea 
>   ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/alerts.json 
> 6b3e96c 
>   ambari-server/src/main/resources/stacks/HDP/2.2/services/KAFKA/alerts.json 
> ad4af4f 
>   ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/alerts.json 
> 236875a 
> 
> Diff: https://reviews.apache.org/r/28765/diff/
> 
> 
> Testing
> -------
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 6.969 s
> [INFO] Finished at: 2014-12-05T10:44:03-05:00
> [INFO] Final Memory: 8M/81M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>

Reply via email to