[ 
https://issues.apache.org/jira/browse/HADOOP-13001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15226007#comment-15226007
 ] 

Steve Loughran commented on HADOOP-13001:
-----------------------------------------

that would be good. What I wanted was to set the RM client up to have a policy 
of try once then fail —no retry—, but as the retry policy is hard coded, all I 
can do is change the timeouts. Setting interval=0 triggers this.

Setting maxwait=0 and interval=1 works, though you get warned that as maxwait < 
interval, you don't get any retries.

I think I'd like there special case of "maxwait=0" to be recognised as "you 
don't want retries". 
If you do have a maxwait >0, and an interval ==0, well, you do have a problem 
in your configuration, don't you? That could be be rejected more gracefully 
than a division by zero exception.

> RetryPolicies$RetryUpToMaximumTimeWithFixedSleep raises division by zero 
> exception if the sleep time is 0, even if max wait == 0
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-13001
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13001
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc
>    Affects Versions: 2.7.2
>            Reporter: Steve Loughran
>
> set YARN RM max wait and retry intervals to 0, try to talk to an RM, get an 
> arithmetic exception
> {code}
> Caused by: java.lang.ArithmeticException: / by zero
>         at 
> org.apache.hadoop.io.retry.RetryPolicies$RetryUpToMaximumTimeWithFixedSleep.<init>(RetryPolicies.java:265)
>         at 
> org.apache.hadoop.io.retry.RetryPolicies.retryUpToMaximumTimeWithFixedSleep(RetryPolicies.java:89)
>         at 
> org.apache.hadoop.yarn.client.RMProxy.createRetryPolicy(RMProxy.java:237)
>         at 
> org.apache.hadoop.yarn.client.RMProxy.createRMProxy(RMProxy.java:91)
>         at 
> org.apache.hadoop.yarn.client.ClientRMProxy.createRMProxy(ClientRMProxy.java:72)
>         at 
> org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.serviceStart(YarnClientImpl.java:188)
>         at 
> org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
>         at 
> org.apache.spark.deploy.history.yarn.server.YarnHistoryProvider.initYarnClient(YarnHistoryProvider.scala:931)
>         at 
> org.apache.spark.deploy.history.yarn.server.YarnHistoryProvider.init(YarnHistoryProvider.scala:296)
> {code}
> I'd have expected the code to recognise the caller is saying "don't retry", 
> but clearly not



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to