diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 27a58bee3..dce53f211 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -67,8 +67,6 @@ jobs: key: ${{ runner.os }}-maven-io-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven-io- - - name: install kyuubi-shaded jars - run: mvn clean install -pl :kyuubi-shaded-curator,:kyuubi-shaded-hive-service-rpc -am -Pkyuubi-shaded - name: Build with Maven run: | mvn clean install ${{ matrix.profiles }} -Dmaven.javadoc.skip=true -V diff --git a/.travis.yml b/.travis.yml index 5b95b7771..2fc31b8f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,6 @@ matrix: install: - mvn --version - - mvn clean install -pl :kyuubi-shaded-curator,:kyuubi-shaded-hive-service-rpc -am -Pkyuubi-shaded script: - mvn clean install $PROFILE -Dmaven.plugin.scalatest.exclude.tags=$EXCLUDE_TAGS -Dmaven.javadoc.skip=true -V diff --git a/docs/tools/building.md b/docs/tools/building.md index 15b0c4db8..68d3f56e6 100644 --- a/docs/tools/building.md +++ b/docs/tools/building.md @@ -8,15 +8,9 @@ ## Building Kyuubi with Apache Maven -Apache Curator and Hive Service RPC are shaded to avoid conflicts with external jars. - -You need install these shaded modules locally at first. - **Kyuubi** is built based on [Apache Maven](http://maven.apache.org), ```bash -./build/mvn clean install -pl :kyuubi-shaded-curator,:kyuubi-shaded-hive-service-rpc -am -Pkyuubi-shaded - ./build/mvn clean package -DskipTests ``` diff --git a/externals/kyuubi-spark-sql-engine/pom.xml b/externals/kyuubi-spark-sql-engine/pom.xml index 3fc7059b3..77be013c5 100644 --- a/externals/kyuubi-spark-sql-engine/pom.xml +++ b/externals/kyuubi-spark-sql-engine/pom.xml @@ -98,12 +98,6 @@ test - - org.apache.hive - hive-service-rpc - test - - org.apache.hive hive-llap-client @@ -134,6 +128,12 @@ test + + org.apache.curator + curator-test + test + + com.fasterxml.jackson.core jackson-databind @@ -167,8 +167,6 @@ org.apache.kyuubi:kyuubi-common org.apache.kyuubi:kyuubi-ha - org.apache.kyuubi:kyuubi-shaded-curator - org.apache.kyuubi:kyuubi-shaded-hive-service-rpc diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala index dc3442683..4e76ed9d9 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala @@ -21,6 +21,7 @@ import java.time.ZoneId import java.util.regex.Pattern import org.apache.commons.lang3.StringUtils +import org.apache.hive.service.rpc.thrift.{TRowSet, TTableSchema} import org.apache.spark.sql.{Row, SparkSession} import org.apache.spark.sql.types.StructType @@ -34,7 +35,6 @@ import org.apache.kyuubi.operation.OperationType.OperationType import org.apache.kyuubi.operation.log.OperationLog import org.apache.kyuubi.schema.{RowSet, SchemaHelper} import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TRowSet, TTableSchema} abstract class SparkOperation(spark: SparkSession, opType: OperationType, session: Session) extends AbstractOperation(opType, session) { diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala index 005c44987..2fa9b50dc 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala @@ -17,6 +17,7 @@ package org.apache.kyuubi.engine.spark.session +import org.apache.hive.service.rpc.thrift.TProtocolVersion import org.apache.spark.sql.{AnalysisException, SparkSession} import org.apache.kyuubi.KyuubiSQLException @@ -25,7 +26,6 @@ import org.apache.kyuubi.engine.ShareLevel import org.apache.kyuubi.engine.spark.SparkSQLEngine import org.apache.kyuubi.engine.spark.operation.SparkSQLOperationManager import org.apache.kyuubi.session._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion /** * A [[SessionManager]] constructed with [[SparkSession]] which give it the ability to talk with diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSessionImpl.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSessionImpl.scala index 6f3f6a171..fffcc0b09 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSessionImpl.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSessionImpl.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.engine.spark.session +import org.apache.hive.service.rpc.thrift.TProtocolVersion + import org.apache.kyuubi.session.{AbstractSession, SessionManager} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion class SparkSessionImpl( protocol: TProtocolVersion, diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/RowSet.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/RowSet.scala index f0f742b1e..9a4d22e45 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/RowSet.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/RowSet.scala @@ -30,11 +30,10 @@ import java.util.{Date, Locale} import scala.collection.JavaConverters._ import scala.language.implicitConversions +import org.apache.hive.service.rpc.thrift._ import org.apache.spark.sql.Row import org.apache.spark.sql.types._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ - object RowSet { def toTRowSet( diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/SchemaHelper.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/SchemaHelper.scala index e3f852a18..13a480273 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/SchemaHelper.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/SchemaHelper.scala @@ -21,10 +21,9 @@ import java.util.Collections import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift._ import org.apache.spark.sql.types._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ - object SchemaHelper { def toTTypeId(typ: DataType): TTypeId = typ match { diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithDiscoverySparkSQLEngine.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithDiscoverySparkSQLEngine.scala index fc16280d3..3e25d5b94 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithDiscoverySparkSQLEngine.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithDiscoverySparkSQLEngine.scala @@ -17,11 +17,12 @@ package org.apache.kyuubi.engine.spark +import org.apache.curator.framework.CuratorFramework + import org.apache.kyuubi.Utils import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.ha.HighAvailabilityConf.{HA_ZK_ACL_ENABLED, HA_ZK_NAMESPACE, HA_ZK_QUORUM} import org.apache.kyuubi.ha.client.ServiceDiscovery -import org.apache.kyuubi.shade.curator.framework.CuratorFramework import org.apache.kyuubi.zookeeper.{EmbeddedZookeeper, ZookeeperConf} trait WithDiscoverySparkSQLEngine extends WithSparkSQLEngine { diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala index 79c318762..e86cf9770 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala @@ -24,6 +24,9 @@ import scala.util.Random import org.apache.hive.common.util.HiveVersionInfo import org.apache.hive.service.cli.HiveSQLException +import org.apache.hive.service.rpc.thrift._ +import org.apache.hive.service.rpc.thrift.TCLIService.Iface +import org.apache.hive.service.rpc.thrift.TOperationState._ import org.apache.spark.sql.catalyst.analysis.FunctionRegistry import org.apache.spark.sql.types._ @@ -32,9 +35,6 @@ import org.apache.kyuubi.engine.spark.WithSparkSQLEngine import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim import org.apache.kyuubi.operation.JDBCTests import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TCLIService.Iface -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TOperationState._ class SparkOperationSuite extends WithSparkSQLEngine with JDBCTests { diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/RowSetSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/RowSetSuite.scala index 008ebbd9a..9ee0fde03 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/RowSetSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/RowSetSuite.scala @@ -24,13 +24,13 @@ import java.time.{Instant, LocalDate, ZoneId} import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift.TProtocolVersion import org.apache.spark.sql.Row import org.apache.spark.sql.types._ import org.apache.spark.unsafe.types.CalendarInterval import org.apache.kyuubi.KyuubiFunSuite import org.apache.kyuubi.schema.RowSet.toHiveString -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion class RowSetSuite extends KyuubiFunSuite { diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/SchemaHelperSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/SchemaHelperSuite.scala index 6b53548f3..eb8cbdd47 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/SchemaHelperSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/schema/SchemaHelperSuite.scala @@ -19,10 +19,10 @@ package org.apache.kyuubi.schema import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift.{TCLIServiceConstants, TTypeId} import org.apache.spark.sql.types._ import org.apache.kyuubi.KyuubiFunSuite -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIServiceConstants, TTypeId} class SchemaHelperSuite extends KyuubiFunSuite { diff --git a/kyuubi-assembly/pom.xml b/kyuubi-assembly/pom.xml index 67dc132fb..43200390a 100644 --- a/kyuubi-assembly/pom.xml +++ b/kyuubi-assembly/pom.xml @@ -63,18 +63,6 @@ ${project.version} - - org.apache.kyuubi - kyuubi-shaded-curator - ${project.version} - - - - org.apache.kyuubi - kyuubi-shaded-hive-service-rpc - ${project.version} - - org.apache.hadoop hadoop-client-api @@ -85,6 +73,27 @@ hadoop-client-runtime + + org.apache.curator + curator-framework + + + + org.apache.curator + curator-client + + + + org.apache.curator + curator-recipes + + + + + org.apache.curator + curator-test + + org.slf4j diff --git a/kyuubi-common/pom.xml b/kyuubi-common/pom.xml index e625958ed..fb6726e8d 100644 --- a/kyuubi-common/pom.xml +++ b/kyuubi-common/pom.xml @@ -33,12 +33,6 @@ - - org.apache.kyuubi - kyuubi-shaded-hive-service-rpc - ${project.version} - - org.slf4j slf4j-api @@ -80,6 +74,11 @@ guava + + org.apache.hive + hive-service-rpc + + org.apache.hadoop hadoop-minikdc diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/KyuubiSQLException.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/KyuubiSQLException.scala index 1f75180d7..7739d3be8 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/KyuubiSQLException.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/KyuubiSQLException.scala @@ -24,7 +24,7 @@ import java.sql.SQLException import scala.annotation.tailrec import scala.collection.JavaConverters._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TStatus, TStatusCode} +import org.apache.hive.service.rpc.thrift.{TStatus, TStatusCode} class KyuubiSQLException(msg: String, cause: Throwable) extends SQLException(msg, cause) { /** diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/Handle.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/Handle.scala index 3b4befdb8..bb0b844cd 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/Handle.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/Handle.scala @@ -17,7 +17,7 @@ package org.apache.kyuubi.cli -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion +import org.apache.hive.service.rpc.thrift.TProtocolVersion trait Handle { def identifier: HandleIdentifier diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/HandleIdentifier.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/HandleIdentifier.scala index 9fc947ff2..1fcda7618 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/HandleIdentifier.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/cli/HandleIdentifier.scala @@ -20,7 +20,7 @@ package org.apache.kyuubi.cli import java.nio.ByteBuffer import java.util.{Objects, UUID} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.THandleIdentifier +import org.apache.hive.service.rpc.thrift.THandleIdentifier class HandleIdentifier(val publicId: UUID, val secretId: UUID) { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala index 9b60f0987..0b9f93547 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala @@ -20,13 +20,14 @@ package org.apache.kyuubi.operation import java.time.Duration import java.util.concurrent.Future +import org.apache.hive.service.rpc.thrift.{TProtocolVersion, TRowSet, TTableSchema} + import org.apache.kyuubi.{KyuubiSQLException, Logging} import org.apache.kyuubi.config.KyuubiConf.OPERATION_IDLE_TIMEOUT import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.operation.OperationType.OperationType import org.apache.kyuubi.operation.log.OperationLog import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TProtocolVersion, TRowSet, TTableSchema} abstract class AbstractOperation(opType: OperationType, session: Session) extends Operation with Logging { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/FetchOrientation.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/FetchOrientation.scala index b9b80eb10..1f1d9b8e6 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/FetchOrientation.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/FetchOrientation.scala @@ -17,7 +17,7 @@ package org.apache.kyuubi.operation -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TFetchOrientation +import org.apache.hive.service.rpc.thrift.TFetchOrientation object FetchOrientation extends Enumeration { type FetchOrientation = Value diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/Operation.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/Operation.scala index d6ce09203..62c55210b 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/Operation.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/Operation.scala @@ -19,10 +19,11 @@ package org.apache.kyuubi.operation import java.util.concurrent.Future +import org.apache.hive.service.rpc.thrift.{TProtocolVersion, TRowSet, TTableSchema} + import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.operation.log.OperationLog import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TProtocolVersion, TRowSet, TTableSchema} trait Operation { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala index 8dcdd3437..5288a0d07 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala @@ -21,9 +21,10 @@ import java.util.Objects import scala.language.implicitConversions +import org.apache.hive.service.rpc.thrift.{TOperationHandle, TProtocolVersion} + import org.apache.kyuubi.cli.{Handle, HandleIdentifier} import org.apache.kyuubi.operation.OperationType.OperationType -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TOperationHandle, TProtocolVersion} case class OperationHandle( identifier: HandleIdentifier, diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationManager.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationManager.scala index a2213b7ee..4fadc1ecc 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationManager.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationManager.scala @@ -17,13 +17,14 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift._ + import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.operation.log.LogDivertAppender import org.apache.kyuubi.service.AbstractService import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ /** * The [[OperationManager]] manages all the operations during their lifecycle. diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationState.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationState.scala index 2a4b05446..0d1b6db87 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationState.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationState.scala @@ -19,8 +19,9 @@ package org.apache.kyuubi.operation import scala.language.implicitConversions +import org.apache.hive.service.rpc.thrift.TOperationState + import org.apache.kyuubi.KyuubiSQLException -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TOperationState object OperationState extends Enumeration { import TOperationState._ diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationType.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationType.scala index 24926f30a..e4686aa65 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationType.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationType.scala @@ -17,7 +17,7 @@ package org.apache.kyuubi.operation -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TOperationType +import org.apache.hive.service.rpc.thrift.TOperationType object OperationType extends Enumeration { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/OperationLog.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/OperationLog.scala index 9f24d9390..fa95b26c7 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/OperationLog.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/OperationLog.scala @@ -22,10 +22,11 @@ import java.nio.ByteBuffer import java.nio.charset.StandardCharsets import java.nio.file.{Files, Path, Paths} +import org.apache.hive.service.rpc.thrift.{TColumn, TRow, TRowSet, TStringColumn} + import org.apache.kyuubi.{KyuubiSQLException, Logging, Utils} import org.apache.kyuubi.operation.OperationHandle import org.apache.kyuubi.session.SessionHandle -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TColumn, TRow, TRowSet, TStringColumn} object OperationLog extends Logging { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/AbstractBackendService.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/AbstractBackendService.scala index 57d24680b..b4b33a8fe 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/AbstractBackendService.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/AbstractBackendService.scala @@ -21,11 +21,12 @@ import java.util.concurrent.{ExecutionException, TimeoutException, TimeUnit} import scala.concurrent.CancellationException +import org.apache.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema} + import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.operation.{OperationHandle, OperationStatus} import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.session.SessionHandle -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema} /** * A Shorthand for implementing [[BackendService]]s diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/BackendService.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/BackendService.scala index 723aa65b4..739748a30 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/BackendService.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/BackendService.scala @@ -17,10 +17,11 @@ package org.apache.kyuubi.service +import org.apache.hive.service.rpc.thrift._ + import org.apache.kyuubi.operation.{OperationHandle, OperationStatus} import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.session.{SessionHandle, SessionManager} -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ /** * A [[BackendService]] in Kyuubi architecture is responsible for talking to the SQL engine diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/FrontendService.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/FrontendService.scala index d826cd03c..a47be78c4 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/FrontendService.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/FrontendService.scala @@ -24,16 +24,16 @@ import scala.collection.JavaConverters._ import scala.language.implicitConversions import org.apache.hadoop.conf.Configuration +import org.apache.hive.service.rpc.thrift._ +import org.apache.thrift.protocol.{TBinaryProtocol, TProtocol} +import org.apache.thrift.server.{ServerContext, TServer, TServerEventHandler, TThreadPoolServer} +import org.apache.thrift.transport.{TServerSocket, TTransport} import org.apache.kyuubi.{KyuubiException, KyuubiSQLException, Logging} import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.operation.{FetchOrientation, OperationHandle} import org.apache.kyuubi.service.authentication.KyuubiAuthenticationFactory import org.apache.kyuubi.session.SessionHandle -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ -import org.apache.kyuubi.shade.thrift.protocol.{TBinaryProtocol, TProtocol} -import org.apache.kyuubi.shade.thrift.server.{ServerContext, TServer, TServerEventHandler, TThreadPoolServer} -import org.apache.kyuubi.shade.thrift.transport.{TServerSocket, TTransport} import org.apache.kyuubi.util.{ExecutorPoolCaptureOom, KyuubiHadoopUtils, NamedThreadFactory} class FrontendService private (name: String, be: BackendService, oomHook: Runnable) diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/FEServiceProcessorFactory.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/FEServiceProcessorFactory.scala index fdacbe7f4..0b3fd9325 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/FEServiceProcessorFactory.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/FEServiceProcessorFactory.scala @@ -17,9 +17,9 @@ package org.apache.kyuubi.service.authentication -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TCLIService.{Iface, Processor} -import org.apache.kyuubi.shade.thrift.{TProcessor, TProcessorFactory} -import org.apache.kyuubi.shade.thrift.transport.TTransport +import org.apache.hive.service.rpc.thrift.TCLIService.{Iface, Processor} +import org.apache.thrift.{TProcessor, TProcessorFactory} +import org.apache.thrift.transport.TTransport private[authentication] case class FEServiceProcessorFactory(saslServer: HadoopThriftAuthBridgeServer, service: Iface) diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala index 8f2dd0bce..27dcb152a 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala @@ -28,11 +28,11 @@ import org.apache.hadoop.fs.FileSystem import org.apache.hadoop.security.{SaslRpcServer, UserGroupInformation} import org.apache.hadoop.security.SaslRpcServer.AuthMethod import org.apache.hadoop.security.token.SecretManager.InvalidToken +import org.apache.thrift.{TException, TProcessor} +import org.apache.thrift.protocol.TProtocol +import org.apache.thrift.transport._ import org.apache.kyuubi.Logging -import org.apache.kyuubi.shade.thrift.{TException, TProcessor} -import org.apache.kyuubi.shade.thrift.protocol.TProtocol -import org.apache.kyuubi.shade.thrift.transport._ class HadoopThriftAuthBridgeServer(secretMgr: KyuubiDelegationTokenManager) { import HadoopThriftAuthBridgeServer._ diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/KyuubiAuthenticationFactory.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/KyuubiAuthenticationFactory.scala index 4e6065a58..32c18674c 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/KyuubiAuthenticationFactory.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/KyuubiAuthenticationFactory.scala @@ -25,14 +25,14 @@ import org.apache.hadoop.conf.Configuration import org.apache.hadoop.security.UserGroupInformation import org.apache.hadoop.security.authentication.util.KerberosName import org.apache.hadoop.security.authorize.ProxyUsers +import org.apache.hive.service.rpc.thrift.TCLIService.Iface +import org.apache.thrift.TProcessorFactory +import org.apache.thrift.transport.{TTransportException, TTransportFactory} import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.config.KyuubiConf._ import org.apache.kyuubi.service.authentication.AuthTypes._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TCLIService.Iface -import org.apache.kyuubi.shade.thrift.TProcessorFactory -import org.apache.kyuubi.shade.thrift.transport.{TTransportException, TTransportFactory} class KyuubiAuthenticationFactory(conf: KyuubiConf) { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/PlainSASLHelper.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/PlainSASLHelper.scala index 6dba230f4..07cc501dc 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/PlainSASLHelper.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/PlainSASLHelper.scala @@ -22,12 +22,13 @@ import java.util.Collections import javax.security.auth.callback.{Callback, CallbackHandler, NameCallback, PasswordCallback, UnsupportedCallbackException} import javax.security.sasl.AuthorizeCallback +import org.apache.hive.service.rpc.thrift.TCLIService.Iface +import org.apache.thrift.{TProcessor, TProcessorFactory} +import org.apache.thrift.transport.{TSaslClientTransport, TSaslServerTransport, TTransport, TTransportFactory} + import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.service.authentication.AuthMethods.AuthMethod import org.apache.kyuubi.service.authentication.PlainSASLServer.SaslPlainProvider -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TCLIService.Iface -import org.apache.kyuubi.shade.thrift.{TProcessor, TProcessorFactory} -import org.apache.kyuubi.shade.thrift.transport.{TSaslClientTransport, TSaslServerTransport, TTransport, TTransportFactory} object PlainSASLHelper { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/TSetIpAddressProcessor.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/TSetIpAddressProcessor.scala index 9f5049018..ebf82f26f 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/TSetIpAddressProcessor.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/TSetIpAddressProcessor.scala @@ -17,11 +17,12 @@ package org.apache.kyuubi.service.authentication +import org.apache.hive.service.rpc.thrift.TCLIService.{Iface, Processor} +import org.apache.thrift.TException +import org.apache.thrift.protocol.TProtocol +import org.apache.thrift.transport.{TSaslClientTransport, TSaslServerTransport, TSocket, TTransport} + import org.apache.kyuubi.Logging -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TCLIService.{Iface, Processor} -import org.apache.kyuubi.shade.thrift.TException -import org.apache.kyuubi.shade.thrift.protocol.TProtocol -import org.apache.kyuubi.shade.thrift.transport.{TSaslClientTransport, TSaslServerTransport, TSocket, TTransport} class TSetIpAddressProcessor[I <: Iface]( iface: Iface) extends Processor[Iface](iface) with Logging { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala index e0f72e66b..8deba61e4 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala @@ -19,11 +19,12 @@ package org.apache.kyuubi.session import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema} + import org.apache.kyuubi.{KyuubiSQLException, Logging} import org.apache.kyuubi.operation.{Operation, OperationHandle} import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.operation.log.OperationLog -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema} abstract class AbstractSession( val protocol: TProtocolVersion, diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/Session.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/Session.scala index 34ec450e0..6d0ca16df 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/Session.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/Session.scala @@ -17,9 +17,10 @@ package org.apache.kyuubi.session +import org.apache.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema} + import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.operation.OperationHandle -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TGetInfoType, TGetInfoValue, TProtocolVersion, TRowSet, TTableSchema} trait Session { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionHandle.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionHandle.scala index 839e73b64..dc179fc01 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionHandle.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionHandle.scala @@ -19,8 +19,9 @@ package org.apache.kyuubi.session import java.util.Objects +import org.apache.hive.service.rpc.thrift.{TProtocolVersion, TSessionHandle} + import org.apache.kyuubi.cli.{Handle, HandleIdentifier} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TProtocolVersion, TSessionHandle} case class SessionHandle( identifier: HandleIdentifier, diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala index 43cff4958..25af49314 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala @@ -21,12 +21,13 @@ import java.util.concurrent.{ConcurrentHashMap, Future, ThreadPoolExecutor, Time import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift.TProtocolVersion + import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.config.KyuubiConf._ import org.apache.kyuubi.operation.OperationManager import org.apache.kyuubi.service.CompositeService -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion import org.apache.kyuubi.util.ThreadUtils /** diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/util/ThriftUtils.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/util/ThriftUtils.scala index 4dc841074..bfe0bd64b 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/util/ThriftUtils.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/util/ThriftUtils.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.util +import org.apache.hive.service.rpc.thrift.{TRow, TRowSet, TStatus, TStatusCode} + import org.apache.kyuubi.KyuubiSQLException -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TRow, TRowSet, TStatus, TStatusCode} object ThriftUtils { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiSQLExceptionSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiSQLExceptionSuite.scala index bb901c4a6..76964180e 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiSQLExceptionSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiSQLExceptionSuite.scala @@ -19,7 +19,7 @@ package org.apache.kyuubi import java.lang.reflect.{InvocationTargetException, UndeclaredThrowableException} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TStatusCode +import org.apache.hive.service.rpc.thrift.TStatusCode class KyuubiSQLExceptionSuite extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/FetchOrientationSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/FetchOrientationSuite.scala index cd2f36478..cfcd0b5c8 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/FetchOrientationSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/FetchOrientationSuite.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.TFetchOrientation + import org.apache.kyuubi.KyuubiFunSuite -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TFetchOrientation class FetchOrientationSuite extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTestUtils.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTestUtils.scala index 926a63175..e5f584653 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTestUtils.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTestUtils.scala @@ -20,11 +20,12 @@ package org.apache.kyuubi.operation import java.sql.{DriverManager, ResultSet, Statement} import java.util.Locale +import org.apache.hive.service.rpc.thrift.{TCLIService, TCloseSessionReq, TOpenSessionReq, TSessionHandle} +import org.apache.thrift.protocol.TBinaryProtocol +import org.apache.thrift.transport.TSocket + import org.apache.kyuubi.{KyuubiFunSuite, Utils} import org.apache.kyuubi.service.authentication.PlainSASLHelper -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TCloseSessionReq, TOpenSessionReq, TSessionHandle} -import org.apache.kyuubi.shade.thrift.protocol.TBinaryProtocol -import org.apache.kyuubi.shade.thrift.transport.TSocket trait JDBCTestUtils extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTests.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTests.scala index b88a1bfc2..a27ca860c 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTests.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/JDBCTests.scala @@ -21,7 +21,7 @@ import java.sql.{Date, SQLException, SQLTimeoutException, Timestamp} import scala.collection.JavaConverters._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TExecuteStatementReq, TFetchResultsReq, TOpenSessionReq, TStatusCode} +import org.apache.hive.service.rpc.thrift.{TExecuteStatementReq, TFetchResultsReq, TOpenSessionReq, TStatusCode} trait JDBCTests extends BasicJDBCTests { test("execute statement - select null") { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala index 5a302a8e8..a307712ba 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala @@ -21,12 +21,13 @@ import java.nio.ByteBuffer import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift.{TColumn, TColumnDesc, TPrimitiveTypeEntry, TRowSet, TStringColumn, TTableSchema, TTypeDesc, TTypeEntry, TTypeId} + import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.operation.OperationType.OperationType import org.apache.kyuubi.operation.log.OperationLog import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ import org.apache.kyuubi.util.ThriftUtils class NoopOperation(typ: OperationType, session: Session, shouldFail: Boolean = false) diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala index e8146fe60..961ecf7ca 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala @@ -17,9 +17,10 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.TRowSet + import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TRowSet import org.apache.kyuubi.util.ThriftUtils class NoopOperationManager extends OperationManager("noop") { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala index 636c712dc..9b3e25f90 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala @@ -17,11 +17,12 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.TProtocolVersion +import org.apache.hive.service.rpc.thrift.TProtocolVersion._ + import org.apache.kyuubi.KyuubiFunSuite import org.apache.kyuubi.cli.HandleIdentifier import org.apache.kyuubi.operation.OperationType._ -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion._ class OperationHandleSuite extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationStateSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationStateSuite.scala index 5429fe45b..808e79519 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationStateSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationStateSuite.scala @@ -17,9 +17,10 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.TOperationState +import org.apache.hive.service.rpc.thrift.TOperationState._ + import org.apache.kyuubi.{KyuubiFunSuite, KyuubiSQLException} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TOperationState -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TOperationState._ class OperationStateSuite extends KyuubiFunSuite { import OperationState._ diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationTypeSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationTypeSuite.scala index 552f1d408..d78df01c7 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationTypeSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationTypeSuite.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.TOperationType + import org.apache.kyuubi.KyuubiFunSuite -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TOperationType class OperationTypeSuite extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala index 8b71e6c8c..2251a2a31 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala @@ -21,10 +21,11 @@ import java.nio.file.{Files, Paths} import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift.TProtocolVersion + import org.apache.kyuubi.{KyuubiFunSuite, KyuubiSQLException} import org.apache.kyuubi.operation.{OperationHandle, OperationType} import org.apache.kyuubi.session.SessionHandle -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion class OperationLogSuite extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala index f5298673b..fa243eb7e 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala @@ -22,15 +22,16 @@ import java.util import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift._ +import org.apache.thrift.protocol.TBinaryProtocol +import org.apache.thrift.transport.TSocket + import org.apache.kyuubi.{KyuubiFunSuite, KyuubiSQLException, Utils} import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.operation.{OperationHandle, OperationType} import org.apache.kyuubi.service.FrontendService.{FeServiceServerContext, SERVER_VERSION} import org.apache.kyuubi.service.authentication.PlainSASLHelper import org.apache.kyuubi.session.SessionHandle -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ -import org.apache.kyuubi.shade.thrift.protocol.TBinaryProtocol -import org.apache.kyuubi.shade.thrift.transport.TSocket class FrontendServiceSuite extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala index b104b3675..23f8cef24 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala @@ -19,11 +19,12 @@ package org.apache.kyuubi.service.authentication import java.security.Security +import org.apache.thrift.transport.{TSaslServerTransport, TSocket} + import org.apache.kyuubi.{KYUUBI_VERSION, KyuubiFunSuite, Utils} import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.service.{FrontendService, NoopServer} import org.apache.kyuubi.service.authentication.PlainSASLServer.SaslPlainProvider -import org.apache.kyuubi.shade.thrift.transport.{TSaslServerTransport, TSocket} class PlainSASLHelperSuite extends KyuubiFunSuite { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionImpl.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionImpl.scala index d75a26234..d499319ba 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionImpl.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionImpl.scala @@ -17,7 +17,7 @@ package org.apache.kyuubi.session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion +import org.apache.hive.service.rpc.thrift.TProtocolVersion class NoopSessionImpl( protocol: TProtocolVersion, diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionManager.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionManager.scala index 8652fc746..11f10fc91 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionManager.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/NoopSessionManager.scala @@ -17,9 +17,10 @@ package org.apache.kyuubi.session +import org.apache.hive.service.rpc.thrift.TProtocolVersion + import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.operation.{NoopOperationManager, OperationManager} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion class NoopSessionManager extends SessionManager("noop") { override val operationManager: OperationManager = new NoopOperationManager() diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionHandleSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionHandleSuite.scala index 042dd05d8..de25c6fbd 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionHandleSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionHandleSuite.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.session +import org.apache.hive.service.rpc.thrift.TProtocolVersion + import org.apache.kyuubi.KyuubiFunSuite -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion class SessionHandleSuite extends KyuubiFunSuite { test("SessionHandle") { diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala index 1d0b36ebd..08d2807ae 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala @@ -19,12 +19,12 @@ package org.apache.kyuubi.session import java.time.Duration +import org.apache.hive.service.rpc.thrift._ import org.scalatest.concurrent.Eventually import org.scalatest.time.{Seconds, Span} import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.service.FrontendServiceSuite -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ class SessionManagerSuite extends FrontendServiceSuite with Eventually { diff --git a/kyuubi-ctl/pom.xml b/kyuubi-ctl/pom.xml index d9aab00e3..b54ffd37e 100644 --- a/kyuubi-ctl/pom.xml +++ b/kyuubi-ctl/pom.xml @@ -42,11 +42,6 @@ kyuubi-ha ${project.version} - - org.apache.kyuubi - kyuubi-shaded-curator - ${project.version} - org.apache.hadoop @@ -60,11 +55,29 @@ provided + + org.apache.curator + curator-framework + + + + org.apache.curator + curator-recipes + + org.apache.zookeeper zookeeper + + + org.apache.curator + curator-test + provided + + + org.apache.kyuubi kyuubi-common diff --git a/kyuubi-ha/pom.xml b/kyuubi-ha/pom.xml index e277c3c1c..aa38665d8 100644 --- a/kyuubi-ha/pom.xml +++ b/kyuubi-ha/pom.xml @@ -39,9 +39,13 @@ - org.apache.kyuubi - kyuubi-shaded-curator - ${project.version} + org.apache.curator + curator-framework + + + + org.apache.curator + curator-recipes diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala index bbe13361e..46fc6e59b 100644 --- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala +++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala @@ -25,6 +25,12 @@ import javax.security.auth.login.Configuration import scala.collection.JavaConverters._ +import org.apache.curator.framework.{CuratorFramework, CuratorFrameworkFactory} +import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode +import org.apache.curator.framework.state.{ConnectionState, ConnectionStateListener} +import org.apache.curator.framework.state.ConnectionState.{CONNECTED, LOST, RECONNECTED} +import org.apache.curator.retry._ +import org.apache.curator.utils.ZKPaths import org.apache.hadoop.security.UserGroupInformation import org.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager.JaasConfiguration import org.apache.zookeeper.{WatchedEvent, Watcher} @@ -37,12 +43,6 @@ import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.ha.HighAvailabilityConf._ import org.apache.kyuubi.ha.client.ServiceDiscovery._ import org.apache.kyuubi.service.{AbstractService, Serverable} -import org.apache.kyuubi.shade.curator.framework.{CuratorFramework, CuratorFrameworkFactory} -import org.apache.kyuubi.shade.curator.framework.recipes.nodes.{PersistentEphemeralNode, PersistentNode} -import org.apache.kyuubi.shade.curator.framework.state.{ConnectionState, ConnectionStateListener} -import org.apache.kyuubi.shade.curator.framework.state.ConnectionState.{CONNECTED, LOST, RECONNECTED} -import org.apache.kyuubi.shade.curator.retry._ -import org.apache.kyuubi.shade.curator.utils.ZKPaths import org.apache.kyuubi.util.{KyuubiHadoopUtils, ThreadUtils} /** @@ -59,14 +59,14 @@ abstract class ServiceDiscovery private ( this(classOf[ServiceDiscovery].getSimpleName, server) private var _zkClient: CuratorFramework = _ - private var _serviceNode: PersistentNode = _ + private var _serviceNode: PersistentEphemeralNode = _ /** * a pre-defined namespace used to publish the instance of the associate service */ private var _namespace: String = _ def zkClient: CuratorFramework = _zkClient - def serviceNode: PersistentNode = _serviceNode + def serviceNode: PersistentEphemeralNode = _serviceNode def namespace: String = _namespace override def initialize(conf: KyuubiConf): Unit = { diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala index f41293eb1..582f98206 100644 --- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala +++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala @@ -17,12 +17,12 @@ package org.apache.kyuubi.ha.client +import org.apache.curator.framework.api.ACLProvider import org.apache.zookeeper.ZooDefs import org.apache.zookeeper.data.ACL import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.ha.HighAvailabilityConf -import org.apache.kyuubi.shade.curator.framework.api.ACLProvider class ZooKeeperACLProvider(conf: KyuubiConf) extends ACLProvider { diff --git a/kyuubi-main/pom.xml b/kyuubi-main/pom.xml index bd51e53f2..29b684feb 100644 --- a/kyuubi-main/pom.xml +++ b/kyuubi-main/pom.xml @@ -82,12 +82,6 @@ test - - org.apache.hive - hive-service-rpc - test - - org.apache.kyuubi kyuubi-spark-sql-engine @@ -133,6 +127,12 @@ test + + org.apache.curator + curator-test + test + + org.apache.iceberg ${iceberg.name} diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/engine/SQLEngineAppName.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/engine/SQLEngineAppName.scala index ca11dfb09..e51555705 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/engine/SQLEngineAppName.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/engine/SQLEngineAppName.scala @@ -17,9 +17,10 @@ package org.apache.kyuubi.engine +import org.apache.curator.utils.ZKPaths + import org.apache.kyuubi.engine.ShareLevel.{CONNECTION, ShareLevel} import org.apache.kyuubi.session.SessionHandle -import org.apache.kyuubi.shade.curator.utils.ZKPaths case class SQLEngineAppName( sharedLevel: ShareLevel, user: String, sessionId: String) { diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala index 6d62967ea..0a4700cbb 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala @@ -19,13 +19,14 @@ package org.apache.kyuubi.operation import scala.collection.JavaConverters._ +import org.apache.hive.service.rpc.thrift.{TCLIService, TExecuteStatementReq, TFetchOrientation, TFetchResultsReq, TGetOperationStatusReq, TSessionHandle} +import org.apache.hive.service.rpc.thrift.TOperationState._ + import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.metrics.MetricsConstants._ import org.apache.kyuubi.metrics.MetricsSystem import org.apache.kyuubi.operation.log.OperationLog import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TExecuteStatementReq, TFetchOrientation, TFetchResultsReq, TGetOperationStatusReq, TSessionHandle} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TOperationState._ class ExecuteStatement( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala index 5329d311a..c41c9f703 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.{TCLIService, TGetCatalogsReq, TSessionHandle} + import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TGetCatalogsReq, TSessionHandle} class GetCatalogs( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala index dc05bf539..5c250c9c1 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.{TCLIService, TGetColumnsReq, TSessionHandle} + import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TGetColumnsReq, TSessionHandle} class GetColumns( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala index 2f7676357..31f959507 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.{TCLIService, TGetFunctionsReq, TSessionHandle} + import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TGetFunctionsReq, TSessionHandle} class GetFunctions( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala index 1b616631c..c46369b3b 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.{TCLIService, TGetSchemasReq, TSessionHandle} + import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TGetSchemasReq, TSessionHandle} class GetSchemas( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala index bbf9d8232..0f80de6cc 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.{TCLIService, TGetTableTypesReq, TSessionHandle} + import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TGetTableTypesReq, TSessionHandle} class GetTableTypes( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTables.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTables.scala index 89ca0fcc2..fbf5a97a0 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTables.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTables.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.{TCLIService, TGetTablesReq, TSessionHandle} + import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TGetTablesReq, TSessionHandle} class GetTables( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala index 0d9ef435e..d32fca46a 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala @@ -17,8 +17,9 @@ package org.apache.kyuubi.operation +import org.apache.hive.service.rpc.thrift.{TCLIService, TGetTypeInfoReq, TSessionHandle} + import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TGetTypeInfoReq, TSessionHandle} class GetTypeInfo( session: Session, diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala index 2decb809a..ebe59fc5b 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala @@ -19,6 +19,8 @@ package org.apache.kyuubi.operation import com.codahale.metrics.MetricRegistry import org.apache.commons.lang3.StringUtils +import org.apache.hive.service.rpc.thrift._ +import org.apache.thrift.transport.TTransportException import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.metrics.MetricsConstants.STATEMENT_FAIL @@ -26,8 +28,6 @@ import org.apache.kyuubi.metrics.MetricsSystem import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.operation.OperationType.OperationType import org.apache.kyuubi.session.Session -import org.apache.kyuubi.shade.hive.service.rpc.thrift._ -import org.apache.kyuubi.shade.thrift.transport.TTransportException import org.apache.kyuubi.util.ThriftUtils abstract class KyuubiOperation( diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperationManager.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperationManager.scala index a32949a04..5c0ec3d60 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperationManager.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/KyuubiOperationManager.scala @@ -19,12 +19,13 @@ package org.apache.kyuubi.operation import java.util.concurrent.{ConcurrentHashMap, TimeUnit} +import org.apache.hive.service.rpc.thrift.{TCLIService, TFetchResultsReq, TRowSet, TSessionHandle} + import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.config.KyuubiConf.OPERATION_QUERY_TIMEOUT import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation import org.apache.kyuubi.session.{Session, SessionHandle} -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TFetchResultsReq, TRowSet, TSessionHandle} import org.apache.kyuubi.util.ThriftUtils class KyuubiOperationManager private (name: String) extends OperationManager(name) { diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala index be66e7d8f..1ab47b224 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala @@ -23,6 +23,10 @@ import java.util.concurrent.TimeUnit import scala.collection.JavaConverters._ import com.codahale.metrics.MetricRegistry +import org.apache.hive.service.rpc.thrift.{TCLIService, TCloseSessionReq, TOpenSessionReq, TProtocolVersion, TSessionHandle} +import org.apache.thrift.TException +import org.apache.thrift.protocol.TBinaryProtocol +import org.apache.thrift.transport.{TSocket, TTransport} import org.apache.kyuubi.{KyuubiSQLException, Utils} import org.apache.kyuubi.config.KyuubiConf @@ -35,10 +39,6 @@ import org.apache.kyuubi.ha.client.ServiceDiscovery._ import org.apache.kyuubi.metrics.MetricsConstants._ import org.apache.kyuubi.metrics.MetricsSystem import org.apache.kyuubi.service.authentication.PlainSASLHelper -import org.apache.kyuubi.shade.hive.service.rpc.thrift.{TCLIService, TCloseSessionReq, TOpenSessionReq, TProtocolVersion, TSessionHandle} -import org.apache.kyuubi.shade.thrift.TException -import org.apache.kyuubi.shade.thrift.protocol.TBinaryProtocol -import org.apache.kyuubi.shade.thrift.transport.{TSocket, TTransport} import org.apache.kyuubi.util.ThriftUtils class KyuubiSessionImpl( diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionManager.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionManager.scala index aa6ad5950..f68ed6ef6 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionManager.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/session/KyuubiSessionManager.scala @@ -18,6 +18,7 @@ package org.apache.kyuubi.session import com.codahale.metrics.MetricRegistry +import org.apache.hive.service.rpc.thrift.TProtocolVersion import org.apache.kyuubi.KyuubiSQLException import org.apache.kyuubi.config.KyuubiConf @@ -25,7 +26,6 @@ import org.apache.kyuubi.ha.client.ServiceDiscovery import org.apache.kyuubi.metrics.MetricsConstants._ import org.apache.kyuubi.metrics.MetricsSystem import org.apache.kyuubi.operation.KyuubiOperationManager -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion class KyuubiSessionManager private (name: String) extends SessionManager(name) { diff --git a/kyuubi-main/src/test/scala/org/apache/kyuubi/engine/SQLEngineAppNameSuite.scala b/kyuubi-main/src/test/scala/org/apache/kyuubi/engine/SQLEngineAppNameSuite.scala index 9cfbc3694..8f98e652a 100644 --- a/kyuubi-main/src/test/scala/org/apache/kyuubi/engine/SQLEngineAppNameSuite.scala +++ b/kyuubi-main/src/test/scala/org/apache/kyuubi/engine/SQLEngineAppNameSuite.scala @@ -17,10 +17,11 @@ package org.apache.kyuubi.engine +import org.apache.curator.utils.ZKPaths +import org.apache.hive.service.rpc.thrift.TProtocolVersion + import org.apache.kyuubi.{KyuubiFunSuite, Utils} import org.apache.kyuubi.session.SessionHandle -import org.apache.kyuubi.shade.curator.utils.ZKPaths -import org.apache.kyuubi.shade.hive.service.rpc.thrift.TProtocolVersion class SQLEngineAppNameSuite extends KyuubiFunSuite { import ShareLevel._ diff --git a/kyuubi-shaded/kyuubi-shaded-curator/pom.xml b/kyuubi-shaded/kyuubi-shaded-curator/pom.xml deleted file mode 100644 index 40a192b7b..000000000 --- a/kyuubi-shaded/kyuubi-shaded-curator/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - kyuubi-shaded - org.apache.kyuubi - 1.2.0-SNAPSHOT - ../pom.xml - - 4.0.0 - - kyuubi-shaded-curator - Kyuubi Project Shade Apache Curator - jar - - - - org.apache.curator - curator-client - ${curator.version} - - - com.google.guava - guava - - - org.apache.zookeeper - zookeeper - - - - - org.apache.curator - curator-framework - ${curator.version} - - - org.apache.zookeeper - zookeeper - - - - - org.apache.curator - curator-recipes - ${curator.version} - - - org.apache.zookeeper - zookeeper - - - - - org.apache.curator - curator-test - ${curator.version} - - - io.netty - netty-all - - - jline - jline - - - org.apache.zookeeper - zookeeper - - - com.google.guava - guava - - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - - org.apache.curator:curator-client - org.apache.curator:curator-framework - org.apache.curator:curator-recipes - org.apache.curator:curator-test - org.javassist:javassist - - - - - org.apache.curator - ${kyuubi.shade.packageName}.curator - - org.apache.curator.** - - - - org.javassist - ${kyuubi.shade.packageName}.javassist - - org.javassist.** - - - - - - - - diff --git a/kyuubi-shaded/kyuubi-shaded-hive-service-rpc/pom.xml b/kyuubi-shaded/kyuubi-shaded-hive-service-rpc/pom.xml deleted file mode 100644 index f9c09155d..000000000 --- a/kyuubi-shaded/kyuubi-shaded-hive-service-rpc/pom.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - kyuubi-shaded - org.apache.kyuubi - 1.2.0-SNAPSHOT - ../pom.xml - - 4.0.0 - - kyuubi-shaded-hive-service-rpc - Kyuubi Project Shade Hive Service Rpc - jar - - - - - org.apache.hive - hive-service-rpc - ${hive.service.rpc.version} - - - commons-codec - commons-codec - - - commons-cli - commons-cli - - - commons-logging - commons-logging - - - tomcat - * - - - org.apache.httpcomponents - * - - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - - org.apache.hive:hive-service-rpc - org.apache.thrift:libthrift - org.apache.thrift:libfb303 - - - - - org.apache.hive - ${kyuubi.shade.packageName}.hive - - - org.apache.thrift - ${kyuubi.shade.packageName}.thrift - - - - - - - diff --git a/kyuubi-shaded/pom.xml b/kyuubi-shaded/pom.xml deleted file mode 100644 index 94c34a42d..000000000 --- a/kyuubi-shaded/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - 1.2.0-SNAPSHOT - 4.0.0 - - org.apache.kyuubi - kyuubi-shaded - Kyuubi Project Shaded Dependencies - pom - - - 2.12.0 - 2.3.7 - - org.apache.kyuubi.shade - true - - - - kyuubi-shaded-curator - kyuubi-shaded-hive-service-rpc - - - - - - org.apache.maven.plugins - maven-shade-plugin - - false - - - - package - - shade - - - - - - - diff --git a/kyuubi-zookeeper/pom.xml b/kyuubi-zookeeper/pom.xml index 2653a5573..40213b8c1 100644 --- a/kyuubi-zookeeper/pom.xml +++ b/kyuubi-zookeeper/pom.xml @@ -37,17 +37,18 @@ ${project.version} - - org.apache.kyuubi - kyuubi-shaded-curator - ${project.version} - - org.apache.zookeeper zookeeper + + + org.apache.curator + curator-test + + + org.apache.kyuubi kyuubi-common @@ -55,6 +56,17 @@ test-jar + + org.apache.curator + curator-framework + test + + + + org.apache.curator + curator-client + test + diff --git a/kyuubi-zookeeper/src/main/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeper.scala b/kyuubi-zookeeper/src/main/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeper.scala index 970d8f93a..6c7d2af4f 100644 --- a/kyuubi-zookeeper/src/main/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeper.scala +++ b/kyuubi-zookeeper/src/main/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeper.scala @@ -21,9 +21,10 @@ import java.io.File import scala.collection.JavaConverters._ +import org.apache.curator.test.{InstanceSpec, TestingServer} + import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.service.{AbstractService, ServiceState} -import org.apache.kyuubi.shade.curator.test.{InstanceSpec, TestingServer} import org.apache.kyuubi.zookeeper.ZookeeperConf._ class EmbeddedZookeeper extends AbstractService("EmbeddedZookeeper") { diff --git a/kyuubi-zookeeper/src/test/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeperSuite.scala b/kyuubi-zookeeper/src/test/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeperSuite.scala index bdbf2fa85..a0815931d 100644 --- a/kyuubi-zookeeper/src/test/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeperSuite.scala +++ b/kyuubi-zookeeper/src/test/scala/org/apache/kyuubi/zookeeper/EmbeddedZookeeperSuite.scala @@ -17,12 +17,13 @@ package org.apache.kyuubi.zookeeper +import org.apache.curator.framework.CuratorFrameworkFactory +import org.apache.curator.framework.imps.CuratorFrameworkState +import org.apache.curator.retry.ExponentialBackoffRetry + import org.apache.kyuubi.KyuubiFunSuite import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.service.ServiceState._ -import org.apache.kyuubi.shade.curator.framework.CuratorFrameworkFactory -import org.apache.kyuubi.shade.curator.framework.imps.CuratorFrameworkState -import org.apache.kyuubi.shade.curator.retry.ExponentialBackoffRetry class EmbeddedZookeeperSuite extends KyuubiFunSuite { diff --git a/pom.xml b/pom.xml index e4b9c607e..904df1c32 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,7 @@ 1.15 3.2.2 3.10 + 2.12.0 30.1-jre 3.2.2 2.7 @@ -814,6 +815,70 @@ + + org.apache.curator + curator-framework + ${curator.version} + + + org.apache.zookeeper + zookeeper + + + + + + org.apache.curator + curator-test + ${curator.version} + + + io.netty + netty-all + + + jline + jline + + + org.apache.zookeeper + zookeeper + + + com.google.guava + guava + + + + + + org.apache.curator + curator-recipes + ${curator.version} + + + org.apache.zookeeper + zookeeper + + + + + + org.apache.curator + curator-client + ${curator.version} + + + com.google.guava + guava + + + org.apache.zookeeper + zookeeper + + + + org.slf4j slf4j-api @@ -1375,11 +1440,5 @@ true - - kyuubi-shaded - - kyuubi-shaded - -