> On July 20, 2017, 9:40 a.m., Jonathan Hurley wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/check_process_status.py
> > Lines 74-77 (patched)
> > <https://reviews.apache.org/r/60995/diff/1/?file=1780253#file1780253line74>
> >
> >     Do we have a reusable timer class which repeats? This might be a good 
> > time to write one. Nothing wrong with the sleep/while loop, but we might be 
> > able to write something more reusable. Your call.
> >     
> >     If we keep this, then is 0.1s too aggresive? Could we make it 1s 
> > instead?
> 
> Dmitro Lisnichenko wrote:
>     we have a @retry annotation, it fits most cases. In current case, we need 
> a custom exception handling during retries. It's used only in 2 places. Also, 
> imho moving both retry loop body and exception handlers to method signature 
> as lambdas would make calling code too complicated. So I'd go with current 
> simpler variant.

Makes sense ... Thanks Dmitro


- Jonathan


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


On July 21, 2017, 11:23 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60995/
> -----------------------------------------------------------
> 
> (Updated July 21, 2017, 11:23 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-21532
>     https://issues.apache.org/jira/browse/AMBARI-21532
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> PID file delete happens before the call to check status.
> 
> {code}
> ...
> 2017-07-06 00:03:21,004 - 
> File['/var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid'] {'action': ['delete']}
> 2017-07-06 00:05:21,103 - Waiting for actual component stop
> 2017-07-06 00:05:21,104 - Pid file 
> /var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid is empty or does not exist
> {code}
> 
> 
> Diffs
> -----
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/check_process_status.py
>  7961f008ca 
>   
> ambari-common/src/main/python/resource_management/libraries/script/script.py 
> 2b374c5cff 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
>  d861ba93a5 
>   
> ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/utils.py
>  53774c661a 
>   
> ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/utils.py
>  7dcbca8d5b 
> 
> 
> Diff: https://reviews.apache.org/r/60995/diff/2/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>

Reply via email to