You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/07/01 15:34:13 UTC

[GitHub] [flink] zentol commented on a change in pull request #8937: [FLINK-13040] promote blink table config and add to document

zentol commented on a change in pull request #8937: [FLINK-13040] promote blink table config and add to document
URL: https://github.com/apache/flink/pull/8937#discussion_r299098271
 
 

 ##########
 File path: flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java
 ##########
 @@ -260,10 +262,26 @@ private static String toHtmlTable(final List<OptionWithMetaInfo> options) {
 	private static String toHtmlString(final OptionWithMetaInfo optionWithMetaInfo) {
 		ConfigOption<?> option = optionWithMetaInfo.option;
 		String defaultValue = stringifyDefault(optionWithMetaInfo);
+		Documentation.TableOption tableOption = optionWithMetaInfo.field.getAnnotation(Documentation.TableOption.class);
+		StringBuilder sb = new StringBuilder();
+		if (tableOption != null) {
+			Documentation.ExecMode execMode = tableOption.execMode();
+			if (Documentation.ExecMode.BATCH.equals(execMode) || Documentation.ExecMode.STREAMING.equals(execMode)) {
+				sb.append("<br> <span class=\"label label-primary\">")
+						.append(execMode.toString())
+						.append("</span>");
+			} else if (Documentation.ExecMode.BOTH.equals(execMode)) {
 
 Review comment:
   unnecessarily complex if statement.
   Either use
   ```
   if (BOTH.equals(execMode) {
   ...
   } else {
   ...
   }
   ```
   or introduce a switch statement with a fast-failing default branch.

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


With regards,
Apache Git Services