You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ga...@apache.org on 2020/04/29 08:23:48 UTC
[flink] 02/05: [FLINK-16605][core][config] Add
slotmanager.max-number-of-slots config option
This is an automated email from the ASF dual-hosted git repository.
gary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 026a2b6d8ed3aab5bc29d998ba6e585fa5b2d9ef
Author: Yangze Guo <ka...@gmail.com>
AuthorDate: Mon Mar 30 11:05:25 2020 +0800
[FLINK-16605][core][config] Add slotmanager.max-number-of-slots config option
---
docs/_includes/generated/expert_scheduling_section.html | 6 ++++++
docs/_includes/generated/resource_manager_configuration.html | 6 ++++++
.../apache/flink/configuration/ResourceManagerOptions.java | 11 +++++++++++
3 files changed, 23 insertions(+)
diff --git a/docs/_includes/generated/expert_scheduling_section.html b/docs/_includes/generated/expert_scheduling_section.html
index a29ad69..5991224 100644
--- a/docs/_includes/generated/expert_scheduling_section.html
+++ b/docs/_includes/generated/expert_scheduling_section.html
@@ -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>
diff --git a/docs/_includes/generated/resource_manager_configuration.html b/docs/_includes/generated/resource_manager_configuration.html
index cb79c38..5ab8e35 100644
--- a/docs/_includes/generated/resource_manager_configuration.html
+++ b/docs/_includes/generated/resource_manager_configuration.html
@@ -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>
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/ResourceManagerOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/ResourceManagerOptions.java
index 4af839f..f6342da 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/ResourceManagerOptions.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/ResourceManagerOptions.java
@@ -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;
/**
@@ -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}.