Skip to content

Commit 8bcd5a0

Browse files
committed
revert env KYUUBI_FRONTEND_BIND_HOST and set kyuubi.frontend.bind.host to 127.0.0.1 in scalatest-maven-plugin
1 parent 717a992 commit 8bcd5a0

File tree

5 files changed

+44
-56
lines changed

5 files changed

+44
-56
lines changed

.github/workflows/master.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- '-Pspark-3.1 -Dhadoop.binary.version=3.2'
4040
env:
4141
SPARK_LOCAL_IP: 127.0.0.1
42-
KYUUBI_FRONTEND_BIND_HOST: 127.0.0.1
4342
steps:
4443
- uses: actions/checkout@v2
4544
- name: Setup JDK 1.8

conf/kyuubi-env.sh.template

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,28 @@
1616
# limitations under the License.
1717
#
1818
#
19-
# - JAVA_HOME Java runtime to use. By default use "java" from PATH.
20-
#
21-
#
22-
# - KYUUBI_CONF_DIR Directory containing the Kyuubi configurations to use.
23-
# (Default: $KYUUBI_HOME/conf)
24-
# - KYUUBI_LOG_DIR Directory for Kyuubi server-side logs.
25-
# (Default: $KYUUBI_HOME/logs)
26-
# - KYUUBI_PID_DIR Directory stores the Kyuubi instance pid file.
27-
# (Default: $KYUUBI_HOME/pid)
28-
# - KYUUBI_MAX_LOG_FILES Maximum number of Kyuubi server logs can rotate to.
29-
# (Default: 5)
30-
# - KYUUBI_JAVA_OPTS JVM options for the Kyuubi server itself in the form "-Dx=y".
31-
# (Default: none).
32-
# - KYUUBI_NICENESS The scheduling priority for Kyuubi server.
33-
# (Default: 0)
34-
# - KYUUBI_WORK_DIR_ROOT Root directory for launching sql engine applications.
35-
# (Default: $KYUUBI_HOME/work)
36-
# - HADOOP_CONF_DIR Directory containing the Hadoop / YARN configuration to use.
37-
#
38-
# - SPARK_HOME Spark distribution which you would like to use in Kyuubi.
39-
# - SPARK_CONF_DIR Optional directory where the Spark configuration lives.
40-
# (Default: $SPARK_HOME/conf)
41-
#
42-
# - KYUUBI_FRONTEND_BIND_HOST IP address for the frontend server to bind to.
19+
# - JAVA_HOME Java runtime to use. By default use "java" from PATH.
20+
#
21+
#
22+
# - KYUUBI_CONF_DIR Directory containing the Kyuubi configurations to use.
23+
# (Default: $KYUUBI_HOME/conf)
24+
# - KYUUBI_LOG_DIR Directory for Kyuubi server-side logs.
25+
# (Default: $KYUUBI_HOME/logs)
26+
# - KYUUBI_PID_DIR Directory stores the Kyuubi instance pid file.
27+
# (Default: $KYUUBI_HOME/pid)
28+
# - KYUUBI_MAX_LOG_FILES Maximum number of Kyuubi server logs can rotate to.
29+
# (Default: 5)
30+
# - KYUUBI_JAVA_OPTS JVM options for the Kyuubi server itself in the form "-Dx=y".
31+
# (Default: none).
32+
# - KYUUBI_NICENESS The scheduling priority for Kyuubi server.
33+
# (Default: 0)
34+
# - KYUUBI_WORK_DIR_ROOT Root directory for launching sql engine applications.
35+
# (Default: $KYUUBI_HOME/work)
36+
# - HADOOP_CONF_DIR Directory containing the Hadoop / YARN configuration to use.
37+
#
38+
# - SPARK_HOME Spark distribution which you would like to use in Kyuubi.
39+
# - SPARK_CONF_DIR Optional directory where the Spark configuration lives.
40+
# (Default: $SPARK_HOME/conf)
4341
#
4442

4543

