qianmoQ opened a new issue, #5311:
URL: https://github.com/apache/kyuubi/issues/5311

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the 
[issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Describe the bug
   
   java code:
   
   ```java
   try {
               Class.forName("org.apache.kyuubi.jdbc.KyuubiHiveDriver");
               Properties properties = new Properties();
               properties.put("user", source.getUsername());
               if (StringUtils.isNotEmpty(source.getPassword())) {
                   properties.put("password", source.getPassword());
               }
               if (env == null) {
                   env = Maps.newConcurrentMap();
               }
               properties.put("spark.app.name", configure.getClusterTaskName());
               if (commonEnv != null) {
                   env.putAll(commonEnv);
               }
   
               String url;
               if (ObjectUtils.isEmpty(source.getPort())) {
                   url = String.format("jdbc:%s://%s", "kyuubi", 
source.getHost());
               }
               else {
                   url = String.format("jdbc:%s://%s:%s", "kyuubi", 
source.getHost(), source.getPort());
               }
               if (env != null) {
                   StringBuilder urlBuilder = new 
StringBuilder(url).append("/;");
                   for (Map.Entry<String, Object> entry : env.entrySet()) {
                       String key = URLEncoder.encode(entry.getKey(), "UTF-8");
                       String value = 
URLEncoder.encode(entry.getValue().toString(), "UTF-8");
                       urlBuilder.append(key)
                               .append("=")
                               .append(value)
                               .append(";");
                   }
                   url = urlBuilder.toString().substring(0, urlBuilder.length() 
- 1);
               }
               logger.info("Jdbc url: {}", url);
               connection = DriverManager.getConnection(url, properties);
           }
           catch (Exception exception) {
               logger.error("Start failed", exception);
               configure.setState(TaskState.FAILURE);
               configure.setMessage(exception.getMessage());
           }
   ```
   
   jdbc url : 
`jdbc:kyuubi://localhost:11009/;kyuubi.engine.type=HIVE_SQL;timeout=43200;spark.yarn.queue=online`
   
   log output 
   
   ```java
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    : 2023-09-19 17:52:30.859 INFO 
org.apache.kyuubi.engine.EngineRef: Launching engine:
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    : 
/a8root/spark-3.1.2-bin-hadoop3.2/bin/spark-submit \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --class 
org.apache.kyuubi.engine.spark.SparkSQLEngine \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.hive.server2.thrift.resultset.default.fetch.size=1000 \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.backend.engine.exec.pool.size=30 \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.backend.engine.exec.pool.wait.queue.size=100 \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.client.ipAddress=192.168.32.123 \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.client.version=1.7.1 \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.engine.event.json.log.path=/a8root/work/kyuubi/apache-kyuubi-1.7.0-bin/logs
 \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.engine.event.loggers=JSON \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.engine.share.level=CONNECTION \
   2023-09-19 17:52:36.031  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.engine.submit.time=1695117150858 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.frontend.protocols=THRIFT_BINARY,REST,TRINO \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.ha.enabled=true \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.ha.engine.ref.id=3f74f60b-d0bc-42b0-837c-8bffc3de87a4 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.ha.namespace=/kyuubi_cluster170_1.7.0_CONNECTION_SPARK_SQL/hadoop/3f74f60b-d0bc-42b0-837c-8bffc3de87a4
 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.ha.zookeeper.client.port=2181 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.ha.zookeeper.namespace=kyuubi_cluster170 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.ha.zookeeper.quorum=tx4-data-dsj-test102.bj,tx4-data-dsj-test103.bj,tx4-data-dsj-test104.bj
 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.ha.zookeeper.session.timeout=600000 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.server.ipAddress=10.100.130.33 \
   2023-09-19 17:52:36.033  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.session.connection.url=tx4-data-dsj-test103.bj:11009 \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.session.engine.idle.timeout=PT9M \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.session.engine.trino.connection.catalog=hive \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.session.engine.trino.connection.url=http://tx4-data-dsj-test105.bj:17979
 \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.session.idle.timeout=PT4M \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.kyuubi.session.real.user=hadoop \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.app.name=kyuubi_CONNECTION_SPARK_SQL_hadoop_3f74f60b-d0bc-42b0-837c-8bffc3de87a4
 \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.driver.memory=6g \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.dynamicAllocation.cachedExecutorIdleTimeout=30min \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.dynamicAllocation.enabled=true \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.dynamicAllocation.executorIdleTimeout=60s \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.dynamicAllocation.minExecutors=5 \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.executor.heartbeatInterval=30s \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.executor.memory=6g \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.hadoop.fs.hdfs.impl.disable.cache=true \
   2023-09-19 17:52:36.034  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf spark.master=yarn \
   2023-09-19 17:52:36.035  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.scheduler.mode=FAIR \
   2023-09-19 17:52:36.035  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.shuffle.service.enabled=true \
   2023-09-19 17:52:36.035  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.shuffle.useOldFetchProtocol=true \
   2023-09-19 17:52:36.035  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.sql.legacy.timeParserPolicy=LEGACY \
   2023-09-19 17:52:36.035  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.submit.deployMode=cluster \
   2023-09-19 17:52:36.035  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --conf 
spark.yarn.tags=KYUUBI,3f74f60b-d0bc-42b0-837c-8bffc3de87a4 \
   2023-09-19 17:52:36.035  INFO 53498 --- [gine-launch-log] 
o.a.kyuubi.jdbc.hive.KyuubiConnection    :         --proxy-user hadoop 
/a8root/work/kyuubi/apache-kyuubi-1.7.0-bin/externals/engines/spark/kyuubi-spark-sql-engine_2.12-1.7.0.jar
   ```
   
   kyuubi jdbc version: `kyuubi-hive-jdbc-shaded: 1.7.1`
   
   The `spark.app.name` and queue configurations that I specified do not take 
effect on the yarn cluster
   
   ### Affects Version(s)
   
   1.7.0
   
   ### Kyuubi Server Log Output
   
   _No response_
   
   ### Kyuubi Engine Log Output
   
   _No response_
   
   ### Kyuubi Server Configurations
   
   _No response_
   
   ### Kyuubi Engine Configurations
   
   _No response_
   
   ### Additional context
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes. I would be willing to submit a PR with guidance from the Kyuubi 
community to fix.
   - [X] No. I cannot submit a PR at this time.


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

To unsubscribe, e-mail: [email protected]

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


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

Reply via email to