turboFei commented on issue #2240:
URL: 
https://github.com/apache/incubator-kyuubi/issues/2240#issuecomment-1084776743


   ## API Design
   ### GET /batches
   
   Returns all the active batch sessions.
   
   #### Request Parameters
   
   | Name | Description                       | Type |
   | :--- | :-------------------------------- | :--- |
   | from | The start index to fetch sessions | int  |
   | size | Number of sessions to fetch       | int  |
   
   #### Response Body
   
   | Name     | Description                                                  | 
Type |
   | :------- | :----------------------------------------------------------- | 
:--- |
   | from     | The start index of fetched sessions                          | 
int  |
   | total    | Number of sessions fetched                                   | 
int  |
   | sessions | [Batch](#batch) list | list |
   
   ### POST /batches
   
   #### Request Body
   
   | Name      | Description                                        | Type      
      |
   | :-------- | :------------------------------------------------- | 
:-------------- |
   | resource  | The resource containing the application to execute | path 
(required) |
   | proxyUser | User to impersonate when running the job           | string    
      |
   | className | Application Java/Spark main class                  | 
string(required)          |
   | jars      | jars to be used in this session                    | list of 
strings |
   | files     | files to be used in this session                   | list of 
strings |
   | name      | The name of this session                           | string    
      |
   | conf      | Configuration properties                           | Map of 
key=val  |
   | args      | Command line arguments for the application         | list of 
strings |
   
   
   #### Response Body
   
   The created [Batch](#batch) object.
   
   ### GET /batches/{batchId}
   
   Returns the batch session information.
   
   #### Response Body
   
   The [Batch](#batch).
   
   ### GET /batches/{batchId}/state
   
   Returns the state of batch session
   
   #### Response
   
   | Name  | Description                        | Type   |
   | :---- | :--------------------------------- | :----- |
   | id    | Batch session id                   | tring  |
   | state | The current state of batch session | string |
   
   ### DELETE /batches/{batchId}
   
   Kills the [Batch](#batch) job.
   
   ### GET /batches/{batchId}/log
   
   Gets the log lines from this batch.
   
   #### Request Parameters
   
   | Name | Description                       | Type |
   | :--- | :-------------------------------- | :--- |
   | from | Offset                            | int  |
   | size | Max number of log lines to return | int  |
   
   #### Response Body
   
   | Name | Description              | Type            |
   | :--- | :----------------------- | :-------------- |
   | id   | The batch id             | string          |
   | from | Offset from start of log | int             |
   | size | Number of log lines      | int             |
   | log  | The log lines            | list of strings |
   
   ### Batch
   
   | Name    | Description                        | Type                        
                                 |
   | :------ | :--------------------------------- | 
:----------------------------------------------------------- |
   | id      | The session id                     | string                      
                                 |
   | appId   | The application id of this session | string                      
                                 |
   | appInfo | The detailed application info      | Map of key=val,<br />such 
as submitssion command,<br />submission time. |
   | log     | The log lines                      | list of strings             
                                 |
   | state   | The batch state                    | string                      
                                 |
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to