Skip to content

Commit

Permalink
[FLINK-31916][python] Respect 'env.java.opts.all' (#22776)
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol authored Jun 14, 2023
1 parent c270a74 commit 626d70d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions flink-python/pyflink/pyflink_gateway_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
KEY_ENV_HADOOP_CONF_DIR = "env.hadoop.conf.dir"
KEY_ENV_HBASE_CONF_DIR = "env.hbase.conf.dir"
KEY_ENV_JAVA_HOME = "env.java.home"
KEY_ENV_JAVA_OPTS = "env.java.opts"
KEY_ENV_JAVA_OPTS = "env.java.opts.all"
KEY_ENV_JAVA_OPTS_DEPRECATED = "env.java.opts"


def on_windows():
Expand Down Expand Up @@ -156,7 +157,11 @@ def construct_log_settings(env):
def get_jvm_opts(env):
flink_conf_file = os.path.join(env['FLINK_CONF_DIR'], "flink-conf.yaml")
jvm_opts = env.get(
'FLINK_ENV_JAVA_OPTS', read_from_config(KEY_ENV_JAVA_OPTS, "", flink_conf_file))
'FLINK_ENV_JAVA_OPTS',
read_from_config(
KEY_ENV_JAVA_OPTS,
read_from_config(KEY_ENV_JAVA_OPTS_DEPRECATED, "", flink_conf_file),
flink_conf_file))

# Remove leading and ending double quotes (if present) of value
jvm_opts = jvm_opts.strip("\"")
Expand Down

0 comments on commit 626d70d

Please sign in to comment.