Skip to content

Commit

Permalink
[FLINK-18067][yarn] Change default value of yarnMinAllocationMB from …
Browse files Browse the repository at this point in the history
…zero to DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB

This closes apache#12444.
  • Loading branch information
Jiayi-Liao authored and xintongsong committed Jun 7, 2020
1 parent d25609d commit 674817c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,14 @@ private ClusterClientProvider<ApplicationId> deployInternal(
throw new YarnDeploymentException("Could not retrieve information about free cluster resources.", e);
}

final int yarnMinAllocationMB = yarnConfiguration.getInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 0);
final int yarnMinAllocationMB = yarnConfiguration.getInt(
YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB,
YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB);
if (yarnMinAllocationMB <= 0) {
throw new YarnDeploymentException("The minimum allocation memory "
+ "(" + yarnMinAllocationMB + " MB) configured via '" + YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB
+ "' should be greater than 0.");
}

final ClusterSpecification validClusterSpecification;
try {
Expand Down

0 comments on commit 674817c

Please sign in to comment.