This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new adfca7408 [KYUUBI #4946] Alter the order of initLoggerEventHandler
adfca7408 is described below
commit adfca7408fc8ec24de7f311401f431d32670f26f
Author: Xieming LI <[email protected]>
AuthorDate: Tue Jun 20 17:50:41 2023 +0800
[KYUUBI #4946] Alter the order of initLoggerEventHandler
### _Why are the changes needed?_
Please see: https://github.com/apache/kyuubi/issues/4946
Simply put, the kinit service needs to be started before the
initLoggerEventHandler, so that it can obtain the DELEGATION TOKEN, which is
necessary for accessing the log path on HDFS.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
After this PR, confirmed the LoggerEventHandler can be initiated even
kdestroy was executed beforehand.
```
sudo -u kyuubi kdestroy
sudo -u kyuubi /opt/kyuubi/bin/kyuubi start
...
2023-06-19 22:18:36.581 INFO KyuubiTHttpFrontendService: Thread-101
org.eclipse.jetty.server.AbstractConnector: Started
ServerConnector50110971{HTTP/1.1, (http/1.1)}{0.0.0.0:10010}
2023-06-19 22:18:36.581 INFO KyuubiTHttpFrontendService: Thread-101
org.eclipse.jetty.server.Server: Started 6081ms
2023-06-19 22:18:36.669 INFO main
org.apache.kyuubi.events.handler.ServerJsonLoggingEventHandler: Logging kyuubi
events to
viewfs://<namespace>/tmp/kyuubi_hive/events/kyuubi_server_info/day=20230619/server-<servername>.json
```
- [x] [Run
test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests)
locally before make a pull request
Passed the test with kyuubi-server
```
./build/mvn clean install -pl kyuubi-server
```
Closes #4980 from risyomei/fix/kyuubi-4946.
Closes #4946
d729d2384 [Xieming LI] Alter the order of initLoggerEventHandler
Authored-by: Xieming LI <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
index 8bcd8d084..491b11e90 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
@@ -164,8 +164,6 @@ class KyuubiServer(name: String) extends Serverable(name) {
}
override def initialize(conf: KyuubiConf): Unit = synchronized {
- initLoggerEventHandler(conf)
-
val kinit = new KinitAuxiliaryService()
addService(kinit)
@@ -176,6 +174,8 @@ class KyuubiServer(name: String) extends Serverable(name) {
addService(new MetricsSystem)
}
super.initialize(conf)
+
+ initLoggerEventHandler(conf)
}
override def start(): Unit = {