zhenjiaguo commented on a change in pull request #1378:
URL: https://github.com/apache/incubator-kyuubi/pull/1378#discussion_r754742002
##########
File path:
kyuubi-server/src/test/scala/org/apache/kyuubi/events/EventLoggingServiceSuite.scala
##########
@@ -149,4 +154,76 @@ class EventLoggingServiceSuite extends WithKyuubiServer
with HiveJDBCTestHelper
}
}
}
+
+ test("test Kyuubi server info event") {
+ val confKv = List(("awesome.kyuubi", "true"), ("awesome.kyuubi.server",
"yeah"))
+ for (kv <- confKv) {
+ conf.set(kv._1, kv._2)
+ }
+ val name = "KyuubiServerInfoTest"
+ val server = new KyuubiServer(name)
+ server.initialize(conf)
+ server.start()
+
+ val hostName = InetAddress.getLocalHost.getCanonicalHostName
+ val kyuubiServerStartEventPath =
+ Paths.get(serverLogRoot, "kyuubi_server_info", s"day=$currentDate",
s"server-$hostName.json")
+
+ def compareResultWithState(state: String, result: ResultSet): Unit = {
+ result.next()
+ assert(result.getString("serverName") == name)
+ result.next()
Review comment:
No, when we start or stop kyuubi server normally, it will create an
event.
Default partitions function is `yyyyMMdd`. If when we config
`backend.server.event.loggers` is `JSON`, that means the JSON file will have
more than one or two events, it depends on as we start or stop kyuubi server in
one day.
In this test, when we use SQL to query the JSON file, one row is one event.
So I use result.next() to get every column in one row result.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]