镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

com.clickhouse/clickhouse-jdbc$http has CLI and GRPC modules as transitive dependencies #1148

Closed

Description

@slvrtrn

While working on the Metabase plugin that uses the updated JDBC driver now, I noticed that if I use com.clickhouse/clickhouse-jdbc$http as a dependency, the resulting JAR also includes shaded GRPC and CLI modules:

  Write :clickhouse :oss uberjar -> /home/serge/work/metabase/resources/modules/clickhouse.metabase-driver.jar
    Determine which dependencies to include
      INCLUDE com.clickhouse/clickhouse-cli-client$shaded
      INCLUDE com.clickhouse/clickhouse-grpc-client$shaded
      INCLUDE com.clickhouse/clickhouse-http-client$shaded
      INCLUDE com.clickhouse/clickhouse-jdbc$http
      INCLUDE com.google.code.gson/gson

and the resulting JAR is way too big: around 20M

having CLI and GRPC explicitly excluded (example in Clojure's deps.edn)

 :deps
 {com.clickhouse/clickhouse-jdbc$http
  {:mvn/version "0.3.2-patch11"
   :exclusions [com.clickhouse/clickhouse-cli-client$shaded
                com.clickhouse/clickhouse-grpc-client$shaded]}}

reduces the final size to 1.2M, i.e. it is 19x times less.

Maybe GRPC and CLI could be released as separate modules,
so we can plug them in instead of excluding them when needed?

Activity

  1. zhicwu commented on Dec 8, 2022

    @zhicwu
    Contributor

    Thanks @slvrtrn. Yes, it's cleaner to create separate modules. But there'll be modules like clickhouse-jdbc-http, clickhouse-jdbc-grpc, clickhouse-jdbc-cli, and clickhouse-jdbc-all etc., which might be confusing. That's why I suggested to exclude all dependencies when you specify classifer :)

    As to Metabase driver, I think it's probably better to use all instead of http, as it gives user more options to connect to ClickHouse, if the size is not a big concern ;)

  2. slvrtrn commented on Dec 9, 2022

    @slvrtrn
    Author

    @zhicwu, thanks for the suggestion! Indeed, we should try TCP/Native in the Metabase plugin.

  3. github-actions commented on Jan 8, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

  4. chernser commented on Jan 27, 2025

    @chernser
    Contributor

    Seems not applicable anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions