[
https://issues.apache.org/jira/browse/FLINK-10215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16617321#comment-16617321
]
ASF GitHub Bot commented on FLINK-10215:
----------------------------------------
asfgit closed pull request #6612: [FLINK-10215]Add configuration of java option
for historyserver
URL: https://github.com/apache/flink/pull/6612
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/_includes/generated/environment_configuration.html
b/docs/_includes/generated/environment_configuration.html
index 7db585d2cec..9063e96eeb4 100644
--- a/docs/_includes/generated/environment_configuration.html
+++ b/docs/_includes/generated/environment_configuration.html
@@ -27,6 +27,11 @@
<td style="word-wrap: break-word;">(none)</td>
<td></td>
</tr>
+ <tr>
+ <td><h5>env.java.opts.historyserver</h5></td>
+ <td style="word-wrap: break-word;">(none)</td>
+ <td></td>
+ </tr>
<tr>
<td><h5>env.log.dir</h5></td>
<td style="word-wrap: break-word;">(none)</td>
diff --git a/docs/monitoring/application_profiling.md
b/docs/monitoring/application_profiling.md
index b9cec5b69b0..2a3feea9de1 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 f4102042d2a..a091314563f 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
@@ -140,6 +140,10 @@
.key("env.java.opts.taskmanager")
.defaultValue("");
+ public static final ConfigOption<String> FLINK_HS_JVM_OPTIONS =
ConfigOptions
+ .key("env.java.opts.historyserver")
+ .defaultValue("");
+
/**
* 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 c74dfc07e16..537c8dc2195 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 150ab9469ae..3bc3049c83b 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
----------------------------------------------------------------
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:
[email protected]
> Add configuration of java option for historyserver
> ----------------------------------------------------
>
> Key: FLINK-10215
> URL: https://issues.apache.org/jira/browse/FLINK-10215
> Project: Flink
> Issue Type: Improvement
> Components: History Server
> Affects Versions: 1.6.0
> Reporter: liuxianjiao
> Assignee: liuxianjiao
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.7.0
>
>
> We hava configuation to set java option for taskmanger and jobmanager, but
> there is a lack of historyserver's configuration. So, I add a
> "env.java.opts.historyserver" ,which is just like "env.java.opts.jobmanager"
> and
> "env.java.opts.taskmanager".
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)