-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #903] Add event for statement
### _Why are the changes needed?_ - Through eventLog to write statementInfo into file ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request Closes #903 from zhang1002/branch-1.2_statementEvent. Closes #903 27cc774 [张宇翔] 1. Add some introduce 2. change som UT 7cf73bd [张宇翔] Merge branch 'master' into branch-1.2_statementEvent b662a98 [张宇翔] Merge remote-tracking branch 'upstream/master' fc86860 [张宇翔] resolve conflicts 5dfcf86 [张宇翔] resolve conflicts b04adee [张宇翔] remove some unused code 4c8f3b8 [张宇翔] Merge remote-tracking branch 'upstream/master' 2a4317a [张宇翔] remove some ut 0c474cc [张宇翔] Add statement event 4e05a39 [张宇翔] Add statement event 5f73e24 [张宇翔] Add statement event 8b68676 [张宇翔] Merge remote-tracking branch 'upstream/master' cf99e30 [张宇翔] Merge remote-tracking branch 'upstream/master' 0afaa57 [张宇翔] Merge remote-tracking branch 'upstream/master' b24fea0 [张宇翔] Merge remote-tracking branch 'upstream/master' e517cfc [张宇翔] Merge remote-tracking branch 'upstream/master' 18aebe7 [张宇翔] Merge remote-tracking branch 'upstream/master' f248bef [张宇翔] Merge remote-tracking branch 'upstream/master' 5ffb54f [张宇翔] Add kyuubi-spark-monitor module for nightly.yml Authored-by: 张宇翔 <zhang1002@126.com> Signed-off-by: Kent Yao <yao@apache.org> (cherry picked from commit d0c9c8a) Signed-off-by: Kent Yao <yao@apache.org>
- Loading branch information
Showing
4 changed files
with
86 additions
and
39 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...park-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/events/StatementEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.kyuubi.engine.spark.events | ||
|
||
import org.apache.spark.sql.Encoders | ||
import org.apache.spark.sql.types.StructType | ||
|
||
/** | ||
* | ||
* @param statementId: the identifier of operationHandler | ||
* @param statement: the sql that you execute | ||
* @param appId: application id a.k.a, the unique id for engine | ||
* @param sessionId: the identifier of a session | ||
* @param state: store each state that the sql has | ||
* @param stateTime: the time that the sql's state change | ||
* @param queryExecution: contains logicPlan and physicalPlan | ||
* @param exeception: caught exeception if have | ||
*/ | ||
case class StatementEvent( | ||
statementId: String, | ||
statement: String, | ||
appId: String, | ||
sessionId: String, | ||
var state: String, | ||
var stateTime: Long, | ||
var queryExecution: String = "", | ||
var exeception: String = "") extends KyuubiEvent { | ||
|
||
override def schema: StructType = Encoders.product[StatementEvent].schema | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters