Skip to content

Commit

Permalink
[FLINK-16605][core][config] Add slotmanager.max-number-of-slots confi…
Browse files Browse the repository at this point in the history
…g option
  • Loading branch information
KarmaGYZ authored and GJL committed Apr 29, 2020
1 parent 9cb1ebd commit 026a2b6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/_includes/generated/expert_scheduling_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@
<td>Long</td>
<td>The timeout in milliseconds for requesting a slot from Slot Pool.</td>
</tr>
<tr>
<td><h5>slotmanager.max-number-of-slots</h5></td>
<td style="word-wrap: break-word;">2147483647</td>
<td>Integer</td>
<td>Defines the maximum number of slots that the Flink cluster allocates. This configuration option is meant for limiting the resource consumption for batch workloads. It is not recommended to configure this option for streaming workloads, which may fail if there are not enough slots. Note that this configuration option does not take effect for standalone clusters, where how many slots are allocated is not controlled by Flink.</td>
</tr>
</tbody>
</table>
6 changes: 6 additions & 0 deletions docs/_includes/generated/resource_manager_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,11 @@
<td>Long</td>
<td>The timeout for an idle task manager to be released.</td>
</tr>
<tr>
<td><h5>slotmanager.max-number-of-slots</h5></td>
<td style="word-wrap: break-word;">2147483647</td>
<td>Integer</td>
<td>Defines the maximum number of slots that the Flink cluster allocates. This configuration option is meant for limiting the resource consumption for batch workloads. It is not recommended to configure this option for streaming workloads, which may fail if there are not enough slots. Note that this configuration option does not take effect for standalone clusters, where how many slots are allocated is not controlled by Flink.</td>
</tr>
</tbody>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.flink.configuration;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.annotation.docs.Documentation;
import org.apache.flink.configuration.description.Description;

/**
Expand Down Expand Up @@ -56,6 +57,16 @@ public class ResourceManagerOptions {
" default, the port of the JobManager, because the same ActorSystem is used." +
" Its not possible to use this configuration key to define port ranges.");

@Documentation.Section(Documentation.Sections.EXPERT_SCHEDULING)
public static final ConfigOption<Integer> MAX_SLOT_NUM = ConfigOptions
.key("slotmanager.max-number-of-slots")
.intType()
.defaultValue(Integer.MAX_VALUE)
.withDescription("Defines the maximum number of slots that the Flink cluster allocates. This configuration option " +
"is meant for limiting the resource consumption for batch workloads. It is not recommended to configure this option " +
"for streaming workloads, which may fail if there are not enough slots. Note that this configuration option does not take " +
"effect for standalone clusters, where how many slots are allocated is not controlled by Flink.");

/**
* The timeout for a slot request to be discarded, in milliseconds.
* @deprecated Use {@link JobManagerOptions#SLOT_REQUEST_TIMEOUT}.
Expand Down

0 comments on commit 026a2b6

Please sign in to comment.