You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Laszlo Puskas <lp...@hortonworks.com> on 2017/03/01 12:48:59 UTC

Re: Review Request 57147: Added support for processing custom command script timeout


> On Feb. 28, 2017, 6:32 p.m., Alejandro Fernandez wrote:
> >

Thanks Alejanro, i wasn't ware of that; I'll do the modification to the other approach then.


> On Feb. 28, 2017, 6:32 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml
> > Lines 64 (patched)
> > <https://reviews.apache.org/r/57147/diff/1/?file=1651734#file1651734line64>
> >
> >     What happens if a rebalance command is issued and one is already running?
> >     
> >     I don't want a process running on Ambari for up to 2 hours. And for very large clusters (1000+ nodes), it may still timeout.
> 
> Alejandro Fernandez wrote:
>     HDFS stores a file in /system/balancer.id while the balancer is on-going. As soon as it finishes, it is deleted.
>     You can use that to make the call return right away and run in the background, and also prevent subsequent calls from launching another rebalancer.

This is intended to be a workaround as the current implementation caused problems when the rebalancing process took a long time. While i also think that having long running custom command is not ideal, this approach seemed to be the right compromise on having some feedback from the process.

If two users trigger/start the rebalancing separately, the second will fail with "another balancer is running", as it happens today.


- Laszlo


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


On Feb. 28, 2017, 6:01 p.m., Laszlo Puskas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57147/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2017, 6:01 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Robert Levas, Sandor Magyari, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-20175
>     https://issues.apache.org/jira/browse/AMBARI-20175
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> HDFS rebalance operation can last for a long time (hours/days) thus when triggered from the UI the command may be timed out by the Ambari server.
> This behavior may confuse users, making them to trigger the rebalancer again which will fail with "another balancer is running"  error.
> 
> The patch provides support for setting a reasonably long timeout for the rebalance custo action so that Ambari server doesnt time out the command.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java 867ebff 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml fd7f2f6 
> 
> 
> Diff: https://reviews.apache.org/r/57147/diff/1/
> 
> 
> Testing
> -------
> 
> Unit tests OK.
> Manually tested on local dev-env.
> 
> 
> Thanks,
> 
> Laszlo Puskas
> 
>