Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-1846

minimize dependencies of JDBC driver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v1.5.2
    • v1.5.3
    • Driver - JDBC
    • None

    Description

      kylin-jdbc packages many dependencies (calcite-core, guava, jackson, etc) into an uber jar, which could cause problems when user tries to integrate kylin-jdbc into their own application.

      I suggest making the following changes to packaging:

      1. remove calcite-core dependency
        calcite-avatica is sufficient as far as I know.
      2. remove guava dependency
        The only place kylin-jdbc uses guava is ImmutableList.of(metaResultSet) in KylinMeta.java, which can be simply replaced with Collections.singletonList(metaResultSet).
      3. remove log4j, slf4j-log4j12 dependencies
        As a library, kylin-jdbc should only depend on slf4j-api. Which underlying logging framework to use should be a deployment-time choice made by user. This means we should revert https://issues.apache.org/jira/browse/KYLIN-1160
      4. relocate all dependencies to "org.apache.kylin.jdbc.shaded" using maven-shade-plugin
        This includes calcite-avatica, jackson, commons-httpclient and commons-codec. Relocating should help to avoid class version conflicts.

      I'll submit a patch for this, discussions are welcome~

      Attachments

        1. KYLIN-1846.patch
          13 kB
          Dayue Gao

        Activity

          People

            gaodayue Dayue Gao
            gaodayue Dayue Gao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: