You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/09/17 10:05:50 UTC

[flink] branch master updated (4f219f4 -> d18fd22)

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

trohrmann pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from 4f219f4  [FLINK-10222] [table] Fix parsing of keywords.
     new 92b914c  [FLINK-10215]Add configuration of java option  for historyserver
     new d18fd22  [hotfix] Add description to java.env.opts.*

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/_includes/generated/environment_configuration.html   | 11 ++++++++---
 docs/monitoring/application_profiling.md                  |  2 +-
 .../java/org/apache/flink/configuration/CoreOptions.java  | 15 ++++++++++++---
 flink-dist/src/main/flink-bin/bin/config.sh               |  8 ++++++++
 flink-dist/src/main/flink-bin/bin/historyserver.sh        |  1 +
 5 files changed, 30 insertions(+), 7 deletions(-)


[flink] 02/02: [hotfix] Add description to java.env.opts.*

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit d18fd222cba3dcca90f326398dc9ae37b6267610
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Fri Sep 14 21:46:00 2018 +0200

    [hotfix] Add description to java.env.opts.*
---
 docs/_includes/generated/environment_configuration.html          | 6 +++---
 .../main/java/org/apache/flink/configuration/CoreOptions.java    | 9 ++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/docs/_includes/generated/environment_configuration.html b/docs/_includes/generated/environment_configuration.html
index ca70a2b..a54955c 100644
--- a/docs/_includes/generated/environment_configuration.html
+++ b/docs/_includes/generated/environment_configuration.html
@@ -15,7 +15,7 @@
         <tr>
             <td><h5>env.java.opts</h5></td>
             <td style="word-wrap: break-word;">(none)</td>
-            <td></td>
+            <td>Java options to start the JVM of all Flink processes with.</td>
         </tr>
         <tr>
             <td><h5>env.java.opts.historyserver</h5></td>
@@ -25,12 +25,12 @@
         <tr>
             <td><h5>env.java.opts.jobmanager</h5></td>
             <td style="word-wrap: break-word;">(none)</td>
-            <td></td>
+            <td>Java options to start the JVM of the JobManager with.</td>
         </tr>
         <tr>
             <td><h5>env.java.opts.taskmanager</h5></td>
             <td style="word-wrap: break-word;">(none)</td>
