Skip to content

Commit d851b23

Browse files
zhaomin1423yaooqinn
authored andcommitted
[KYUUBI #2323] Separate events to a submodule - kyuubi-event
### _Why are the changes needed?_ Separate events to a submodule - kyuubi-event ### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #2392 from zhaomin1423/event-module. Closes #2323 7efa923 [Min Zhao] fix unit test 07126f4 [Min Zhao] [KYUUBI #2323] Separate events to a submodule - kyuubi-event cccbdf1 [Min Zhao] [KYUUBI #2323] Separate events to a submodule - kyuubi-event 194aca8 [Min Zhao] add shade and log4j to test/resources f75891a [Min Zhao] [KYUUBI #2323] Separate events to a submodule - kyuubi-event 357395f [Min Zhao] [KYUUBI #2323] Separate events to a submodule - kyuubi-event b6dfd18 [Min Zhao] [KYUUBI #2323] Separate events to a submodule - kyuubi-event fc87668 [Min Zhao] [KYUUBI #2323] Separate events to a submodule - kyuubi-event 1b86d41 [Min Zhao] seperate event Authored-by: Min Zhao <zhaomin1423@163.com> Signed-off-by: Kent Yao <yao@apache.org>
1 parent c9ea7fa commit d851b23

File tree

21 files changed

+197
-13
lines changed

21 files changed

+197
-13
lines changed

.github/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
- "kyuubi-hive-jdbc/**/*"
6666
- "kyuubi-hive-jdbc-shaded/**/*"
6767

68+
"module:events":
69+
- "kyuubi-events/**/*"
70+
6871
"module:flink":
6972
- "externals/kyuubi-flink-sql-engine/**/*"
7073
- "integration-tests/kyuubi-flink-it/**/*"

dev/kyuubi-codecov/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
<version>${project.version}</version>
4646
</dependency>
4747

48+
<dependency>
49+
<groupId>org.apache.kyuubi</groupId>
50+
<artifactId>kyuubi-events_${scala.binary.version}</artifactId>
51+
<version>${project.version}</version>
52+
</dependency>
53+
4854
<dependency>
4955
<groupId>org.apache.kyuubi</groupId>
5056
<artifactId>kyuubi-zookeeper_${scala.binary.version}</artifactId>

externals/kyuubi-hive-sql-engine/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
<version>${project.version}</version>
4141
</dependency>
4242

43+
<dependency>
44+
<groupId>org.apache.kyuubi</groupId>
45+
<artifactId>kyuubi-events_${scala.binary.version}</artifactId>
46+
<version>${project.version}</version>
47+
</dependency>
48+
4349
<dependency>
4450
<groupId>org.apache.kyuubi</groupId>
4551
<artifactId>kyuubi-ha_${scala.binary.version}</artifactId>
@@ -166,6 +172,7 @@
166172
<include>com.fasterxml.jackson.core:jackson-databind</include>
167173
<include>com.fasterxml.jackson.module:jackson-module-scala_2.12</include>
168174
<include>org.apache.kyuubi:kyuubi-common_${scala.binary.version}</include>
175+
<include>org.apache.kyuubi:kyuubi-events_${scala.binary.version}</include>
169176
<include>org.apache.kyuubi:kyuubi-ha_${scala.binary.version}</include>
170177
<include>org.apache.curator:curator-client</include>
171178
<include>org.apache.curator:curator-framework</include>

externals/kyuubi-spark-sql-engine/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
<version>${project.version}</version>
4040
</dependency>
4141

42+
<dependency>
43+
<groupId>org.apache.kyuubi</groupId>
44+
<artifactId>kyuubi-events_${scala.binary.version}</artifactId>
45+
<version>${project.version}</version>
46+
</dependency>
47+
4248
<dependency>
4349
<groupId>org.apache.kyuubi</groupId>
4450
<artifactId>kyuubi-ha_${scala.binary.version}</artifactId>
@@ -187,6 +193,7 @@
187193
<artifactSet>
188194
<includes>
189195
<include>org.apache.kyuubi:kyuubi-common_${scala.binary.version}</include>
196+
<include>org.apache.kyuubi:kyuubi-events_${scala.binary.version}</include>
190197
<include>org.apache.kyuubi:kyuubi-ha_${scala.binary.version}</include>
191198
<include>org.apache.curator:curator-client</include>
192199
<include>org.apache.curator:curator-framework</include>

kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import scala.collection.JavaConverters._
2222
import org.apache.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema}
2323

2424
import org.apache.kyuubi.{KyuubiSQLException, Logging}
25-
import org.apache.kyuubi.events.KyuubiEvent
2625
import org.apache.kyuubi.operation.{Operation, OperationHandle}
2726
import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
2827
import org.apache.kyuubi.operation.log.OperationLog
@@ -246,6 +245,4 @@ abstract class AbstractSession(
246245
override def open(): Unit = {
247246
OperationLog.createOperationLogRootDirectory(this)
248247
}
249-
250-
override def getSessionEvent: Option[KyuubiEvent] = None
251248
}

kyuubi-common/src/main/scala/org/apache/kyuubi/session/Session.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package org.apache.kyuubi.session
1919

2020
import org.apache.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema}
2121

22-
import org.apache.kyuubi.events.KyuubiEvent
2322
import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
2423
import org.apache.kyuubi.operation.OperationHandle
2524

@@ -38,7 +37,6 @@ trait Session {
3837
def lastAccessTime: Long
3938
def lastIdleTime: Long
4039
def getNoOperationTime: Long
41-
def getSessionEvent: Option[KyuubiEvent]
4240

4341
def sessionManager: SessionManager
4442

kyuubi-events/pom.xml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one or more
4+
~ contributor license agreements. See the NOTICE file distributed with
5+
~ this work for additional information regarding copyright ownership.
6+
~ The ASF licenses this file to You under the Apache License, Version 2.0
7+
~ (the "License"); you may not use this file except in compliance with
8+
~ the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
-->
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<parent>
22+
<groupId>org.apache.kyuubi</groupId>
23+
<artifactId>kyuubi-parent</artifactId>
24+
<version>1.6.0-SNAPSHOT</version>
25+
<relativePath>../pom.xml</relativePath>
26+
</parent>
27+
<modelVersion>4.0.0</modelVersion>
28+
29+
<artifactId>kyuubi-events_2.12</artifactId>
30+
<name>Kyuubi Project Events</name>
31+
<packaging>jar</packaging>
32+
<url>https://kyuubi.apache.org/</url>
33+
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.apache.kyuubi</groupId>
37+
<artifactId>kyuubi-common_${scala.binary.version}</artifactId>
38+
<version>${project.version}</version>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>org.apache.kyuubi</groupId>
43+
<artifactId>kyuubi-common_${scala.binary.version}</artifactId>
44+
<version>${project.version}</version>
45+
<type>test-jar</type>
46+
<scope>test</scope>
47+
</dependency>
48+
49+
<dependency>
50+
<groupId>org.slf4j</groupId>
51+
<artifactId>jul-to-slf4j</artifactId>
52+
<scope>test</scope>
53+
</dependency>
54+
</dependencies>
55+
56+
<build>
57+
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
58+
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
59+
60+
<testResources>
61+
<testResource>
62+
<directory>${project.basedir}/src/test/resources</directory>
63+
</testResource>
64+
</testResources>
65+
</build>
66+
67+
</project>

0 commit comments

Comments
 (0)