You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ul...@apache.org on 2022/04/18 03:14:18 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #2349][DOCS] Usage docs for kyuubi-ctl
This is an automated email from the ASF dual-hosted git repository.
ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new a59188ff2 [KYUUBI #2349][DOCS] Usage docs for kyuubi-ctl
a59188ff2 is described below
commit a59188ff26bfd7cb50049ea7c285a2c67faf08ed
Author: sychen <sy...@ctrip.com>
AuthorDate: Mon Apr 18 11:14:06 2022 +0800
[KYUUBI #2349][DOCS] Usage docs for kyuubi-ctl
### _Why are the changes needed?_
close https://github.com/apache/incubator-kyuubi/issues/2349
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #2396 from cxzl25/KYUUBI-2349.
Closes #2349
4aa0a7fb [sychen] put list ahead
b2c49c37 [sychen] add doc
Authored-by: sychen <sy...@ctrip.com>
Signed-off-by: ulysses-you <ul...@apache.org>
---
docs/tools/index.rst | 3 +-
docs/tools/kyuubi-ctl.md | 143 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 145 insertions(+), 1 deletion(-)
diff --git a/docs/tools/index.rst b/docs/tools/index.rst
index eebaf6c59..71946d49e 100644
--- a/docs/tools/index.rst
+++ b/docs/tools/index.rst
@@ -23,4 +23,5 @@ Tools
:maxdepth: 2
:numbered: 3
- spark_block_cleaner
\ No newline at end of file
+ spark_block_cleaner
+ kyuubi-ctl
\ No newline at end of file
diff --git a/docs/tools/kyuubi-ctl.md b/docs/tools/kyuubi-ctl.md
new file mode 100644
index 000000000..50165adb6
--- /dev/null
+++ b/docs/tools/kyuubi-ctl.md
@@ -0,0 +1,143 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements. See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+<div align=center>
+
+![](../imgs/kyuubi_logo.png)
+
+</div>
+
+# Managing kyuubi servers and engines Tool
+
+## Usage
+```shell
+bin/kyuubi-ctl --help
+```
+Output
+```shell
+kyuubi 1.6.0-SNAPSHOT
+Usage: kyuubi-ctl [create|get|delete|list] [options]
+
+ -zk, --zk-quorum <value>
+ The connection string for the zookeeper ensemble, using zk quorum manually.
+ -n, --namespace <value> The namespace, using kyuubi-defaults/conf if absent.
+ -s, --host <value> Hostname or IP address of a service.
+ -p, --port <value> Listening port of a service.
+ -v, --version <value> Using the compiled KYUUBI_VERSION default, change it if the active service is running in another.
+ -b, --verbose Print additional debug output.
+
+Command: create [server]
+
+Command: create server
+ Expose Kyuubi server instance to another domain.
+
+Command: get [server|engine] [options]
+ Get the service/engine node info, host and port needed.
+Command: get server
+ Get Kyuubi server info of domain
+Command: get engine
+ Get Kyuubi engine info belong to a user.
+ -u, --user <value> The user name this engine belong to.
+ -et, --engine-type <value>
+ The engine type this engine belong to.
+ -es, --engine-subdomain <value>
+ The engine subdomain this engine belong to.
+
+Command: delete [server|engine] [options]
+ Delete the specified service/engine node, host and port needed.
+Command: delete server
+ Delete the specified service node for a domain
+Command: delete engine
+ Delete the specified engine node for user.
+ -u, --user <value> The user name this engine belong to.
+ -et, --engine-type <value>
+ The engine type this engine belong to.
+ -es, --engine-subdomain <value>
+ The engine subdomain this engine belong to.
+
+Command: list [server|engine] [options]
+ List all the service/engine nodes for a particular domain.
+Command: list server
+ List all the service nodes for a particular domain
+Command: list engine
+ List all the engine nodes for a user
+ -u, --user <value> The user name this engine belong to.
+ -et, --engine-type <value>
+ The engine type this engine belong to.
+ -es, --engine-subdomain <value>
+ The engine subdomain this engine belong to.
+
+ -h, --help Show help message and exit.
+```
+
+## Manage kyuubi servers
+You can specify the zookeeper address(`--zk-quorum`) and namespace(`--namespace`), version(`--version`) parameters to query a specific kyuubi server cluster.
+
+### List server
+List all the service nodes for a particular domain.
+```shell
+bin/kyuubi-ctl list server
+```
+
+### Create server
+Expose Kyuubi server instance to another domain.
+
+First read `kyuubi.ha.zookeeper.namespace` in `conf/kyuubi-defaults.conf`, if there are server instances under this namespace, register them in the new namespace specified by the `--namespace` parameter.
+```shell
+bin/kyuubi-ctl create server --namespace XXX
+```
+
+### Get server
+Get Kyuubi server info of domain.
+```shell
+bin/kyuubi-ctl get server --host XXX --port YYY
+```
+
+### Delete server
+Delete the specified service node for a domain.
+
+After the server node is deleted, the kyuubi server stops opening new sessions and waits for all currently open sessions to be closed before the process exits.
+```shell
+bin/kyuubi-ctl delete server --host XXX --port YYY
+```
+
+## Manage kyuubi engines
+You can also specify the engine type(`--engine-type`), and the engine share level subdomain(`--engine-subdomain`).
+
+If not specified, the configuration item `kyuubi.engine.type` of `kyuubi-defaults.conf` read, the default value is `SPARK_SQL`, `kyuubi.engine.share.level.subdomain`, the default value is `default`.
+
+If the engine pool mode is enabled through `kyuubi.engine.pool.size`, the subdomain consists of `kyuubi.engine.pool.name` and a number below size, e.g. `engine-pool-0` .
+
+### List engine
+List all the engine nodes for a user.
+```shell
+bin/kyuubi-ctl list egnine --user AAA
+```
+
+### Get engine
+Get Kyuubi engine info belong to a user.
+```shell
+bin/kyuubi-ctl get egnine --user AAA --host XXX --port YYY
+```
+
+### Delete engine
+Delete the specified engine node for user.
+
+After the engine node is deleted, the kyuubi engine stops opening new sessions and waits for all currently open sessions to be closed before the process exits.
+```shell
+bin/kyuubi-ctl delete egnine --user AAA --host XXX --port YYY
+```