Skip to content

Commit

Permalink
[FLINK-35359][config] Make yarn.application-attempts Int type
Browse files Browse the repository at this point in the history
This closes #24815
  • Loading branch information
Sxnan authored and xintongsong committed May 23, 2024
1 parent fa8590d commit 4f1427c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<tr>
<td><h5>yarn.application-attempts</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>Integer</td>
<td>Number of ApplicationMaster restarts. By default, the value will be set to 1. If high availability is enabled, then the default value will be 2. The restart number is also limited by YARN (configured via <a href="https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-common/yarn-default.xml">yarn.resourcemanager.am.max-attempts</a>). Note that the entire Flink cluster will restart and the YARN Client will lose the connection.</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private YarnClusterDescriptor setupYarnClusterDescriptor() {
final Configuration flinkConfiguration = new Configuration();
flinkConfiguration.set(JobManagerOptions.TOTAL_PROCESS_MEMORY, MemorySize.ofMebiBytes(768));
flinkConfiguration.set(TaskManagerOptions.TOTAL_PROCESS_MEMORY, MemorySize.parse("1g"));
flinkConfiguration.set(YarnConfigOptions.APPLICATION_ATTEMPTS, "10");
flinkConfiguration.set(YarnConfigOptions.APPLICATION_ATTEMPTS, 10);
flinkConfiguration.set(HighAvailabilityOptions.HA_MODE, "zookeeper");
flinkConfiguration.set(HighAvailabilityOptions.HA_STORAGE_PATH, storageDir);
flinkConfiguration.set(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public class YarnConfigOptions {
* <p>>Note: This option returns a String since Integer options must have a static default
* value.
*/
public static final ConfigOption<String> APPLICATION_ATTEMPTS =
public static final ConfigOption<Integer> APPLICATION_ATTEMPTS =
key("yarn.application-attempts")
.stringType()
.intType()
.noDefaultValue()
.withDescription(
Description.builder()
Expand Down

0 comments on commit 4f1427c

Please sign in to comment.