This is an automated email from the ASF dual-hosted git repository.

dwysakowicz pushed a commit to branch release-1.6
in repository https://gitbox.apache.org/repos/asf/flink.git

commit def489554fc8e999a256ea2b1b0bd6e6f65345ff
Author: Dawid Wysakowicz <[email protected]>
AuthorDate: Fri Aug 10 13:06:37 2018 +0200

    [FLINK-9013] Document yarn.containers.vcores only being effective when 
adapting YARN config
---
 docs/_includes/generated/yarn_config_configuration.html     |  2 +-
 docs/ops/deployment/yarn_setup.md                           |  4 ++--
 .../apache/flink/yarn/configuration/YarnConfigOptions.java  | 13 ++++++++++---
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/docs/_includes/generated/yarn_config_configuration.html 
b/docs/_includes/generated/yarn_config_configuration.html
index fb16e53..bbe2549 100644
--- a/docs/_includes/generated/yarn_config_configuration.html
+++ b/docs/_includes/generated/yarn_config_configuration.html
@@ -30,7 +30,7 @@
         <tr>
             <td><h5>yarn.containers.vcores</h5></td>
             <td style="word-wrap: break-word;">-1</td>
-            <td>The number of virtual cores (vcores) per YARN container. By 
default, the number of vcores is set to the number of slots per TaskManager, if 
set, or to 1, otherwise.</td>
+            <td>The number of virtual cores (vcores) per YARN container. By 
default, the number of vcores is set to the number of slots per TaskManager, if 
set, or to 1, otherwise. In order for this parameter to be used your cluster 
must have CPU scheduling enabled. You can do this by setting the <span 
markdown="span">`org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler`</span>.</td>
         </tr>
         <tr>
             <td><h5>yarn.heartbeat-delay</h5></td>
diff --git a/docs/ops/deployment/yarn_setup.md 
b/docs/ops/deployment/yarn_setup.md
index 9c255d2..18e693e 100644
--- a/docs/ops/deployment/yarn_setup.md
+++ b/docs/ops/deployment/yarn_setup.md
@@ -131,8 +131,8 @@ Once Flink is deployed in your YARN cluster, it will show 
you the connection det
 Stop the YARN session by stopping the unix process (using CTRL+C) or by 
entering 'stop' into the client.
 
 Flink on YARN will only start all requested containers if enough resources are 
available on the cluster. Most YARN schedulers account for the requested memory 
of the containers,
-some account also for the number of vcores. By default, the number of vcores 
is equal to the processing slots (`-s`) argument. The `yarn.containers.vcores` 
allows overwriting the
-number of vcores with a custom value.
+some account also for the number of vcores. By default, the number of vcores 
is equal to the processing slots (`-s`) argument. The 
[`yarn.containers.vcores`]({{ site.baseurl 
}}/ops/config.html#yarn-containers-vcores) allows overwriting the
+number of vcores with a custom value. In order for this parameter to work you 
should enable CPU scheduling in your cluster.
 
 #### Detached YARN Session
 
diff --git 
a/flink-yarn/src/main/java/org/apache/flink/yarn/configuration/YarnConfigOptions.java
 
b/flink-yarn/src/main/java/org/apache/flink/yarn/configuration/YarnConfigOptions.java
index 255a6c7..b059475 100644
--- 
a/flink-yarn/src/main/java/org/apache/flink/yarn/configuration/YarnConfigOptions.java
+++ 
b/flink-yarn/src/main/java/org/apache/flink/yarn/configuration/YarnConfigOptions.java
@@ -19,8 +19,10 @@
 package org.apache.flink.yarn.configuration;
 
 import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.description.Description;
 
 import static org.apache.flink.configuration.ConfigOptions.key;
+import static org.apache.flink.configuration.description.TextElement.code;
 
 /**
  * This class holds configuration constants used by Flink's YARN runners.
@@ -63,9 +65,14 @@ public class YarnConfigOptions {
         */
        public static final ConfigOption<Integer> VCORES =
                key("yarn.containers.vcores")
-               .defaultValue(-1)
-               .withDescription("The number of virtual cores (vcores) per YARN 
container. By default, the number of vcores" +
-                       " is set to the number of slots per TaskManager, if 
set, or to 1, otherwise.");
+                       .defaultValue(-1)
+                       .withDescription(Description.builder().text(
+                                       "The number of virtual cores (vcores) 
per YARN container. By default, the number of vcores" +
+                                       " is set to the number of slots per 
TaskManager, if set, or to 1, otherwise. In order for this" +
+                                       " parameter to be used your cluster 
must have CPU scheduling enabled. You can do this by setting" +
+                                       " the %s.",
+                               
code("org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler"))
+                               .build());
 
        /**
         * The maximum number of failed YARN containers before entirely stopping

Reply via email to