> On 4月 18, 2016, 5:33 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py,
> >  line 137
> > <https://reviews.apache.org/r/45676/diff/1/?file=1324092#file1324092line137>
> >
> >     Add null checks and check reponse validity of  json_response before 
> > checking json_reponse['app']['state']
> 
> Masahiro Tanaka wrote:
>     Thank you for review !
>     I have a question, what do you mean `response validity of json_response` ?
> 
> Jayush Luniya wrote:
>     I meant check that the json_response has ['app'] node and further has 
> ['state'] node. 
>     
>     Example:
>     
>     json_response = { 'app' : { } }
>     json_response['app']['state']
>     Traceback (most recent call last):
>       File "<stdin>", line 1, in <module>
>     KeyError: 'state'

Thank you, I updated the patch


- Masahiro


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


On 4月 19, 2016, 11:52 p.m., Masahiro Tanaka wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45676/
> -----------------------------------------------------------
> 
> (Updated 4月 19, 2016, 11:52 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Jaimin Jetly, jun aoki, Jayush 
> Luniya, and Vitalyi Brodetskyi.
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> If yarn app state is not state or yarn app finalStatus is not succeeded, YARN 
> service check should fail.
> But in the YARN service_check.py, it doesn't fail because raise statement is 
> in try block and there is only `pass` in except block.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py
>  e8d98ab 
> 
> Diff: https://reviews.apache.org/r/45676/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Masahiro Tanaka
> 
>

Reply via email to