[GitHub] dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] Document yarn.containers.vcores only being effective whe…

2018-08-14 Thread GitBox
dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] 
Document yarn.containers.vcores only being effective whe…
URL: https://github.com/apache/flink/pull/6294#discussion_r209925707
 
 

 ##
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/configuration/YarnConfigOptions.java
 ##
 @@ -63,9 +65,14 @@
 */
public static final ConfigOption 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"))
 
 Review comment:
   @GJL thanks for your comments.The original reason for introducing the 
DescriptionBuilder was not to embed html or markdown into the description so 
that we can format it differently in case we want to print it in Exception 
description. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] Document yarn.containers.vcores only being effective whe…

2018-08-09 Thread GitBox
dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] 
Document yarn.containers.vcores only being effective whe…
URL: https://github.com/apache/flink/pull/6294#discussion_r208969123
 
 

 ##
 File path: 
flink-core/src/main/java/org/apache/flink/configuration/description/HtmlFormatter.java
 ##
 @@ -34,9 +36,22 @@ protected void formatLineBreak(StringBuilder state) {
}
 
@Override
-   protected void formatText(StringBuilder state, String format, String[] 
elements) {
+   protected void formatText(
+   StringBuilder state,
+   String format,
+   String[] elements,
+   EnumSet styles) {
String escapedFormat = escapeCharacters(format);
+
+   StringBuilder prefix = new StringBuilder();
+   StringBuilder sufix = new StringBuilder();
+   if (styles.contains(TextElement.TextStyle.CODE)) {
+   prefix.append("");
+   sufix.append("");
+   }
 
 Review comment:
   That would make sense if we had more TextStyles, but as we don't have them 
I've changed it to your code snippet.
   
   Also fixed the typo.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] Document yarn.containers.vcores only being effective whe…

2018-08-07 Thread GitBox
dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] 
Document yarn.containers.vcores only being effective whe…
URL: https://github.com/apache/flink/pull/6294#discussion_r208142810
 
 

 ##
 File path: 
flink-core/src/main/java/org/apache/flink/configuration/description/TextElement.java
 ##
 @@ -53,6 +55,16 @@ public static TextElement text(String text) {
return new TextElement(text, Collections.emptyList());
}
 
+   /**
+* Tries to format the text as code.
+*
+* @return text element with applied formatting
+*/
+   public TextElement formatAsCode() {
 
 Review comment:
   I thought about it. The reason why I chose it as part of `TextElement` is 
that this way we could implement styles as e.g. div classes in a single node. 
With explicit element we would always need to model it as node hierarchy.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] Document yarn.containers.vcores only being effective whe…

2018-07-26 Thread GitBox
dawidwys commented on a change in pull request #6294: [FLINK-9013][docs] 
Document yarn.containers.vcores only being effective whe…
URL: https://github.com/apache/flink/pull/6294#discussion_r205459192
 
 

 ##
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/configuration/YarnConfigOptions.java
 ##
 @@ -65,7 +65,11 @@
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.");
+   " 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 e.g. by setting the " +
+   
"org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler or 
enabling " +
+   
"org.apache.hadoop.yarn.util.resource.DominantResourceCalculator for " +
+   
"org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler");
 
 Review comment:
   You were right @NicoK . The `DominantResourceCalculator` didn't work for me 
in 2.8.3. Sorry for the confusion.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services