You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/07/25 11:51:48 UTC
[GitHub] [incubator-kyuubi] yaooqinn commented on a diff in pull request #3132: [KYUUBI #3131] Improve operation state change logging
yaooqinn commented on code in PR #3132:
URL: https://github.com/apache/incubator-kyuubi/pull/3132#discussion_r928795345
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala:
##########
@@ -103,16 +103,18 @@ abstract class AbstractOperation(session: Session) extends Operation with Loggin
protected def setState(newState: OperationState): Unit = {
OperationState.validateTransition(state, newState)
- var timeCost = ""
newState match {
- case RUNNING => startTime = System.currentTimeMillis()
+ case RUNNING =>
+ info(s"Processing ${session.user}'s query[$statementId]: " +
+ s"${state.name} -> ${newState.name}, statement:\n$redactedStatement")
+ startTime = System.currentTimeMillis()
case ERROR | FINISHED | CANCELED | TIMEOUT =>
completedTime = System.currentTimeMillis()
- timeCost = s", time taken: ${(completedTime - startTime) / 1000.0} seconds"
+ val timeCost = s"\ntime taken: ${(completedTime - startTime) / 1000.0} seconds"
Review Comment:
is \n still necessary?
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org