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

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 67f099a4c [KYUUBI #6201] Distinguish the collect mode of different 
engines
67f099a4c is described below

commit 67f099a4cd5302d4a68c51820508d252252acd04
Author: senmiaoliu <[email protected]>
AuthorDate: Wed Mar 20 20:27:01 2024 +0800

    [KYUUBI #6201] Distinguish the collect mode of different engines
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    ## Describe Your Solution ๐Ÿ”ง
    
    Currently, Spark, JDBC, and TRINO engines support incremental collection, 
but they share the same configuration option 
`kyuubi.operation.incremental.collect`. Sometimes, it's necessary to enable 
incremental collection only for specific engines, which requires distinguishing 
between them.
    
    ## Types of changes :bookmark:
    
    - [ ] Bugfix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
    
    ## Test Plan ๐Ÿงช
    
    #### Behavior Without This Pull Request :coffin:
    
    #### Behavior With This Pull Request :tada:
    
    #### Related Unit Tests
    
    ---
    
    # Checklist ๐Ÿ“
    
    - [ ] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    **Be nice. Be informative.**
    
    Closes #6201 from lsm1/branch-distinguish-engine-collect-mode.
    
    Closes #6201
    
    3c43d2cac [senmiaoliu] fix conf version
    aa53231aa [senmiaoliu] distinguish kyuubi.operation.incremental.collect for 
engine type
    
    Authored-by: senmiaoliu <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 docs/configuration/settings.md                     | 195 +++++++++++----------
 .../jdbc/operation/JdbcOperationManager.scala      |   6 +-
 .../spark/operation/SparkSQLOperationManager.scala |   9 +-
 .../spark/operation/SparkOperationSuite.scala      |   2 +-
 .../trino/operation/TrinoOperationManager.scala    |   4 +-
 .../TrinoOperationIncrementCollectSuite.scala      |   4 +-
 .../trino/operation/TrinoOperationSuite.scala      |   4 +-
 .../org/apache/kyuubi/config/KyuubiConf.scala      |  25 ++-
 8 files changed, 138 insertions(+), 111 deletions(-)

diff --git a/docs/configuration/settings.md b/docs/configuration/settings.md
index 2d3e21e5f..8bb87603d 100644
--- a/docs/configuration/settings.md
+++ b/docs/configuration/settings.md
@@ -120,102 +120,105 @@ You can configure the Kyuubi properties in 
`$KYUUBI_HOME/conf/kyuubi-defaults.co
 
 ### Engine
 
-|                           Key                            |          Default  
        |                                                                       
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-|----------------------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 [...]
-| kyuubi.engine.chat.ernie.http.connect.timeout            | PT2M              
        | The timeout[ms] for establishing the connection with the ernie bot 
server. A timeout value of zero is interpreted as an infinite timeout.          
                                                                                
                                                                                
                                                                                
                 [...]
-| kyuubi.engine.chat.ernie.http.proxy                      | &lt;undefined&gt; 
        | HTTP proxy url for API calling in ernie bot engine. e.g. 
http://127.0.0.1:1088                                                           
                                                                                
                                                                                
                                                                                
                           [...]
-| kyuubi.engine.chat.ernie.http.socket.timeout             | PT2M              
        | The timeout[ms] for waiting for data packets after ernie bot server 
connection is established. A timeout value of zero is interpreted as an 
infinite timeout.                                                               
                                                                                
                                                                                
                        [...]
-| kyuubi.engine.chat.ernie.model                           | completions       
        | ID of the model used in ernie bot. Available models are 
completions_pro, ernie_bot_8k, completions and eb-instant[Model 
overview](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/6lp69is2a).              
                                                                                
                                                                                
                                            [...]
-| kyuubi.engine.chat.ernie.token                           | &lt;undefined&gt; 
        | The token to access ernie bot open API, which could be got at 
https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Ilkkrb0i5                          
                                                                                
                                                                                
                                                                                
                      [...]
-| kyuubi.engine.chat.extra.classpath                       | &lt;undefined&gt; 
        | The extra classpath for the Chat engine, for configuring the location 
of the SDK and etc.                                                             
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.chat.gpt.apiKey                            | &lt;undefined&gt; 
        | The key to access OpenAI open API, which could be got at 
https://platform.openai.com/account/api-keys                                    
                                                                                
                                                                                
                                                                                
                           [...]
-| kyuubi.engine.chat.gpt.http.connect.timeout              | PT2M              
        | The timeout[ms] for establishing the connection with the Chat GPT 
server. A timeout value of zero is interpreted as an infinite timeout.          
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.engine.chat.gpt.http.proxy                        | &lt;undefined&gt; 
        | HTTP proxy url for API calling in Chat GPT engine. e.g. 
http://127.0.0.1:1087                                                           
                                                                                
                                                                                
                                                                                
                            [...]
-| kyuubi.engine.chat.gpt.http.socket.timeout               | PT2M              
        | The timeout[ms] for waiting for data packets after Chat GPT server 
connection is established. A timeout value of zero is interpreted as an 
infinite timeout.                                                               
                                                                                
                                                                                
                         [...]
-| kyuubi.engine.chat.gpt.model                             | gpt-3.5-turbo     
        | ID of the model used in ChatGPT. Available models refer to OpenAI's 
[Model overview](https://platform.openai.com/docs/models/overview).             
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.engine.chat.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the Chat engine                            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.chat.memory                                | 1g                
        | The heap memory for the Chat engine                                   
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.chat.provider                              | ECHO              
        | The provider for the Chat engine. Candidates: <ul> <li>ECHO: simply 
replies a welcome message.</li> <li>GPT: a.k.a ChatGPT, powered by OpenAI.</li> 
<li>ERNIE: ErnieBot, powered by Baidu.</li></ul>                                
                                                                                
                                                                                
                [...]
-| kyuubi.engine.connection.url.use.hostname                | true              
        | (deprecated) When true, the engine registers with hostname to 
zookeeper. When Spark runs on K8s with cluster mode, set to false to ensure 
that server can connect to engine                                               
                                                                                
                                                                                
                          [...]
-| kyuubi.engine.deregister.exception.classes                                   
       || A comma-separated list of exception classes. If there is any 
exception thrown, whose class matches the specified classes, the engine would 
deregister itself.                                                              
                                                                                
                                                                                
                         [...]
-| kyuubi.engine.deregister.exception.messages                                  
       || A comma-separated list of exception messages. If there is any 
exception thrown, whose message or stacktrace matches the specified message 
list, the engine would deregister itself.                                       
                                                                                
                                                                                
                          [...]
-| kyuubi.engine.deregister.exception.ttl                   | PT30M             
        | Time to live(TTL) for exceptions pattern specified in 
kyuubi.engine.deregister.exception.classes and 
kyuubi.engine.deregister.exception.messages to deregister engines. Once the 
total error count hits the kyuubi.engine.deregister.job.max.failures within the 
TTL, an engine will deregister itself and wait for self-terminated. Otherwise, 
we suppose that the engine has recovered from temporary failures.   [...]
-| kyuubi.engine.deregister.job.max.failures                | 4                 
        | Number of failures of job before deregistering the engine.            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.doAs.enabled                               | true              
        | Whether to enable user impersonation on launching engine. When 
enabled, for engines which supports user impersonation, e.g. SPARK, depends on 
the `kyuubi.engine.share.level`, different users will be used to launch the 
engine. Otherwise, Kyuubi Server's user will always be used to launch the 
engine.                                                                         
                                [...]
-| kyuubi.engine.event.json.log.path                        | 
file:///tmp/kyuubi/events | The location where all the engine events go for the 
built-in JSON logger.<ul><li>Local Path: start with 'file://'</li><li>HDFS 
Path: start with 'hdfs://'</li></ul>                                            
                                                                                
                                                                                
                                     [...]
-| kyuubi.engine.event.loggers                              | SPARK             
        | A comma-separated list of engine history loggers, where 
engine/session/operation etc events go.<ul> <li>SPARK: the events will be 
written to the Spark listener bus.</li> <li>JSON: the events will be written to 
the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to be 
done</li> <li>CUSTOM: User-defined event handlers.</li></ul> Note that: Kyuubi 
supports custom event handlers with the Jav [...]
-| kyuubi.engine.flink.application.jars                     | &lt;undefined&gt; 
        | A comma-separated list of the local jars to be shipped with the job 
to the cluster. For example, SQL UDF jars. Only effective in yarn application 
mode.                                                                           
                                                                                
                                                                                
                  [...]
-| kyuubi.engine.flink.extra.classpath                      | &lt;undefined&gt; 
        | The extra classpath for the Flink SQL engine, for configuring the 
location of hadoop client jars, etc. Only effective in yarn session mode.       
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.engine.flink.initialize.sql                       | SHOW DATABASES    
        | The initialize sql for Flink engine. It fallback to 
`kyuubi.engine.initialize.sql`.                                                 
                                                                                
                                                                                
                                                                                
                                [...]
-| kyuubi.engine.flink.java.options                         | &lt;undefined&gt; 
        | The extra Java options for the Flink SQL engine. Only effective in 
yarn session mode.                                                              
                                                                                
                                                                                
                                                                                
                 [...]
-| kyuubi.engine.flink.memory                               | 1g                
        | The heap memory for the Flink SQL engine. Only effective in yarn 
session mode.                                                                   
                                                                                
                                                                                
                                                                                
                   [...]
-| kyuubi.engine.hive.deploy.mode                           | LOCAL             
        | Configures the hive engine deploy mode, The value can be 'local', 
'yarn'. In local mode, the engine operates on the same node as the 
KyuubiServer. In YARN mode, the engine runs within the Application Master (AM) 
container of YARN.                                                              
                                                                                
                                [...]
-| kyuubi.engine.hive.event.loggers                         | JSON              
        | A comma-separated list of engine history loggers, where 
engine/session/operation etc events go.<ul> <li>JSON: the events will be 
written to the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to 
be done</li> <li>CUSTOM: to be done.</li></ul>                                  
                                                                                
                                    [...]
-| kyuubi.engine.hive.extra.classpath                       | &lt;undefined&gt; 
        | The extra classpath for the Hive query engine, for configuring 
location of the hadoop client jars and etc.                                     
                                                                                
                                                                                
                                                                                
                     [...]
-| kyuubi.engine.hive.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the Hive query engine                      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.hive.memory                                | 1g                
        | The heap memory for the Hive query engine                             
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.initialize.sql                             | SHOW DATABASES    
        | SemiColon-separated list of SQL statements to be initialized in the 
newly created engine before queries. i.e. use `SHOW DATABASES` to eagerly 
active HiveClient. This configuration can not be used in JDBC url due to the 
limitation of Beeline/JDBC driver.                                              
                                                                                
                         [...]
-| kyuubi.engine.jdbc.connection.password                   | &lt;undefined&gt; 
        | The password is used for connecting to server                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.connection.propagateCredential        | false             
        | Whether to use the session's user and password to connect to database 
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.connection.properties                                     
       || The additional properties are used for connecting to server           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.connection.provider                   | &lt;undefined&gt; 
        | A JDBC connection provider plugin for the Kyuubi Server to establish 
a connection to the JDBC URL. The configuration value should be a subclass of 
`org.apache.kyuubi.engine.jdbc.connection.JdbcConnectionProvider`. Kyuubi 
provides the following built-in implementations: <li>doris: For establishing 
Doris connections.</li> <li>mysql: For establishing MySQL connections.</li> 
<li>phoenix: For establishing [...]
-| kyuubi.engine.jdbc.connection.url                        | &lt;undefined&gt; 
        | The server url that engine will connect to                            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.connection.user                       | &lt;undefined&gt; 
        | The user is used for connecting to server                             
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.driver.class                          | &lt;undefined&gt; 
        | The driver class for JDBC engine connection                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.extra.classpath                       | &lt;undefined&gt; 
        | The extra classpath for the JDBC query engine, for configuring the 
location of the JDBC driver and etc.                                            
                                                                                
                                                                                
                                                                                
                 [...]
-| kyuubi.engine.jdbc.fetch.size                            | 1000              
        | The fetch size of JDBC engine                                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.initialize.sql                        | SELECT 1          
        | SemiColon-separated list of SQL statements to be initialized in the 
newly created engine before queries. i.e. use `SELECT 1` to eagerly active 
JDBCClient.                                                                     
                                                                                
                                                                                
                     [...]
-| kyuubi.engine.jdbc.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the JDBC query engine                      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.memory                                | 1g                
        | The heap memory for the JDBC query engine                             
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.jdbc.session.initialize.sql                                    
       || SemiColon-separated list of SQL statements to be initialized in the 
newly created engine session before queries.                                    
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.engine.jdbc.type                                  | &lt;undefined&gt; 
        | The short name of JDBC type                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.kubernetes.submit.timeout                  | PT30S             
        | The engine submit timeout for Kubernetes application.                 
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.operation.convert.catalog.database.enabled | true              
        | When set to true, The engine converts the JDBC methods of set/get 
Catalog and set/get Schema to the implementation of different engines           
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.engine.operation.log.dir.root                     | 
engine_operation_logs     | Root directory for query operation log at 
engine-side.                                                                    
                                                                                
                                                                                
                                                                                
                                          [...]
-| kyuubi.engine.pool.name                                  | engine-pool       
        | The name of the engine pool.                                          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.pool.selectPolicy                          | RANDOM            
        | The select policy of an engine from the corresponding engine pool 
engine for a session. <ul><li>RANDOM - Randomly use the engine in the 
pool</li><li>POLLING - Polling use the engine in the pool</li></ul>             
                                                                                
                                                                                
                            [...]
-| kyuubi.engine.pool.size                                  | -1                
        | The size of the engine pool. Note that, if the size is less than 1, 
the engine pool will not be enabled; otherwise, the size of the engine pool 
will be min(this, kyuubi.engine.pool.size.threshold).                           
                                                                                
                                                                                
                    [...]
-| kyuubi.engine.pool.size.threshold                        | 9                 
        | This parameter is introduced as a server-side parameter controlling 
the upper limit of the engine pool.                                             
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.engine.session.initialize.sql                                         
       || SemiColon-separated list of SQL statements to be initialized in the 
newly created engine session before queries. This configuration can not be used 
in JDBC url due to the limitation of Beeline/JDBC driver.                       
                                                                                
                                                                                
                [...]
-| kyuubi.engine.share.level                                | USER              
        | Engines will be shared in different levels, available configs are: 
<ul> <li>CONNECTION: the engine will not be shared but only used by the current 
client connection, and the engine will be launched by session user.</li> 
<li>USER: the engine will be shared by all sessions created by a unique 
username, and the engine will be launched by session user.</li> <li>GROUP: the 
engine will be shared by all ses [...]
-| kyuubi.engine.share.level.sub.domain                     | &lt;undefined&gt; 
        | (deprecated) - Using kyuubi.engine.share.level.subdomain instead      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.share.level.subdomain                      | &lt;undefined&gt; 
        | Allow end-users to create a subdomain for the share level of an 
engine. A subdomain is a case-insensitive string values that must be a valid 
zookeeper subpath. For example, for the `USER` share level, an end-user can 
share a certain engine within a subdomain, not for all of its clients. 
End-users are free to create multiple engines in the `USER` share level. When 
disable engine pool, use 'default' if [...]
-| kyuubi.engine.single.spark.session                       | false             
        | When set to true, this engine is running in a single session mode. 
All the JDBC/ODBC connections share the temporary views, function registries, 
SQL configuration and the current database.                                     
                                                                                
                                                                                
                   [...]
-| kyuubi.engine.spark.event.loggers                        | SPARK             
        | A comma-separated list of engine loggers, where 
engine/session/operation etc events go.<ul> <li>SPARK: the events will be 
written to the Spark listener bus.</li> <li>JSON: the events will be written to 
the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to be 
done</li> <li>CUSTOM: to be done.</li></ul>                                     
                                                   [...]
-| kyuubi.engine.spark.initialize.sql                       | SHOW DATABASES    
        | The initialize sql for Spark engine. It fallback to 
`kyuubi.engine.initialize.sql`.                                                 
                                                                                
                                                                                
                                                                                
                                [...]
-| kyuubi.engine.spark.output.mode                          | AUTO              
        | The output mode of Spark engine: <ul> <li>AUTO: For PySpark, the 
extracted `text/plain` from python response as output.</li> <li>NOTEBOOK: For 
PySpark, the original python response as output.</li></ul>                      
                                                                                
                                                                                
                     [...]
-| kyuubi.engine.spark.python.env.archive                   | &lt;undefined&gt; 
        | Portable Python env archive used for Spark engine Python language 
mode.                                                                           
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.engine.spark.python.env.archive.exec.path         | bin/python        
        | The Python exec path under the Python env archive.                    
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.spark.python.home.archive                  | &lt;undefined&gt; 
        | Spark archive containing $SPARK_HOME/python directory, which is used 
to init session Python worker for Python language mode.                         
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.engine.submit.timeout                             | PT30S             
        | Period to tolerant Driver Pod ephemerally invisible after submitting. 
In some Resource Managers, e.g. K8s, the Driver Pod is not visible immediately 
after `spark-submit` is returned.                                               
                                                                                
                                                                                
               [...]
-| kyuubi.engine.trino.connection.keystore.password         | &lt;undefined&gt; 
        | The keystore password used for connecting to trino cluster            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.connection.keystore.path             | &lt;undefined&gt; 
        | The keystore path used for connecting to trino cluster                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.connection.keystore.type             | &lt;undefined&gt; 
        | The keystore type used for connecting to trino cluster                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.connection.password                  | &lt;undefined&gt; 
        | The password used for connecting to trino cluster                     
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.connection.truststore.password       | &lt;undefined&gt; 
        | The truststore password used for connecting to trino cluster          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.connection.truststore.path           | &lt;undefined&gt; 
        | The truststore path used for connecting to trino cluster              
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.connection.truststore.type           | &lt;undefined&gt; 
        | The truststore type used for connecting to trino cluster              
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.connection.user                      | &lt;undefined&gt; 
        | The user used for connecting to trino cluster                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.event.loggers                        | JSON              
        | A comma-separated list of engine history loggers, where 
engine/session/operation etc events go.<ul> <li>JSON: the events will be 
written to the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to 
be done</li> <li>CUSTOM: to be done.</li></ul>                                  
                                                                                
                                    [...]
-| kyuubi.engine.trino.extra.classpath                      | &lt;undefined&gt; 
        | The extra classpath for the Trino query engine, for configuring other 
libs which may need by the Trino engine                                         
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.java.options                         | &lt;undefined&gt; 
        | The extra Java options for the Trino query engine                     
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.trino.memory                               | 1g                
        | The heap memory for the Trino query engine                            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.type                                       | SPARK_SQL         
        | Specify the detailed engine supported by Kyuubi. The engine type 
bindings to SESSION scope. This configuration is experimental. Currently, 
available configs are: <ul> <li>SPARK_SQL: specify this engine type will launch 
a Spark engine which can provide all the capacity of the Apache Spark. Note, 
it's a default engine type.</li> <li>FLINK_SQL: specify this engine type will 
launch a Flink engine which c [...]
-| kyuubi.engine.ui.retainedSessions                        | 200               
        | The number of SQL client sessions kept in the Kyuubi Query Engine web 
UI.                                                                             
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.ui.retainedStatements                      | 200               
        | The number of statements kept in the Kyuubi Query Engine web UI.      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.ui.stop.enabled                            | true              
        | When true, allows Kyuubi engine to be killed from the Spark Web UI.   
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.user.isolated.spark.session                | true              
        | When set to false, if the engine is running in a group or server 
share level, all the JDBC/ODBC connections will be isolated against the user. 
Including the temporary views, function registries, SQL configuration, and the 
current database. Note that, it does not affect if the share level is 
connection or user.                                                             
                                [...]
-| kyuubi.engine.user.isolated.spark.session.idle.interval  | PT1M              
        | The interval to check if the user-isolated Spark session is timeout.  
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.user.isolated.spark.session.idle.timeout   | PT6H              
        | If kyuubi.engine.user.isolated.spark.session is false, we will 
release the Spark session if its corresponding user is inactive after this 
configured timeout.                                                             
                                                                                
                                                                                
                          [...]
-| kyuubi.engine.yarn.app.name                              | &lt;undefined&gt; 
        | The YARN app name when the engine deploy mode is YARN.                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.yarn.cores                                 | 1                 
        | kyuubi engine container core number when the engine deploy mode is 
YARN.                                                                           
                                                                                
                                                                                
                                                                                
                 [...]
-| kyuubi.engine.yarn.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the AM when the engine deploy mode is 
YARN.                                                                           
                                                                                
                                                                                
                                                                                
                   [...]
-| kyuubi.engine.yarn.memory                                | 1024              
        | kyuubi engine container memory in mb when the engine deploy mode is 
YARN.                                                                           
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.engine.yarn.priority                              | &lt;undefined&gt; 
        | kyuubi engine yarn priority when the engine deploy mode is YARN.      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.yarn.queue                                 | default           
        | kyuubi engine yarn queue when the engine deploy mode is YARN.         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.yarn.stagingDir                            | &lt;undefined&gt; 
        | Staging directory used while submitting kyuubi engine to YARN, It 
should be a absolute path in HDFS.                                              
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.engine.yarn.submit.timeout                        | PT30S             
        | The engine submit timeout for YARN application.                       
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
-| kyuubi.engine.yarn.tags                                  | &lt;undefined&gt; 
        | kyuubi engine yarn tags when the engine deploy mode is YARN.          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+|                           Key                            |          Default  
        |                                                                       
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+|----------------------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 [...]
+| kyuubi.engine.chat.ernie.http.connect.timeout            | PT2M              
        | The timeout[ms] for establishing the connection with the ernie bot 
server. A timeout value of zero is interpreted as an infinite timeout.          
                                                                                
                                                                                
                                                                                
                 [...]
+| kyuubi.engine.chat.ernie.http.proxy                      | &lt;undefined&gt; 
        | HTTP proxy url for API calling in ernie bot engine. e.g. 
http://127.0.0.1:1088                                                           
                                                                                
                                                                                
                                                                                
                           [...]
+| kyuubi.engine.chat.ernie.http.socket.timeout             | PT2M              
        | The timeout[ms] for waiting for data packets after ernie bot server 
connection is established. A timeout value of zero is interpreted as an 
infinite timeout.                                                               
                                                                                
                                                                                
                        [...]
+| kyuubi.engine.chat.ernie.model                           | completions       
        | ID of the model used in ernie bot. Available models are 
completions_pro, ernie_bot_8k, completions and eb-instant[Model 
overview](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/6lp69is2a).              
                                                                                
                                                                                
                                            [...]
+| kyuubi.engine.chat.ernie.token                           | &lt;undefined&gt; 
        | The token to access ernie bot open API, which could be got at 
https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Ilkkrb0i5                          
                                                                                
                                                                                
                                                                                
                      [...]
+| kyuubi.engine.chat.extra.classpath                       | &lt;undefined&gt; 
        | The extra classpath for the Chat engine, for configuring the location 
of the SDK and etc.                                                             
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.chat.gpt.apiKey                            | &lt;undefined&gt; 
        | The key to access OpenAI open API, which could be got at 
https://platform.openai.com/account/api-keys                                    
                                                                                
                                                                                
                                                                                
                           [...]
+| kyuubi.engine.chat.gpt.http.connect.timeout              | PT2M              
        | The timeout[ms] for establishing the connection with the Chat GPT 
server. A timeout value of zero is interpreted as an infinite timeout.          
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.engine.chat.gpt.http.proxy                        | &lt;undefined&gt; 
        | HTTP proxy url for API calling in Chat GPT engine. e.g. 
http://127.0.0.1:1087                                                           
                                                                                
                                                                                
                                                                                
                            [...]
+| kyuubi.engine.chat.gpt.http.socket.timeout               | PT2M              
        | The timeout[ms] for waiting for data packets after Chat GPT server 
connection is established. A timeout value of zero is interpreted as an 
infinite timeout.                                                               
                                                                                
                                                                                
                         [...]
+| kyuubi.engine.chat.gpt.model                             | gpt-3.5-turbo     
        | ID of the model used in ChatGPT. Available models refer to OpenAI's 
[Model overview](https://platform.openai.com/docs/models/overview).             
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.engine.chat.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the Chat engine                            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.chat.memory                                | 1g                
        | The heap memory for the Chat engine                                   
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.chat.provider                              | ECHO              
        | The provider for the Chat engine. Candidates: <ul> <li>ECHO: simply 
replies a welcome message.</li> <li>GPT: a.k.a ChatGPT, powered by OpenAI.</li> 
<li>ERNIE: ErnieBot, powered by Baidu.</li></ul>                                
                                                                                
                                                                                
                [...]
+| kyuubi.engine.connection.url.use.hostname                | true              
        | (deprecated) When true, the engine registers with hostname to 
zookeeper. When Spark runs on K8s with cluster mode, set to false to ensure 
that server can connect to engine                                               
                                                                                
                                                                                
                          [...]
+| kyuubi.engine.deregister.exception.classes                                   
       || A comma-separated list of exception classes. If there is any 
exception thrown, whose class matches the specified classes, the engine would 
deregister itself.                                                              
                                                                                
                                                                                
                         [...]
+| kyuubi.engine.deregister.exception.messages                                  
       || A comma-separated list of exception messages. If there is any 
exception thrown, whose message or stacktrace matches the specified message 
list, the engine would deregister itself.                                       
                                                                                
                                                                                
                          [...]
+| kyuubi.engine.deregister.exception.ttl                   | PT30M             
        | Time to live(TTL) for exceptions pattern specified in 
kyuubi.engine.deregister.exception.classes and 
kyuubi.engine.deregister.exception.messages to deregister engines. Once the 
total error count hits the kyuubi.engine.deregister.job.max.failures within the 
TTL, an engine will deregister itself and wait for self-terminated. Otherwise, 
we suppose that the engine has recovered from temporary failures.   [...]
+| kyuubi.engine.deregister.job.max.failures                | 4                 
        | Number of failures of job before deregistering the engine.            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.doAs.enabled                               | true              
        | Whether to enable user impersonation on launching engine. When 
enabled, for engines which supports user impersonation, e.g. SPARK, depends on 
the `kyuubi.engine.share.level`, different users will be used to launch the 
engine. Otherwise, Kyuubi Server's user will always be used to launch the 
engine.                                                                         
                                [...]
+| kyuubi.engine.event.json.log.path                        | 
file:///tmp/kyuubi/events | The location where all the engine events go for the 
built-in JSON logger.<ul><li>Local Path: start with 'file://'</li><li>HDFS 
Path: start with 'hdfs://'</li></ul>                                            
                                                                                
                                                                                
                                     [...]
+| kyuubi.engine.event.loggers                              | SPARK             
        | A comma-separated list of engine history loggers, where 
engine/session/operation etc events go.<ul> <li>SPARK: the events will be 
written to the Spark listener bus.</li> <li>JSON: the events will be written to 
the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to be 
done</li> <li>CUSTOM: User-defined event handlers.</li></ul> Note that: Kyuubi 
supports custom event handlers with the Jav [...]
+| kyuubi.engine.flink.application.jars                     | &lt;undefined&gt; 
        | A comma-separated list of the local jars to be shipped with the job 
to the cluster. For example, SQL UDF jars. Only effective in yarn application 
mode.                                                                           
                                                                                
                                                                                
                  [...]
+| kyuubi.engine.flink.extra.classpath                      | &lt;undefined&gt; 
        | The extra classpath for the Flink SQL engine, for configuring the 
location of hadoop client jars, etc. Only effective in yarn session mode.       
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.engine.flink.initialize.sql                       | SHOW DATABASES    
        | The initialize sql for Flink engine. It fallback to 
`kyuubi.engine.initialize.sql`.                                                 
                                                                                
                                                                                
                                                                                
                                [...]
+| kyuubi.engine.flink.java.options                         | &lt;undefined&gt; 
        | The extra Java options for the Flink SQL engine. Only effective in 
yarn session mode.                                                              
                                                                                
                                                                                
                                                                                
                 [...]
+| kyuubi.engine.flink.memory                               | 1g                
        | The heap memory for the Flink SQL engine. Only effective in yarn 
session mode.                                                                   
                                                                                
                                                                                
                                                                                
                   [...]
+| kyuubi.engine.hive.deploy.mode                           | LOCAL             
        | Configures the hive engine deploy mode, The value can be 'local', 
'yarn'. In local mode, the engine operates on the same node as the 
KyuubiServer. In YARN mode, the engine runs within the Application Master (AM) 
container of YARN.                                                              
                                                                                
                                [...]
+| kyuubi.engine.hive.event.loggers                         | JSON              
        | A comma-separated list of engine history loggers, where 
engine/session/operation etc events go.<ul> <li>JSON: the events will be 
written to the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to 
be done</li> <li>CUSTOM: to be done.</li></ul>                                  
                                                                                
                                    [...]
+| kyuubi.engine.hive.extra.classpath                       | &lt;undefined&gt; 
        | The extra classpath for the Hive query engine, for configuring 
location of the hadoop client jars and etc.                                     
                                                                                
                                                                                
                                                                                
                     [...]
+| kyuubi.engine.hive.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the Hive query engine                      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.hive.memory                                | 1g                
        | The heap memory for the Hive query engine                             
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.initialize.sql                             | SHOW DATABASES    
        | SemiColon-separated list of SQL statements to be initialized in the 
newly created engine before queries. i.e. use `SHOW DATABASES` to eagerly 
active HiveClient. This configuration can not be used in JDBC url due to the 
limitation of Beeline/JDBC driver.                                              
                                                                                
                         [...]
+| kyuubi.engine.jdbc.connection.password                   | &lt;undefined&gt; 
        | The password is used for connecting to server                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.connection.propagateCredential        | false             
        | Whether to use the session's user and password to connect to database 
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.connection.properties                                     
       || The additional properties are used for connecting to server           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.connection.provider                   | &lt;undefined&gt; 
        | A JDBC connection provider plugin for the Kyuubi Server to establish 
a connection to the JDBC URL. The configuration value should be a subclass of 
`org.apache.kyuubi.engine.jdbc.connection.JdbcConnectionProvider`. Kyuubi 
provides the following built-in implementations: <li>doris: For establishing 
Doris connections.</li> <li>mysql: For establishing MySQL connections.</li> 
<li>phoenix: For establishing [...]
+| kyuubi.engine.jdbc.connection.url                        | &lt;undefined&gt; 
        | The server url that engine will connect to                            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.connection.user                       | &lt;undefined&gt; 
        | The user is used for connecting to server                             
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.driver.class                          | &lt;undefined&gt; 
        | The driver class for JDBC engine connection                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.extra.classpath                       | &lt;undefined&gt; 
        | The extra classpath for the JDBC query engine, for configuring the 
location of the JDBC driver and etc.                                            
                                                                                
                                                                                
                                                                                
                 [...]
+| kyuubi.engine.jdbc.fetch.size                            | 1000              
        | The fetch size of JDBC engine                                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.initialize.sql                        | SELECT 1          
        | SemiColon-separated list of SQL statements to be initialized in the 
newly created engine before queries. i.e. use `SELECT 1` to eagerly active 
JDBCClient.                                                                     
                                                                                
                                                                                
                     [...]
+| kyuubi.engine.jdbc.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the JDBC query engine                      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.memory                                | 1g                
        | The heap memory for the JDBC query engine                             
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.operation.incremental.collect         | false             
        | When true, the result will be sequentially calculated and returned to 
the JDBC engine. It fallback to `kyuubi.operation.incremental.collect`          
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.jdbc.session.initialize.sql                                    
       || SemiColon-separated list of SQL statements to be initialized in the 
newly created engine session before queries.                                    
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.engine.jdbc.type                                  | &lt;undefined&gt; 
        | The short name of JDBC type                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.kubernetes.submit.timeout                  | PT30S             
        | The engine submit timeout for Kubernetes application.                 
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.operation.convert.catalog.database.enabled | true              
        | When set to true, The engine converts the JDBC methods of set/get 
Catalog and set/get Schema to the implementation of different engines           
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.engine.operation.log.dir.root                     | 
engine_operation_logs     | Root directory for query operation log at 
engine-side.                                                                    
                                                                                
                                                                                
                                                                                
                                          [...]
+| kyuubi.engine.pool.name                                  | engine-pool       
        | The name of the engine pool.                                          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.pool.selectPolicy                          | RANDOM            
        | The select policy of an engine from the corresponding engine pool 
engine for a session. <ul><li>RANDOM - Randomly use the engine in the 
pool</li><li>POLLING - Polling use the engine in the pool</li></ul>             
                                                                                
                                                                                
                            [...]
+| kyuubi.engine.pool.size                                  | -1                
        | The size of the engine pool. Note that, if the size is less than 1, 
the engine pool will not be enabled; otherwise, the size of the engine pool 
will be min(this, kyuubi.engine.pool.size.threshold).                           
                                                                                
                                                                                
                    [...]
+| kyuubi.engine.pool.size.threshold                        | 9                 
        | This parameter is introduced as a server-side parameter controlling 
the upper limit of the engine pool.                                             
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.engine.session.initialize.sql                                         
       || SemiColon-separated list of SQL statements to be initialized in the 
newly created engine session before queries. This configuration can not be used 
in JDBC url due to the limitation of Beeline/JDBC driver.                       
                                                                                
                                                                                
                [...]
+| kyuubi.engine.share.level                                | USER              
        | Engines will be shared in different levels, available configs are: 
<ul> <li>CONNECTION: the engine will not be shared but only used by the current 
client connection, and the engine will be launched by session user.</li> 
<li>USER: the engine will be shared by all sessions created by a unique 
username, and the engine will be launched by session user.</li> <li>GROUP: the 
engine will be shared by all ses [...]
+| kyuubi.engine.share.level.sub.domain                     | &lt;undefined&gt; 
        | (deprecated) - Using kyuubi.engine.share.level.subdomain instead      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.share.level.subdomain                      | &lt;undefined&gt; 
        | Allow end-users to create a subdomain for the share level of an 
engine. A subdomain is a case-insensitive string values that must be a valid 
zookeeper subpath. For example, for the `USER` share level, an end-user can 
share a certain engine within a subdomain, not for all of its clients. 
End-users are free to create multiple engines in the `USER` share level. When 
disable engine pool, use 'default' if [...]
+| kyuubi.engine.single.spark.session                       | false             
        | When set to true, this engine is running in a single session mode. 
All the JDBC/ODBC connections share the temporary views, function registries, 
SQL configuration and the current database.                                     
                                                                                
                                                                                
                   [...]
+| kyuubi.engine.spark.event.loggers                        | SPARK             
        | A comma-separated list of engine loggers, where 
engine/session/operation etc events go.<ul> <li>SPARK: the events will be 
written to the Spark listener bus.</li> <li>JSON: the events will be written to 
the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to be 
done</li> <li>CUSTOM: to be done.</li></ul>                                     
                                                   [...]
+| kyuubi.engine.spark.initialize.sql                       | SHOW DATABASES    
        | The initialize sql for Spark engine. It fallback to 
`kyuubi.engine.initialize.sql`.                                                 
                                                                                
                                                                                
                                                                                
                                [...]
+| kyuubi.engine.spark.operation.incremental.collect        | false             
        | When true, the result will be sequentially calculated and returned to 
the Spark driver. Note that, kyuubi.operation.result.max.rows will be ignored 
on incremental collect mode. It fallback to 
`kyuubi.operation.incremental.collect`                                          
                                                                                
                                                    [...]
+| kyuubi.engine.spark.output.mode                          | AUTO              
        | The output mode of Spark engine: <ul> <li>AUTO: For PySpark, the 
extracted `text/plain` from python response as output.</li> <li>NOTEBOOK: For 
PySpark, the original python response as output.</li></ul>                      
                                                                                
                                                                                
                     [...]
+| kyuubi.engine.spark.python.env.archive                   | &lt;undefined&gt; 
        | Portable Python env archive used for Spark engine Python language 
mode.                                                                           
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.engine.spark.python.env.archive.exec.path         | bin/python        
        | The Python exec path under the Python env archive.                    
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.spark.python.home.archive                  | &lt;undefined&gt; 
        | Spark archive containing $SPARK_HOME/python directory, which is used 
to init session Python worker for Python language mode.                         
                                                                                
                                                                                
                                                                                
               [...]
+| kyuubi.engine.submit.timeout                             | PT30S             
        | Period to tolerant Driver Pod ephemerally invisible after submitting. 
In some Resource Managers, e.g. K8s, the Driver Pod is not visible immediately 
after `spark-submit` is returned.                                               
                                                                                
                                                                                
               [...]
+| kyuubi.engine.trino.connection.keystore.password         | &lt;undefined&gt; 
        | The keystore password used for connecting to trino cluster            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.connection.keystore.path             | &lt;undefined&gt; 
        | The keystore path used for connecting to trino cluster                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.connection.keystore.type             | &lt;undefined&gt; 
        | The keystore type used for connecting to trino cluster                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.connection.password                  | &lt;undefined&gt; 
        | The password used for connecting to trino cluster                     
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.connection.truststore.password       | &lt;undefined&gt; 
        | The truststore password used for connecting to trino cluster          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.connection.truststore.path           | &lt;undefined&gt; 
        | The truststore path used for connecting to trino cluster              
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.connection.truststore.type           | &lt;undefined&gt; 
        | The truststore type used for connecting to trino cluster              
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.connection.user                      | &lt;undefined&gt; 
        | The user used for connecting to trino cluster                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.event.loggers                        | JSON              
        | A comma-separated list of engine history loggers, where 
engine/session/operation etc events go.<ul> <li>JSON: the events will be 
written to the location of kyuubi.engine.event.json.log.path</li> <li>JDBC: to 
be done</li> <li>CUSTOM: to be done.</li></ul>                                  
                                                                                
                                    [...]
+| kyuubi.engine.trino.extra.classpath                      | &lt;undefined&gt; 
        | The extra classpath for the Trino query engine, for configuring other 
libs which may need by the Trino engine                                         
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.java.options                         | &lt;undefined&gt; 
        | The extra Java options for the Trino query engine                     
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.memory                               | 1g                
        | The heap memory for the Trino query engine                            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.trino.operation.incremental.collect        | false             
        | When true, the result will be sequentially calculated and returned to 
the trino. It fallback to `kyuubi.operation.incremental.collect`                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.type                                       | SPARK_SQL         
        | Specify the detailed engine supported by Kyuubi. The engine type 
bindings to SESSION scope. This configuration is experimental. Currently, 
available configs are: <ul> <li>SPARK_SQL: specify this engine type will launch 
a Spark engine which can provide all the capacity of the Apache Spark. Note, 
it's a default engine type.</li> <li>FLINK_SQL: specify this engine type will 
launch a Flink engine which c [...]
+| kyuubi.engine.ui.retainedSessions                        | 200               
        | The number of SQL client sessions kept in the Kyuubi Query Engine web 
UI.                                                                             
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.ui.retainedStatements                      | 200               
        | The number of statements kept in the Kyuubi Query Engine web UI.      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.ui.stop.enabled                            | true              
        | When true, allows Kyuubi engine to be killed from the Spark Web UI.   
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.user.isolated.spark.session                | true              
        | When set to false, if the engine is running in a group or server 
share level, all the JDBC/ODBC connections will be isolated against the user. 
Including the temporary views, function registries, SQL configuration, and the 
current database. Note that, it does not affect if the share level is 
connection or user.                                                             
                                [...]
+| kyuubi.engine.user.isolated.spark.session.idle.interval  | PT1M              
        | The interval to check if the user-isolated Spark session is timeout.  
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.user.isolated.spark.session.idle.timeout   | PT6H              
        | If kyuubi.engine.user.isolated.spark.session is false, we will 
release the Spark session if its corresponding user is inactive after this 
configured timeout.                                                             
                                                                                
                                                                                
                          [...]
+| kyuubi.engine.yarn.app.name                              | &lt;undefined&gt; 
        | The YARN app name when the engine deploy mode is YARN.                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.yarn.cores                                 | 1                 
        | kyuubi engine container core number when the engine deploy mode is 
YARN.                                                                           
                                                                                
                                                                                
                                                                                
                 [...]
+| kyuubi.engine.yarn.java.options                          | &lt;undefined&gt; 
        | The extra Java options for the AM when the engine deploy mode is 
YARN.                                                                           
                                                                                
                                                                                
                                                                                
                   [...]
+| kyuubi.engine.yarn.memory                                | 1024              
        | kyuubi engine container memory in mb when the engine deploy mode is 
YARN.                                                                           
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.engine.yarn.priority                              | &lt;undefined&gt; 
        | kyuubi engine yarn priority when the engine deploy mode is YARN.      
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.yarn.queue                                 | default           
        | kyuubi engine yarn queue when the engine deploy mode is YARN.         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.yarn.stagingDir                            | &lt;undefined&gt; 
        | Staging directory used while submitting kyuubi engine to YARN, It 
should be a absolute path in HDFS.                                              
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.engine.yarn.submit.timeout                        | PT30S             
        | The engine submit timeout for YARN application.                       
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.engine.yarn.tags                                  | &lt;undefined&gt; 
        | kyuubi engine yarn tags when the engine deploy mode is YARN.          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
 
 ### Event
 
diff --git 
a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala
 
b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala
index 7ced3e6b8..c163e8c22 100644
--- 
a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala
+++ 
b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala
@@ -20,7 +20,7 @@ import java.util
 
 import org.apache.kyuubi.KyuubiSQLException
 import org.apache.kyuubi.config.KyuubiConf
-import org.apache.kyuubi.config.KyuubiConf.{ENGINE_JDBC_FETCH_SIZE, 
OPERATION_INCREMENTAL_COLLECT}
+import org.apache.kyuubi.config.KyuubiConf.{ENGINE_JDBC_FETCH_SIZE, 
ENGINE_JDBC_OPERATION_INCREMENTAL_COLLECT}
 import org.apache.kyuubi.engine.jdbc.dialect.{JdbcDialect, JdbcDialects}
 import org.apache.kyuubi.engine.jdbc.session.JdbcSessionImpl
 import org.apache.kyuubi.engine.jdbc.util.SupportServiceLoader
@@ -41,9 +41,9 @@ class JdbcOperationManager(conf: KyuubiConf) extends 
OperationManager("JdbcOpera
       runAsync: Boolean,
       queryTimeout: Long): Operation = {
     val normalizedConf = session.asInstanceOf[JdbcSessionImpl].normalizedConf
-    val incrementalCollect = 
normalizedConf.get(OPERATION_INCREMENTAL_COLLECT.key).map(
+    val incrementalCollect = 
normalizedConf.get(ENGINE_JDBC_OPERATION_INCREMENTAL_COLLECT.key).map(
       _.toBoolean).getOrElse(
-      session.sessionManager.getConf.get(OPERATION_INCREMENTAL_COLLECT))
+      
session.sessionManager.getConf.get(ENGINE_JDBC_OPERATION_INCREMENTAL_COLLECT))
     val fetchSize = normalizedConf.get(ENGINE_JDBC_FETCH_SIZE.key).map(_.toInt)
       .getOrElse(session.sessionManager.getConf.get(ENGINE_JDBC_FETCH_SIZE))
     val executeStatement =
diff --git 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkSQLOperationManager.scala
 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkSQLOperationManager.scala
index cd365c62a..5533d9c45 100644
--- 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkSQLOperationManager.scala
+++ 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkSQLOperationManager.scala
@@ -35,7 +35,8 @@ class SparkSQLOperationManager private (name: String) extends 
OperationManager(n
   def this() = this(classOf[SparkSQLOperationManager].getSimpleName)
 
   private lazy val planOnlyModeDefault = getConf.get(OPERATION_PLAN_ONLY_MODE)
-  private lazy val operationIncrementalCollectDefault = 
getConf.get(OPERATION_INCREMENTAL_COLLECT)
+  private lazy val operationIncrementalCollectDefault =
+    getConf.get(ENGINE_SPARK_OPERATION_INCREMENTAL_COLLECT)
   private lazy val operationLanguageDefault = getConf.get(OPERATION_LANGUAGE)
   private lazy val operationConvertCatalogDatabaseDefault =
     getConf.get(ENGINE_OPERATION_CONVERT_CATALOG_DATABASE_ENABLED)
@@ -83,8 +84,10 @@ class SparkSQLOperationManager private (name: String) 
extends OperationManager(n
           spark.conf.set(OPERATION_PLAN_ONLY_MODE.key, mode.name)
           mode match {
             case NoneMode =>
-              val incrementalCollect = 
spark.conf.getOption(OPERATION_INCREMENTAL_COLLECT.key)
-                .map(_.toBoolean).getOrElse(operationIncrementalCollectDefault)
+              val incrementalCollect =
+                
spark.conf.getOption(ENGINE_SPARK_OPERATION_INCREMENTAL_COLLECT.key)
+                  
.orElse(spark.conf.getOption(OPERATION_INCREMENTAL_COLLECT.key))
+                  
.map(_.toBoolean).getOrElse(operationIncrementalCollectDefault)
               // TODO: respect the config of the operation ExecuteStatement, 
if it was set.
               val resultFormat = spark.conf.get(OPERATION_RESULT_FORMAT.key, 
"thrift")
               resultFormat.toLowerCase match {
diff --git 
a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala
 
b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala
index fb9873fd0..0a2fd3473 100644
--- 
a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala
+++ 
b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala
@@ -337,7 +337,7 @@ class SparkOperationSuite extends WithSparkSQLEngine with 
HiveMetadataTests with
   test("test fetch orientation with incremental collect mode") {
     val sql = "SELECT id FROM range(2)"
 
-    withSessionConf(Map(KyuubiConf.OPERATION_INCREMENTAL_COLLECT.key -> 
"true"))()() {
+    
withSessionConf(Map(KyuubiConf.ENGINE_SPARK_OPERATION_INCREMENTAL_COLLECT.key 
-> "true"))()() {
       withSessionHandle { (client, handle) =>
         val req = new TExecuteStatementReq()
         req.setSessionHandle(handle)
diff --git 
a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationManager.scala
 
b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationManager.scala
index e00699f9e..c68cb6b82 100644
--- 
a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationManager.scala
+++ 
b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationManager.scala
@@ -44,9 +44,9 @@ class TrinoOperationManager extends 
OperationManager("TrinoOperationManager") {
         return catalogDatabaseOperation
       }
     }
-    val incrementalCollect = 
normalizedConf.get(OPERATION_INCREMENTAL_COLLECT.key).map(
+    val incrementalCollect = 
normalizedConf.get(ENGINE_TRINO_OPERATION_INCREMENTAL_COLLECT.key).map(
       _.toBoolean).getOrElse(
-      session.sessionManager.getConf.get(OPERATION_INCREMENTAL_COLLECT))
+      
session.sessionManager.getConf.get(ENGINE_TRINO_OPERATION_INCREMENTAL_COLLECT))
     val operation =
       new ExecuteStatement(session, statement, runAsync, queryTimeout, 
incrementalCollect)
     addOperation(operation)
diff --git 
a/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationIncrementCollectSuite.scala
 
b/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationIncrementCollectSuite.scala
index 9efd0978b..75078bc1f 100644
--- 
a/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationIncrementCollectSuite.scala
+++ 
b/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationIncrementCollectSuite.scala
@@ -17,10 +17,10 @@
 
 package org.apache.kyuubi.engine.trino.operation
 
-import org.apache.kyuubi.config.KyuubiConf.{ENGINE_TRINO_CONNECTION_CATALOG, 
OPERATION_INCREMENTAL_COLLECT}
+import org.apache.kyuubi.config.KyuubiConf.{ENGINE_TRINO_CONNECTION_CATALOG, 
ENGINE_TRINO_OPERATION_INCREMENTAL_COLLECT}
 
 class TrinoOperationIncrementCollectSuite extends TrinoOperationSuite {
   override def withKyuubiConf: Map[String, String] = Map(
     ENGINE_TRINO_CONNECTION_CATALOG.key -> "memory",
-    OPERATION_INCREMENTAL_COLLECT.key -> "true")
+    ENGINE_TRINO_OPERATION_INCREMENTAL_COLLECT.key -> "true")
 }
diff --git 
a/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
 
b/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
index c3a81a9e4..fba72f2ac 100644
--- 
a/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
+++ 
b/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
@@ -604,7 +604,7 @@ class TrinoOperationSuite extends WithTrinoEngine with 
TrinoQueryTests {
 
       val tFetchResultsReq3 = new TFetchResultsReq(opHandle, 
TFetchOrientation.FETCH_PRIOR, 1)
       val tFetchResultsResp3 = client.FetchResults(tFetchResultsReq3)
-      if (kyuubiConf.get(OPERATION_INCREMENTAL_COLLECT)) {
+      if (kyuubiConf.get(ENGINE_TRINO_OPERATION_INCREMENTAL_COLLECT)) {
         assert(tFetchResultsResp3.getStatus.getStatusCode === 
TStatusCode.ERROR_STATUS)
       } else {
         assert(tFetchResultsResp3.getStatus.getStatusCode === 
TStatusCode.SUCCESS_STATUS)
@@ -615,7 +615,7 @@ class TrinoOperationSuite extends WithTrinoEngine with 
TrinoQueryTests {
 
       val tFetchResultsReq4 = new TFetchResultsReq(opHandle, 
TFetchOrientation.FETCH_FIRST, 3)
       val tFetchResultsResp4 = client.FetchResults(tFetchResultsReq4)
-      if (kyuubiConf.get(OPERATION_INCREMENTAL_COLLECT)) {
+      if (kyuubiConf.get(ENGINE_TRINO_OPERATION_INCREMENTAL_COLLECT)) {
         assert(tFetchResultsResp4.getStatus.getStatusCode === 
TStatusCode.ERROR_STATUS)
       } else {
         assert(tFetchResultsResp4.getStatus.getStatusCode === 
TStatusCode.SUCCESS_STATUS)
diff --git 
a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala 
b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
index 04734ae92..da8b3395a 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
@@ -2033,8 +2033,7 @@ object KyuubiConf {
     buildConf("kyuubi.operation.incremental.collect")
       .internal
       .doc("When true, the executor side result will be sequentially 
calculated and returned to" +
-        s" the Spark driver side. Note that, ${OPERATION_RESULT_MAX_ROWS.key} 
will be ignored" +
-        " on incremental collect mode.")
+        s" the engine side.")
       .version("1.4.0")
       .booleanConf
       .createWithDefault(false)
@@ -2700,6 +2699,14 @@ object KyuubiConf {
       .stringConf
       .createWithDefault("yyyy-MM-dd HH:mm:ss.SSS")
 
+  val ENGINE_SPARK_OPERATION_INCREMENTAL_COLLECT: ConfigEntry[Boolean] =
+    buildConf("kyuubi.engine.spark.operation.incremental.collect")
+      .doc("When true, the result will be sequentially calculated and returned 
to" +
+        s" the Spark driver. Note that, ${OPERATION_RESULT_MAX_ROWS.key} will 
be ignored" +
+        " on incremental collect mode. It fallback to 
`kyuubi.operation.incremental.collect`")
+      .version("1.10.0")
+      .fallbackConf(OPERATION_INCREMENTAL_COLLECT)
+
   val ENGINE_SESSION_SPARK_INITIALIZE_SQL: ConfigEntry[Seq[String]] =
     buildConf("kyuubi.session.engine.spark.initialize.sql")
       .doc("The initialize sql for Spark session. " +
@@ -2729,6 +2736,13 @@ object KyuubiConf {
       .stringConf
       .createOptional
 
+  val ENGINE_TRINO_OPERATION_INCREMENTAL_COLLECT: ConfigEntry[Boolean] =
+    buildConf("kyuubi.engine.trino.operation.incremental.collect")
+      .doc("When true, the result will be sequentially calculated and returned 
to" +
+        " the trino. It fallback to `kyuubi.operation.incremental.collect`")
+      .version("1.10.0")
+      .fallbackConf(OPERATION_INCREMENTAL_COLLECT)
+
   val ENGINE_HIVE_MEMORY: ConfigEntry[String] =
     buildConf("kyuubi.engine.hive.memory")
       .doc("The heap memory for the Hive query engine")
@@ -3089,6 +3103,13 @@ object KyuubiConf {
       .intConf
       .createWithDefault(1000)
 
+  val ENGINE_JDBC_OPERATION_INCREMENTAL_COLLECT: ConfigEntry[Boolean] =
+    buildConf("kyuubi.engine.jdbc.operation.incremental.collect")
+      .doc("When true, the result will be sequentially calculated and returned 
to" +
+        " the JDBC engine. It fallback to 
`kyuubi.operation.incremental.collect`")
+      .version("1.10.0")
+      .fallbackConf(OPERATION_INCREMENTAL_COLLECT)
+
   val ENGINE_OPERATION_CONVERT_CATALOG_DATABASE_ENABLED: ConfigEntry[Boolean] =
     buildConf("kyuubi.engine.operation.convert.catalog.database.enabled")
       .doc("When set to true, The engine converts the JDBC methods of set/get 
Catalog " +

Reply via email to