trait DiscoveryClient extends Logging
A collection of apis that discovery client need implement.
- Alphabetic
- By Inheritance
- DiscoveryClient
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
closeClient(): Unit
Close the discovery client.
-
abstract
def
create(path: String, mode: String, createParent: Boolean = true): String
Create path on discovery service.
-
abstract
def
createAndGetServiceNode(conf: KyuubiConf, namespace: String, instance: String, version: Option[String] = None, external: Boolean = false): String
Create server service node info on discovery and get the actual path.
Create server service node info on discovery and get the actual path.
- conf
Kyuubi config
- namespace
the path to register instance
- instance
server info, host:port
- version
kyuubi version
- external
if true, the service info will not be automatically deleted upon client's disconnect
-
abstract
def
createClient(): Unit
Create a discovery client.
-
abstract
def
delete(path: String, deleteChildren: Boolean = false): Unit
Delete a path.
Delete a path.
- path
the path to be deleted
- deleteChildren
if true, will also delete children if they exist.
-
abstract
def
deregisterService(): Unit
Deregister Kyuubi instance on discovery service.
-
abstract
def
getAndIncrement(path: String, delta: Int = 1): Int
Atomically get an Int number and add one
Atomically get an Int number and add one
- path
the path of stored data, If the path does not exist, it will be created and initialized to 0
- delta
the increase num
- returns
the stored data under path
-
abstract
def
getChildren(path: String): List[String]
Get the paths under given path.
Get the paths under given path.
- returns
list of path
-
abstract
def
getData(path: String): Array[Byte]
Get the stored data under path.
-
abstract
def
getEngineByRefId(namespace: String, engineRefId: String): Option[(String, Int)]
Get engine info by engine ref id from engine space.
Get engine info by engine ref id from engine space.
- namespace
the path to get engine ref
- engineRefId
engine ref id
- returns
engine host and port
-
abstract
def
getServerHost(namespace: String): Option[(String, Int)]
Get the engine address and port from engine space.
Get the engine address and port from engine space.
- returns
engine host and port
-
abstract
def
getServiceNodesInfo(namespace: String, sizeOpt: Option[Int] = None, silent: Boolean = false): Seq[ServiceNodeInfo]
Get service node info from server space.
Get service node info from server space.
- namespace
the path to get node info
- sizeOpt
how many nodes to pick
- silent
if true, error message will not be logged
- returns
Service node info
-
abstract
def
monitorState(serviceDiscovery: ServiceDiscovery): Unit
Add a monitor for serviceDiscovery.
Add a monitor for serviceDiscovery. It is used to stop service discovery gracefully when disconnect.
-
abstract
def
pathExists(path: String): Boolean
Check if the path is exists.
-
abstract
def
pathNonExists(path: String): Boolean
Check if the path non exists.
-
abstract
def
postDeregisterService(namespace: String): Boolean
Request remove Kyuubi instance on discovery service.
-
abstract
def
registerService(conf: KyuubiConf, namespace: String, serviceDiscovery: ServiceDiscovery, version: Option[String] = None, external: Boolean = false): Unit
Register Kyuubi instance on discovery service.
Register Kyuubi instance on discovery service.
- conf
Kyuubi config
- namespace
the path to register instance
- serviceDiscovery
service discovery
- version
kyuubi version
- external
if true, the service info will not be automatically deleted upon client's disconnect
-
abstract
def
setData(path: String, data: Array[Byte]): Boolean
Set the data under path.
-
abstract
def
startSecretNode(createMode: String, basePath: String, initData: String, useProtection: Boolean = false): Unit
Create a node to store engine secret.
Create a node to store engine secret.
- createMode
create node mode, automatically deleted or not
- basePath
the base path for the node
- initData
the init data to be stored
- useProtection
if true, createBuilder with protection
-
abstract
def
tryWithLock[T](lockPath: String, timeout: Long)(f: ⇒ T): T
The distributed lock path used to ensure only once engine being created for non-CONNECTION share level.
The distributed lock path used to ensure only once engine being created for non-CONNECTION share level.
- timeout
the timeout of acquiring lock, unit is ms
- Exceptions thrown
KyuubiSQLExceptionif timeout or get any exception during acquiring lock
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
debug(message: ⇒ Any, t: Throwable): Unit
- Definition Classes
- Logging
-
def
debug(message: ⇒ Any): Unit
- Definition Classes
- Logging
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(message: ⇒ Any): Unit
- Definition Classes
- Logging
-
def
error(message: ⇒ Any, t: Throwable): Unit
- Definition Classes
- Logging
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
info(message: ⇒ Any, t: Throwable): Unit
- Definition Classes
- Logging
-
def
info(message: ⇒ Any): Unit
- Definition Classes
- Logging
-
def
initializeLoggerIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
loggerName: String
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
warn(message: ⇒ Any, t: Throwable): Unit
- Definition Classes
- Logging
-
def
warn(message: ⇒ Any): Unit
- Definition Classes
- Logging