[Feature][Datasource] Support Kyuubi three-segment JDBC URL syntax (<sessionVars>?<hiveVars>#<kyuubiVars>) in Kyuubi datasource plugin
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Search before asking
- I had searched in the issues first to see whether the same feature was requested already.
Description
Currently, in dolphinscheduler-datasource-kyuubi (and dolphinscheduler-datasource-hive), DolphinScheduler constructs the JDBC URL by forcibly concatenating parameters using semicolons (;):
// KyuubiDataSourceProcessor.java
@Override
public String getJdbcUrl(ConnectionParam connectionParam) {
KyuubiConnectionParam kyuubiConnectionParam = (KyuubiConnectionParam) connectionParam;
String jdbcUrl = kyuubiConnectionParam.getJdbcUrl();
if (MapUtils.isNotEmpty(kyuubiConnectionParam.getOther())) {
return jdbcUrl + ";" + transformOther(kyuubiConnectionParam.getOther());
}
return jdbcUrl;
}
private String transformOther(Map<String, String> otherMap) {
if (MapUtils.isEmpty(otherMap)) {
return null;
}
List<String> otherList = new ArrayList<>();
otherMap.forEach((key, value) -> otherList.add(String.format("%s=%s", key, value)));
return String.join(";", otherList);
}
However, according to the official Apache Kyuubi JDBC URL Specification, Kyuubi relies on a standard three-segment URL structure:
jdbc:hive2://<host>:<port>/<db>;<sessionVars>?<hiveVars>#<kyuubiSessionVars>
Where:
;precedes<sessionVars>(Engine / Hadoop / Spark session configurations)?precedes<hiveVars>(Script-level variable substitution)#precedes<kyuubiSessionVars>(Kyuubi Server-level engine routing and lifecycle control, e.g.,#kyuubi.engine.share.level=USER,#kyuubi.engine.type=SPARK_SQL,#spark.driver.memory=4g)
Problem & Real-world Impact
- Broken Engine Routing: When users attempt to configure Kyuubi engine isolation (e.g.
kyuubi.engine.share.level=USER) via theotherconfiguration map, DolphinScheduler joins it with;. Kyuubi server treats this as an ordinary SQL session configuration instead of recognizing it as a Kyuubi-level engine directive. - Driver Syntax Error: If users prefix the key with
#(e.g.,#kyuubi.engine.share.level), DolphinScheduler renders it as.../default;;#kyuubi...or;#kyuubi..., causing Thrift / Kyuubi JDBC driver parsing exceptions. - Lack of Raw URL Passthrough: Enterprise users cannot pass custom, fine-tuned Kyuubi JDBC connection strings through the REST API or Web UI, forcing them to manually hack the metadata table (
t_ds_datasource.connection_params) directly in MySQL.
Use case
In enterprise Lakehouse environments (Spark on Kyuubi / Trino on Kyuubi), different scheduling tenants or critical workflows require dedicated Spark Driver instances and custom RPC timeouts (e.g., #kyuubi.engine.share.level=USER, #kyuubi.engine.initialize.timeout=PT3M).
Users should be able to:
- Either specify the full custom JDBC URL directly via an optional
rawJdbcUrlparameter; - Or configure Kyuubi session variables (
#) and hive variables (?) cleanly through dedicated parameters inKyuubiDataSourceParamDTOwithout having them flattened into semicolon-separated strings.
Related issues
None found.
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- Java
- Stars
- 14.5k
- Forks
- 5.1k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/dolphinscheduler
-
[Bug][API] Switching workflow versions leaves schedules onlinePossibly taken @zhuangchong claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/dolphinscheduler#18731 ·
Maintainers usually reply within 1 day
-
[Bug] Switching workflow versions can scan all task definition logsPossibly taken @zhuangchong claimed this today. Open
Difficulty 3/5 Half a day Newbie friendliness 68/100
apache/dolphinscheduler#18733 ·
Maintainers usually reply within 1 day
-
[Improvement][Worker-SqlTask] Make the default query row limit (QUERY_LIMIT = 10000) configurablePossibly taken @njnu-seafish claimed this 10 days ago. Openbackend improvement UI
apache/dolphinscheduler#18702 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Improvement][APIServer][3.4.3] Task Instance page data loading time out.Possibly taken @karthikeya-tummala claimed this 10 days ago. Openbackend good first issue improvement
apache/dolphinscheduler#18700 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
[Improvement][API] Suspected inverted session expiry check invalidates active sessions on re-loginPossibly taken @karthikeya-tummala claimed this 10 days ago. Openbackend good first issue improvement
Difficulty 4/5 1-2 days Newbie friendliness 48/100
apache/dolphinscheduler#18699 · 5 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in apache/dolphinscheduler
Similar issues
-
dev/release: verify-release-candidate.sh runs 0 Java tests with Debian's MavenPossibly taken @kou claimed this today. OpenType: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/arrow-adbc#4947 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lysine-dev/okhttp#9814 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
1.20.1-FORGE bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MehVahdJukaar/WoodGood#1348 ·
-
documentation faq
Difficulty 2/5 1-3 hours Newbie friendliness 72/100