-            <td></td>
+            <td>Java options to start the JVM of the TaskManager with.</td>
         </tr>
         <tr>
             <td><h5>env.log.dir</h5></td>
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
index 37db9f2..9ae807e 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
@@ -131,15 +131,18 @@ public class CoreOptions {
 
 	public static final ConfigOption<String> FLINK_JVM_OPTIONS = ConfigOptions
 		.key("env.java.opts")
-		.defaultValue("");
+		.defaultValue("")
+		.withDescription(Description.builder().text("Java options to start the JVM of all Flink processes with.").build());
 
 	public static final ConfigOption<String> FLINK_JM_JVM_OPTIONS = ConfigOptions
 		.key("env.java.opts.jobmanager")
-		.defaultValue("");
+		.defaultValue("")
+		.withDescription(Description.builder().text("Java options to start the JVM of the JobManager with.").build());
 
 	public static final ConfigOption<String> FLINK_TM_JVM_OPTIONS = ConfigOptions
 		.key("env.java.opts.taskmanager")
-		.defaultValue("");
+		.defaultValue("")
+		.withDescription(Description.builder().text("Java options to start the JVM of the TaskManager with.").build());
 
 	public static final ConfigOption<String> FLINK_HS_JVM_OPTIONS = ConfigOptions
 		.key("env.java.opts.historyserver")


[flink] 01/02: [FLINK-10215]Add configuration of java option for historyserver

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 92b914c560ca59ee26051db134d29f8139c3144c
Author: liuxianjiao <li...@zte.com.cn>
AuthorDate: Sat Aug 25 16:23:27 2018 +0800

    [FLINK-10215]Add configuration of java option  for historyserver
    
    This closes #6612.
---
 docs/_includes/generated/environment_configuration.html           | 5 +++++
 docs/monitoring/application_profiling.md                          | 2 +-
 .../src/main/java/org/apache/flink/configuration/CoreOptions.java | 6 ++++++
 flink-dist/src/main/flink-bin/bin/config.sh                       | 8 ++++++++
 flink-dist/src/main/flink-bin/bin/historyserver.sh                | 1 +
 5 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/docs/_includes/generated/environment_configuration.html b/docs/_includes/generated/environment_configuration.html
index 7db585d..ca70a2b 100644
--- a/docs/_includes/generated/environment_configuration.html
+++ b/docs/_includes/generated/environment_configuration.html
@@ -18,6 +18,11 @@
             <td></td>
         </tr>
         <tr>
+            <td><h5>env.java.opts.historyserver</h5></td>
+            <td style="word-wrap: break-word;">(none)</td>
+            <td>Java options to start the JVM of the HistoryServer with.</td>
+        </tr>
+        <tr>
             <td><h5>env.java.opts.jobmanager</h5></td>
             <td style="word-wrap: break-word;">(none)</td>
             <td></td>
diff --git a/docs/monitoring/application_profiling.md b/docs/monitoring/application_profiling.md
index b9cec5b..2a3feea 100644
--- a/docs/monitoring/application_profiling.md
+++ b/docs/monitoring/application_profiling.md
@@ -29,7 +29,7 @@ under the License.
 
 Each standalone JobManager, TaskManager, HistoryServer, and ZooKeeper daemon redirects `stdout` and `stderr` to a file
 with a `.out` filename suffix and writes internal logging to a file with a `.log` suffix. Java options configured by the
-user in `env.java.opts`, `env.java.opts.jobmanager`, and `env.java.opts.taskmanager` can likewise define log files with
+user in `env.java.opts`, `env.java.opts.jobmanager`, `env.java.opts.taskmanager` and `env.java.opts.historyserver` can likewise define log files with
 use of the script variable `FLINK_LOG_PREFIX` and by enclosing the options in double quotes for late evaluation. Log files
 using `FLINK_LOG_PREFIX` are rotated along with the default `.out` and `.log` files.
 
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
index f410204..37db9f2 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
@@ -22,6 +22,7 @@ import org.apache.flink.annotation.PublicEvolving;
 import org.apache.flink.annotation.docs.ConfigGroup;
 import org.apache.flink.annotation.docs.ConfigGroups;
 import org.apache.flink.annotation.docs.Documentation;
+import org.apache.flink.configuration.description.Description;
 
 import static org.apache.flink.configuration.ConfigOptions.key;
 
@@ -140,6 +141,11 @@ public class CoreOptions {
 		.key("env.java.opts.taskmanager")
 		.defaultValue("");
 
+	public static final ConfigOption<String> FLINK_HS_JVM_OPTIONS = ConfigOptions
+		.key("env.java.opts.historyserver")
+		.defaultValue("")
+		.withDescription(Description.builder().text("Java options to start the JVM of the HistoryServer with.").build());
+
 	/**
 	 * This options is here only for documentation generation, it is only
 	 * evaluated in the shell scripts.
diff --git a/flink-dist/src/main/flink-bin/bin/config.sh b/flink-dist/src/main/flink-bin/bin/config.sh
index c74dfc0..537c8dc 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -95,6 +95,7 @@ DEFAULT_ENV_LOG_MAX=5                               # Maximum number of old log
 DEFAULT_ENV_JAVA_OPTS=""                            # Optional JVM args
 DEFAULT_ENV_JAVA_OPTS_JM=""                         # Optional JVM args (JobManager)
 DEFAULT_ENV_JAVA_OPTS_TM=""                         # Optional JVM args (TaskManager)
+DEFAULT_ENV_JAVA_OPTS_HS=""                         # Optional JVM args (HistoryServer)
 DEFAULT_ENV_SSH_OPTS=""                             # Optional SSH parameters running in cluster mode
 DEFAULT_YARN_CONF_DIR=""                            # YARN Configuration Directory, if necessary
 DEFAULT_HADOOP_CONF_DIR=""                          # Hadoop Configuration Directory, if necessary
@@ -128,6 +129,7 @@ KEY_ENV_JAVA_HOME="env.java.home"
 KEY_ENV_JAVA_OPTS="env.java.opts"
 KEY_ENV_JAVA_OPTS_JM="env.java.opts.jobmanager"
 KEY_ENV_JAVA_OPTS_TM="env.java.opts.taskmanager"
+KEY_ENV_JAVA_OPTS_HS="env.java.opts.historyserver"
 KEY_ENV_SSH_OPTS="env.ssh.opts"
 KEY_HIGH_AVAILABILITY="high-availability"
 KEY_ZK_HEAP_MB="zookeeper.heap.mb"
@@ -485,6 +487,12 @@ if [ -z "${FLINK_ENV_JAVA_OPTS_TM}" ]; then
     FLINK_ENV_JAVA_OPTS_TM="$( echo "${FLINK_ENV_JAVA_OPTS_TM}" | sed -e 's/^"//'  -e 's/"$//' )"
 fi
 
+if [ -z "${FLINK_ENV_JAVA_OPTS_HS}" ]; then
+    FLINK_ENV_JAVA_OPTS_HS=$(readFromConfig ${KEY_ENV_JAVA_OPTS_HS} "${DEFAULT_ENV_JAVA_OPTS_HS}" "${YAML_CONF}")
+    # Remove leading and ending double quotes (if present) of value
+    FLINK_ENV_JAVA_OPTS_HS="$( echo "${FLINK_ENV_JAVA_OPTS_HS}" | sed -e 's/^"//'  -e 's/"$//' )"
+fi
+
 if [ -z "${FLINK_SSH_OPTS}" ]; then
     FLINK_SSH_OPTS=$(readFromConfig ${KEY_ENV_SSH_OPTS} "${DEFAULT_ENV_SSH_OPTS}" "${YAML_CONF}")
 fi
diff --git a/flink-dist/src/main/flink-bin/bin/historyserver.sh b/flink-dist/src/main/flink-bin/bin/historyserver.sh
index 150ab94..3bc3049 100644
--- a/flink-dist/src/main/flink-bin/bin/historyserver.sh
+++ b/flink-dist/src/main/flink-bin/bin/historyserver.sh
@@ -28,6 +28,7 @@ bin=`cd "$bin"; pwd`
 . "$bin"/config.sh
 
 if [[ $STARTSTOP == "start" ]] || [[ $STARTSTOP == "start-foreground" ]]; then
+    export FLINK_ENV_JAVA_OPTS="${FLINK_ENV_JAVA_OPTS} ${FLINK_ENV_JAVA_OPTS_HS}"
 	args=("--configDir" "${FLINK_CONF_DIR}")
 fi