docs/deployment/settings.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,28 @@ You can configure the environment variables in `$KYUUBI_HOME/conf/kyuubi-env.sh`
3434
# limitations under the License.
3535
#
3636
#
37-
# - JAVA_HOME Java runtime to use. By default use "java" from PATH.
37+
# - JAVA_HOME Java runtime to use. By default use "java" from PATH.
3838
#
3939
#
40-
# - KYUUBI_CONF_DIR Directory containing the Kyuubi configurations to use.
41-
# (Default: $KYUUBI_HOME/conf)
42-
# - KYUUBI_LOG_DIR Directory for Kyuubi server-side logs.
43-
# (Default: $KYUUBI_HOME/logs)
44-
# - KYUUBI_PID_DIR Directory stores the Kyuubi instance pid file.
45-
# (Default: $KYUUBI_HOME/pid)
46-
# - KYUUBI_MAX_LOG_FILES Maximum number of Kyuubi server logs can rotate to.
47-
# (Default: 5)
48-
# - KYUUBI_JAVA_OPTS JVM options for the Kyuubi server itself in the form "-Dx=y".
49-
# (Default: none).
50-
# - KYUUBI_NICENESS The scheduling priority for Kyuubi server.
51-
# (Default: 0)
52-
# - KYUUBI_WORK_DIR_ROOT Root directory for launching sql engine applications.
53-
# (Default: $KYUUBI_HOME/work)
54-
# - HADOOP_CONF_DIR Directory containing the Hadoop / YARN configuration to use.
40+
# - KYUUBI_CONF_DIR Directory containing the Kyuubi configurations to use.
41+
# (Default: $KYUUBI_HOME/conf)
42+
# - KYUUBI_LOG_DIR Directory for Kyuubi server-side logs.
43+
# (Default: $KYUUBI_HOME/logs)
44+
# - KYUUBI_PID_DIR Directory stores the Kyuubi instance pid file.
45+
# (Default: $KYUUBI_HOME/pid)
46+
# - KYUUBI_MAX_LOG_FILES Maximum number of Kyuubi server logs can rotate to.
47+
# (Default: 5)
48+
# - KYUUBI_JAVA_OPTS JVM options for the Kyuubi server itself in the form "-Dx=y".
49+
# (Default: none).
50+
# - KYUUBI_NICENESS The scheduling priority for Kyuubi server.
51+
# (Default: 0)
52+
# - KYUUBI_WORK_DIR_ROOT Root directory for launching sql engine applications.
53+
# (Default: $KYUUBI_HOME/work)
54+
# - HADOOP_CONF_DIR Directory containing the Hadoop / YARN configuration to use.
5555
#
56-
# - SPARK_HOME Spark distribution which you would like to use in Kyuubi.
57-
# - SPARK_CONF_DIR Optional directory where the Spark configuration lives.
58-
# (Default: $SPARK_HOME/conf)
59-
#
60-
# - KYUUBI_FRONTEND_BIND_HOST IP address for the frontend server to bind to.
56+
# - SPARK_HOME Spark distribution which you would like to use in Kyuubi.
57+
# - SPARK_CONF_DIR Optional directory where the Spark configuration lives.
58+
# (Default: $SPARK_HOME/conf)
6159
#
6260

6361

kyuubi-common/src/main/scala/org/apache/kyuubi/service/FrontendService.scala

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class FrontendService private (name: String, be: BackendService, oomHook: Runnab
5959
this.conf = conf
6060
try {
6161
hadoopConf = KyuubiHadoopUtils.newHadoopConf(conf)
62-
serverAddr = findFrontendServerHost()
62+
val serverHost = conf.get(FRONTEND_BIND_HOST)
63+
serverAddr = serverHost.map(InetAddress.getByName).getOrElse(InetAddress.getLocalHost)
6364
portNum = conf.get(FRONTEND_BIND_PORT)
6465
val minThreads = conf.get(FRONTEND_MIN_WORKER_THREADS)
6566
val maxThreads = conf.get(FRONTEND_MAX_WORKER_THREADS)
@@ -103,15 +104,6 @@ class FrontendService private (name: String, be: BackendService, oomHook: Runnab
103104
super.initialize(conf)
104105
}
105106

106-
private def findFrontendServerHost(): InetAddress = {
107-
val serverHostOverride = System.getenv("KYUUBI_FRONTEND_BIND_HOST")
108-
if (serverHostOverride != null) {
109-
InetAddress.getByName(serverHostOverride)
110-
} else {
111-
conf.get(FRONTEND_BIND_HOST).map(InetAddress.getByName).getOrElse(InetAddress.getLocalHost)
112-
}
113-
}
114-
115107
def connectionUrl: String = {
116108
getServiceState match {
117109
case s @ ServiceState.LATENT => throw new IllegalStateException(s"Illegal Service State: $s")

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,7 @@
11691169
<java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
11701170
<spark.driver.memory>2g</spark.driver.memory>
11711171
<kyuubi.metrics.json.report.location>${project.build.directory}/metrics</kyuubi.metrics.json.report.location>
1172+
<kyuubi.frontend.bind.host>127.0.0.1</kyuubi.frontend.bind.host>
11721173
</systemProperties>
11731174
<tagsToExclude>${maven.plugin.scalatest.exclude.tags}</tagsToExclude>
11741175
</configuration>

0 commit comments

Comments
 (0)