Skip to content

Commit 9c13f73

Browse files
谢波MyLanPangzi
authored andcommitted
[KYUUBI #417] [MINOR] Remove all unused import
![MyLanPangzi](https://badgen.net/badge/Hello/MyLanPangzi/green) [![Closes #417](https://badgen.net/badge/Preview/Closes%20%23417/blue)](https://github.com/yaooqinn/kyuubi/pull/417) ![29](https://badgen.net/badge/%2B/29/red) ![27](https://badgen.net/badge/-/27/green) ![7](https://badgen.net/badge/commits/7/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) [&#10088;?&#10089;](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT --> ### _Why are the changes needed?_ remove all unused import and replace deprecated class PersistentEphemeralNode with PersistentNode in ServiceDiscovery ### _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 #417 from MyLanPangzi/master. 821e0d2 [hiscat] Merge branch 'master' into master db9cd3c [谢波] [MINOR]: revert ServiceDiscovery change and add scala maven plugin compiler args c56cd2b [谢波] [MINOR]: revert ProcBuilder indent ad5e24a [谢波] [MINOR]: revert maven.plugin.scalatest.exclude.tags properties 7c23e37 [谢波] [MINOR]: scala maven plugin config move to plugin management 6029b99 [谢波] [MINOR]: remove all unused import a305567 [谢波] [MINOR]: remove all unused import Lead-authored-by: 谢波 <[email protected]> Co-authored-by: hiscat <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
1 parent 03ba80d commit 9c13f73

File tree

12 files changed

+29
-27
lines changed

12 files changed

+29
-27
lines changed

externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLBackendService.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@ package org.apache.kyuubi.engine.spark
2020
import org.apache.spark.sql.SparkSession
2121

2222
import org.apache.kyuubi.engine.spark.session.SparkSQLSessionManager
23-
import org.apache.kyuubi.operation.Operation
2423
import org.apache.kyuubi.service.AbstractBackendService
25-
import org.apache.kyuubi.service.BackendService
26-
import org.apache.kyuubi.session.Session
2724
import org.apache.kyuubi.session.SessionManager
2825

2926
/**
30-
* A [[BackendService]] constructed with [[SparkSession]] which give it the ability to talk with
27+
* A [[org.apache.kyuubi.service.BackendService]] constructed
28+
* with [[SparkSession]] which give it the ability to talk with
3129
* Spark and let Spark do all the rest heavy work :)
3230
*
3331
* @param name Service Name
34-
* @param spark A [[SparkSession]] instance that this backend service holds to run [[Operation]]s.
32+
* @param spark A [[SparkSession]] instance
33+
* that this backend service holds to run [[org.apache.kyuubi.operation.Operation]]s.
3534
*/
3635
class SparkSQLBackendService(name: String, spark: SparkSession)
3736
extends AbstractBackendService(name) {

externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/schema/RowSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import java.sql.Timestamp
2323
import java.text.SimpleDateFormat
2424
import java.time.{Instant, LocalDate, ZoneId}
2525
import java.time.chrono.IsoChronology
26-
import java.time.format.{DateTimeFormatter, DateTimeFormatterBuilder, ResolverStyle}
26+
import java.time.format.{DateTimeFormatter, DateTimeFormatterBuilder}
2727
import java.time.temporal.ChronoField
2828
import java.util.{Date, Locale}
2929

externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/session/SessionSuite.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ package org.apache.kyuubi.engine.spark.session
2020
import org.scalatest.concurrent.PatienceConfiguration.Timeout
2121
import org.scalatest.time.SpanSugar._
2222

23-
import org.apache.kyuubi.Utils
2423
import org.apache.kyuubi.config.KyuubiConf._
25-
import org.apache.kyuubi.engine.spark.{SparkSQLEngine, WithSparkSQLEngine}
24+
import org.apache.kyuubi.engine.spark.WithSparkSQLEngine
2625
import org.apache.kyuubi.operation.JDBCTestUtils
2726
import org.apache.kyuubi.service.ServiceState._
2827

kyuubi-common/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@
3333

3434
<dependencies>
3535

36-
<dependency>
37-
<groupId>org.scala-lang</groupId>
38-
<artifactId>scala-library</artifactId>
39-
</dependency>
40-
4136
<dependency>
4237
<groupId>org.slf4j</groupId>
4338
<artifactId>slf4j-api</artifactId>

kyuubi-common/src/main/scala/org/apache/kyuubi/service/BackendService.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ package org.apache.kyuubi.service
1919

2020
import org.apache.hive.service.rpc.thrift._
2121

22-
import org.apache.kyuubi.operation.{Operation, OperationHandle, OperationStatus}
22+
import org.apache.kyuubi.operation.{OperationHandle, OperationStatus}
2323
import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
24-
import org.apache.kyuubi.session.{Session, SessionHandle, SessionManager}
24+
import org.apache.kyuubi.session.{SessionHandle, SessionManager}
2525

2626
/**
2727
* A [[BackendService]] in Kyuubi architecture is responsible for talking to the SQL engine
2828
*
29-
* 1. Open/Close [[Session]]
30-
* 2. Operate [[Operation]]
31-
* 3. Manager [[Session]]s via [[SessionManager]]
32-
* 4. Check [[OperationStatus]]
33-
* 5. Retrieve [[Operation]] results and metadata
34-
* 6. Cancel/Close [[Operation]]
29+
* 1. Open/Close [[org.apache.kyuubi.session.Session]] <br/>
30+
* 2. Operate [[org.apache.kyuubi.operation.Operation]] <br/>
31+
* 3. Manager [[org.apache.kyuubi.session.Session]]s via [[SessionManager]] <br/>
32+
* 4. Check [[OperationStatus]] <br/>
33+
* 5. Retrieve [[org.apache.kyuubi.operation.Operation]] results and metadata <br/>
34+
* 6. Cancel/Close [[org.apache.kyuubi.operation.Operation]] <br/>
3535
*
3636
*/
3737
trait BackendService {

kyuubi-common/src/main/scala/org/apache/kyuubi/service/FrontendService.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class FrontendService private (name: String, be: BackendService, oomHook: Runnab
4141

4242
import FrontendService._
4343
import KyuubiConf._
44-
import OperationHandle._
4544

4645
def this(be: BackendService, oomHook: Runnable) = {
4746
this(classOf[FrontendService].getSimpleName, be, oomHook)

kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/PlainSASLHelper.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ package org.apache.kyuubi.service.authentication
2020
import java.security.Security
2121
import java.util.Collections
2222
import javax.security.auth.callback.{Callback, CallbackHandler, NameCallback, PasswordCallback, UnsupportedCallbackException}
23-
import javax.security.auth.login.LoginException
24-
import javax.security.sasl.{AuthenticationException, AuthorizeCallback}
23+
import javax.security.sasl.AuthorizeCallback
2524

2625
import org.apache.hive.service.rpc.thrift.TCLIService.Iface
2726
import org.apache.thrift.{TProcessor, TProcessorFactory}

kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.kyuubi.operation
1919

20-
import org.apache.hive.service.rpc.thrift.{TRow, TRowSet}
20+
import org.apache.hive.service.rpc.thrift.TRowSet
2121

2222
import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
2323
import org.apache.kyuubi.session.Session

kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicBoolean
2424
import javax.security.auth.login.Configuration
2525

2626
import scala.collection.JavaConverters._
27-
import scala.util.control.NonFatal
2827

2928
import org.apache.curator.framework.{CuratorFramework, CuratorFrameworkFactory}
3029
import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode

kyuubi-main/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import org.apache.kyuubi.config.KyuubiConf
3030
import org.apache.kyuubi.util.NamedThreadFactory
3131

3232
trait ProcBuilder {
33+
3334
import ProcBuilder._
3435

3536
protected def executable: String

0 commit comments

Comments
 (0)