Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-27476

Shade okhttp dependency in the JDBC driver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0-alpha-2
    • None
    • JDBC
    • None

    Description

      This dependency is coming from:

       

      org.apache.hive:hive-common:jar:4.0.0-alpha-2
        org.apache.tez:tez-api:jar:0.10.2
          org.apache.hadoop:hadoop-hdfs-client:jar:3.3.1
            com.squareup.okhttp:okhttp:jar:2.7.5
      

      Version 2.7.5 was released Feb 26, 2016. 

      I've seen in the `pom.xml` that we are excluding/shading dependencies: https://github.com/apache/hive/blob/e6c6029439f831545fe5fa267452b662c3a71403/jdbc/pom.xml#L138-L374

       

      Would it be possible to shade `com.squareup` to avoid classpath conflicts/issues.

      For reference, here's the exception we get since we have okhttp 2.7.5 and okhttp 4.11 in the classpath:

       

      Exception in thread "main" java.lang.NoSuchFieldError: Companion
          at okhttp3.internal.Util.<clinit>(Util.kt:71)
          at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1239)
          at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1634)

       

       

      Thanks!

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ggrossetie Guillaume Grossetie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: