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

Yang Wang commented on FLINK-18899:
-----------------------------------

Hi [~wooplevip], thanks for creating this ticket. IIUC, the reason why we leave 
the default value of {{yarn.application-attempts}} to none is to configure it 
based on the HA configuration. If the users do not specify a explicitly value 
of {{yarn.application-attempts}}, then
 * For non-HA mode, we should set the attempt to 1 to make the application 
fail-fast. Because when a new jobmanager is launched, it could not recover from 
the latest checkpoint.
 * For HA mode, we should respect the configuration of Yarn and relaunch the 
jobmanager more than once.

 

We could update the description to show the default behavior. Does it make 
sense to you?

> The property yarn.application-attempts default value is not none
> ----------------------------------------------------------------
>
>                 Key: FLINK-18899
>                 URL: https://issues.apache.org/jira/browse/FLINK-18899
>             Project: Flink
>          Issue Type: Bug
>          Components: Deployment / YARN, Documentation
>    Affects Versions: 1.11.0
>            Reporter: Peng
>            Priority: Major
>
> The document 
> [https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/config.html#yarn-application-attempts]
>  shows the yarn.application-attempts default value is none, but I found codes 
> in  org.apache.flink.yarn.YarnClusterDescriptor class like below:
> {code:java}
> if (HighAvailabilityMode.isHighAvailabilityModeActivated(configuration)) {
>    // activate re-execution of failed applications
>    appContext.setMaxAppAttempts(
>          configuration.getInteger(
>                YarnConfigOptions.APPLICATION_ATTEMPTS.key(),
>                YarnConfiguration.DEFAULT_RM_AM_MAX_ATTEMPTS));
>    activateHighAvailabilitySupport(appContext);
> } else {
>    // set number of application retries to 1 in the default case
>    appContext.setMaxAppAttempts(
>          configuration.getInteger(
>                YarnConfigOptions.APPLICATION_ATTEMPTS.key(),
>                1));
> }
> {code}
> This means, if HA mode, the default value is from Yarn(default 2), otherwise 
> the default value is 1.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to