Skip to content

Commit b058b79

Browse files
committed
[Improve] Add user environment variable configuration file
1 parent fc448ee commit b058b79

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

streampark-console/streampark-console-service/src/main/assembly/bin/streampark.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ elif [[ -r "$APP_HOME/bin/setenv.sh" ]]; then
149149
. "$APP_HOME/bin/setenv.sh"
150150
fi
151151

152+
# The user can be specified in the conf/streampark-env.sh.
153+
if [[ -f "${APP_CONF}/streampark-env.sh" ]]; then
154+
. "${APP_CONF}/streampark-env.sh"
155+
fi
156+
152157
# For Cygwin, ensure paths are in UNIX format before anything is touched
153158
if ${cygwin}; then
154159
# shellcheck disable=SC2006
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
# Many of the options here are built from the perspective that users
19+
# may want to provide OVERWRITING values on the command line.
20+
# For example:
21+
#
22+
# JAVA_HOME=/usr/java
23+
#
24+
# Therefore, the vast majority (BUT NOT ALL!) of these defaults
25+
# are configured for substitution and not append. If append
26+
# is preferable, modify this file accordingly.
27+
28+
###
29+
# Generic settings for STREAMPARK
30+
###
31+
32+
# Technically, the only required environment variable is JAVA_HOME.
33+
# All others are optional. However, the defaults are probably not
34+
# preferred. Many sites configure these options outside of streampark,
35+
# such as in /etc/profile.d
36+
37+
# The java implementation to use. By default, this environment
38+
# variable is REQUIRED on ALL platforms except OS X!
39+
# export JAVA_HOME=

0 commit comments

Comments
 (0)