You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/08/16 13:59:20 UTC
[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #936: Add date info for json event path
ulysses-you commented on a change in pull request #936:
URL: https://github.com/apache/incubator-kyuubi/pull/936#discussion_r689562794
##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/events/JsonEventLogger.scala
##########
@@ -27,30 +27,33 @@ import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, FSDataOutputStream, Path}
import org.apache.hadoop.fs.permission.FsPermission
-import org.apache.kyuubi.Logging
+import org.apache.kyuubi.{Logging, Utils}
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.config.KyuubiConf.ENGINE_EVENT_JSON_LOG_PATH
import org.apache.kyuubi.engine.spark.events.JsonEventLogger.{JSON_LOG_DIR_PERM, JSON_LOG_FILE_PERM}
import org.apache.kyuubi.service.AbstractService
/**
* This event logger logs Kyuubi engine events in JSON file format.
- * The hierarchical directory structure is {ENGINE_EVENT_JSON_LOG_PATH}/{eventType}/{logName}.json
- * The {eventType} is based on core concepts of the Kyuubi systems, e.g. engine/session/statement
+ * The hierarchical directory structure is:
+ * ${ENGINE_EVENT_JSON_LOG_PATH}/day=${date}/event=${eventType}/${logName}.json
+ * The ${eventType} is based on core concepts of the Kyuubi systems, e.g. engine/session/statement
* @param logName the engine id formed of appId + attemptId(if any)
*/
class JsonEventLogger(logName: String, hadoopConf: Configuration)
extends AbstractService("JsonEventLogger") with EventLogger with Logging {
type Logger = (PrintWriter, Option[FSDataOutputStream])
+ private val currentDate = Utils.getCurrentDate
Review comment:
yes, it's OK since this logger is used at engine side. That said, one engine has a certain date.
--
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: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org