Skip to content

Commit

Permalink
[KYUUBI #952] Rename FrontendService and FrontendServiceSuite with a …
Browse files Browse the repository at this point in the history
…Thrift prefix

…

<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #953 from yanghua/KYUUBI-952.

Closes #952

a302901 [yanghua] [KYUUBI 952] Rename FrontendService and FrontendServiceSuite with a Thrift prefix

Authored-by: yanghua <yanghua1127@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
  • Loading branch information
yanghua authored and pan3793 committed Aug 19, 2021
1 parent c6f4a5a commit 4a82448
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class Serverable(name: String) extends CompositeService(name) {
private val started = new AtomicBoolean(false)

val backendService: AbstractBackendService
private lazy val frontendService = new FrontendService(backendService, OOMHook)
private lazy val frontendService = new ThriftFrontendService(backendService, OOMHook)
protected def supportsServiceDiscovery: Boolean
val discoveryService: Service

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ import org.apache.kyuubi.service.authentication.KyuubiAuthenticationFactory
import org.apache.kyuubi.session.SessionHandle
import org.apache.kyuubi.util.{ExecutorPoolCaptureOom, KyuubiHadoopUtils, NamedThreadFactory}

class FrontendService private (name: String, be: BackendService, oomHook: Runnable)
class ThriftFrontendService private(name: String, be: BackendService, oomHook: Runnable)
extends AbstractService(name) with TCLIService.Iface with Runnable with Logging {

import FrontendService._
import ThriftFrontendService._
import KyuubiConf._

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

private var server: Option[TServer] = None
Expand Down Expand Up @@ -545,7 +545,7 @@ class FrontendService private (name: String, be: BackendService, oomHook: Runnab
}
}

object FrontendService {
object ThriftFrontendService {
final val OK_STATUS = new TStatus(TStatusCode.SUCCESS_STATUS)

final val CURRENT_SERVER_CONTEXT = new ThreadLocal[FeServiceServerContext]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ 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.ThriftFrontendService.{FeServiceServerContext, SERVER_VERSION}
import org.apache.kyuubi.service.authentication.PlainSASLHelper
import org.apache.kyuubi.session.SessionHandle

class FrontendServiceSuite extends KyuubiFunSuite {
class ThriftFrontendServiceSuite extends KyuubiFunSuite {

protected val server = new NoopServer()
protected val conf = KyuubiConf()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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.{NoopServer, ThriftFrontendService}
import org.apache.kyuubi.service.authentication.PlainSASLServer.SaslPlainProvider

class PlainSASLHelperSuite extends KyuubiFunSuite {
Expand All @@ -32,7 +32,7 @@ class PlainSASLHelperSuite extends KyuubiFunSuite {
val server = new NoopServer()
val conf = KyuubiConf().set(KyuubiConf.FRONTEND_BIND_PORT, 0)
server.initialize(conf)
val service = server.getServices(1).asInstanceOf[FrontendService]
val service = server.getServices(1).asInstanceOf[ThriftFrontendService]
val tProcessorFactory = PlainSASLHelper.getProcessFactory(service)
val tSocket = new TSocket("0.0.0.0", 0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ 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.service.ThriftFrontendServiceSuite

class SessionManagerSuite extends FrontendServiceSuite with Eventually {
class SessionManagerSuite extends ThriftFrontendServiceSuite with Eventually {

override val conf = KyuubiConf()
.set(KyuubiConf.FRONTEND_BIND_PORT, 0)
Expand Down

0 comments on commit 4a82448

Please sign in to comment.