ClickHouse / ClickHouse/clickhouse-java

[client-v2] Expose supported configuration options via a public API

未关闭
#3,059 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:general client-api-v2 enhancement
主要语言
Java
星标
1.6k
派生
637
平均合并
2 天 23 小时
30 天内合并 PR
29

描述

Is your feature request related to a problem?

Connectors and tools built on top of the Java client (e.g. Kafka Connect sink, Spark connector, ingestion frameworks, config-validation UIs) need to know which configuration options the client supports so they can expose, validate, and document them programmatically. Today there is no supported API call to retrieve this list:

  • ClientConfigProperties (client-v2) is a public enum, but it only carries the option key, value type, and default value — no human-readable description, no allowed-value/choices metadata, and no indication of whether an option is required or deprecated.
  • jdbc-v2 implements Driver.getPropertyInfo(url, info) returning DriverPropertyInfo[], but that is JDBC-specific and not usable from plain client-v2.

Describe the solution you'd like

A public API on the client (e.g. Client.getSupportedOptions() or a static method on ClientConfigProperties) that returns structured metadata for every supported option:

  • option key (e.g. connect_timeout)
  • value type
  • default value
  • description
  • allowed values / choices where applicable
  • flags such as required, deprecated, sensitive (e.g. password, so tools know to mask it)

This would let integrators generate their config surface directly from the client instead of hard-coding option lists that drift out of date. Ideally jdbc-v2's getPropertyInfo would be backed by the same metadata source so the two stay consistent.

Describe alternatives you've considered

  • Iterating ClientConfigProperties.values() via the enum — works for key/type/default but lacks descriptions and semantic metadata, and does not cover dynamic prefixes (clickhouse_setting_*, http_header_*).
  • Scraping the docs — brittle and not machine-friendly.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 client-v2 的 ClientConfigProperties enum 和 jdbc-v2 的 Driver.getPropertyInfo(url, info) 入口点开始,然后追踪当前键、类型和默认值是如何定义的。完成后应为 plain client-v2 提供结构化元数据,涵盖动态前缀和请求的 flags,并保持 JDBC 属性信息的一致性。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
api, developer-experience
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。