This is an automated email from the ASF dual-hosted git repository.

feiwang 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 d8fc3ec86 [KYUUBI #3688] add rest_api and kyuubi-admin docs for admin 
delete/list engine operation
d8fc3ec86 is described below

commit d8fc3ec86726cbb7e5f3665435059cc190d6b137
Author: Tianlin Liao <[email protected]>
AuthorDate: Tue Oct 25 19:40:51 2022 +0800

    [KYUUBI #3688] add rest_api and kyuubi-admin docs for admin delete/list 
engine operation
    
    ### _Why are the changes needed?_
    
    close #3688
    
    ### _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
    <img width="1413" alt="image" 
src="https://user-images.githubusercontent.com/21362040/197667408-679b940d-d217-473a-8131-7fe106faa8c5.png";>
    <img width="1370" alt="image" 
src="https://user-images.githubusercontent.com/21362040/197667453-2ad673f8-286c-4031-a804-8d354ce688b2.png";>
    <img width="1593" alt="image" 
src="https://user-images.githubusercontent.com/21362040/197670699-e06654fc-5b31-44a5-88da-da3ec157250b.png";>
    
    - [ ] [Run 
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
 locally before make a pull request
    
    Closes #3689 from lightning-L/doc.
    
    Closes #3688
    
    7292596bc [Tianlin Liao] fix wording
    cd5657d86 [Tianlin Liao] [KYUUBI #3688] add rest_api and kyuubi-admin docs 
for admin delete/list engine operation
    
    Authored-by: Tianlin Liao <[email protected]>
    Signed-off-by: Fei Wang <[email protected]>
---
 docs/client/rest/rest_api.md | 49 ++++++++++++++++++++++++++++++++++++++++++++
 docs/tools/kyuubi-admin.rst  | 48 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+)

diff --git a/docs/client/rest/rest_api.md b/docs/client/rest/rest_api.md
index cc8e1a8e4..1878b3846 100644
--- a/docs/client/rest/rest_api.md
+++ b/docs/client/rest/rest_api.md
@@ -349,6 +349,43 @@ Gets the local log lines from this batch.
 | logRowSet | The log lines     | List of sting |
 | rowCount  | The log row count | Int           |
 
+## Admin Resource
+
+### POST /admin/refresh/hadoop_conf
+
+Refresh the Hadoop configurations of the Kyuubi server.
+
+### DELETE /admin/engine
+
+Delete the specified engine.
+
+#### Request Parameters
+
+| Name                    | Description                   | Type             |
+|:------------------------|:------------------------------| :--------------- |
+| type                    | the engine type               | String(optional) |
+| sharelevel              | the engine share level        | String(optional) |
+| subdomain               | the engine subdomain          | String(optional) |
+| hive.server2.proxy.user | the proxy user to impersonate | String(optional) |
+
+### GET /admin/engine
+
+Get a list of satisfied engines.
+
+#### Request Parameters
+
+| Name                    | Description                   | Type             |
+|:------------------------|:------------------------------| :--------------- |
+| type                    | the engine type               | String(optional) |
+| sharelevel              | the engine share level        | String(optional) |
+| subdomain               | the engine subdomain          | String(optional) |
+| hive.server2.proxy.user | the proxy user to impersonate | String(optional) |
+
+#### Response Body
+The [Engine](#engine) List.
+
+## REST Objects
+
 ### Batch
 
 | Name           | Description                                                 
      | Type   |
@@ -386,3 +423,15 @@ Gets the local log lines from this batch.
 | totalOperations | How many queries and meta calls                            
                                                         | Int       |
 | exception       | The session exception, such as the exception that occur 
when opening session                                        | Throwable |
 | eventType       | The type of session event                                  
                                                         | String    |
+
+### Engine
+
+| Name           | Description                                                 
       | Type   |
+| :------------- 
|:-------------------------------------------------------------------| :----- |
+| version        | The version of the Kyuubi server that creates this engine 
instance | String |
+| user           | The user created the engine                                 
       | String |
+| engineType     | The engine type                                             
       | String |
+| sharelevel     | The engine share level                                      
       | String |
+| subdomain      | The engine subdomain                                        
       | String |
+| instance       | host:port for the engine node                               
       | String |
+| namespace      | The namespace used to expose the engine to KyuubiServers    
       | String |
\ No newline at end of file
diff --git a/docs/tools/kyuubi-admin.rst b/docs/tools/kyuubi-admin.rst
index f822303f9..cf60f67b1 100644
--- a/docs/tools/kyuubi-admin.rst
+++ b/docs/tools/kyuubi-admin.rst
@@ -69,3 +69,51 @@ Usage: ``bin/kyuubi-admin refresh config [options] 
[<configType>]``
      - Description
    * - hadoopConf
      - The hadoop conf used for proxy user verification.
+
+.. _list_engine:
+
+List Engines
+-------------------------------------
+
+Prints a table of the key information about the specified engines.
+
+Usage: ``bin/kyuubi-admin list engine [options]``
+
+.. list-table::
+   :widths: 20 80
+   :header-rows: 1
+
+   * - Options
+     - Description
+   * - -et, --engine-type
+     - The engine type. If not specified, it will read the configuration item 
kyuubi.engine.type from kyuubi-defaults.conf.
+   * - -esl, --engine-share-level
+     - The engine share level. If not specified, it will read the 
configuration item kyuubi.engine.share.level from kyuubi-defaults.conf.
+   * - -es, --engine-subdomain
+     - The subdomain for the share level of an engine. If not specified, it 
will read the configuration item kyuubi.engine.share.level.subdomain from 
kyuubi-defaults.conf.
+   * - --hs2ProxyUser
+     - The proxy user to impersonate. When specified, it will list engines for 
the hs2ProxyUser.
+
+.. _delete_engine:
+
+Delete an Engine
+-------------------------------------
+
+Delete the specified engine.
+
+Usage: ``bin/kyuubi-admin delete engine [options]``
+
+.. list-table::
+   :widths: 20 80
+   :header-rows: 1
+
+   * - Options
+     - Description
+   * - -et, --engine-type
+     - The engine type. If not specified, it will read the configuration item 
kyuubi.engine.type from kyuubi-defaults.conf.
+   * - -esl, --engine-share-level
+     - The engine share level. If not specified, it will read the 
configuration item kyuubi.engine.share.level from kyuubi-defaults.conf.
+   * - -es, --engine-subdomain
+     - The subdomain for the share level of an engine. If not specified, it 
will read the configuration item kyuubi.engine.share.level.subdomain from 
kyuubi-defaults.conf. Default value is "default".
+   * - --hs2ProxyUser
+     - The proxy user to impersonate. When specified, it will delete engines 
for the hs2ProxyUser.

Reply via email to