[ 
https://issues.apache.org/jira/browse/HIVE-28308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17855392#comment-17855392
 ] 

Qiheng He commented on HIVE-28308:
----------------------------------

- [~dengzh] For non-human build tools, the only issue with Uber JARs is class 
conflicts. The large size of Uber JARs does not impose additional impacts. From 
the perspective of building a GraalVM Native Image, the total number of classes 
remains the same whether it's an Uber JAR or not.

- For humans, part of the challenge with Uber JARs lies in the lack of Maven 
GAV information for third-party dependencies included, making maintenance by 
third-party maintainers somewhat convoluted. When constructing a GraalVM Native 
Image, extra GraalVM Reachability Metadata is required for classes and 
resources that violate the Native Image's closed-world assumption. These JSON 
files and {*}native-image.properties{*} are typically located within the 
classpath at {*}META-INF/native-image/<groupId>/<artifactId>/{*} or 
{*}META-INF/native-image/<groupId>/<artifactId>/<version>/{*}, as illustrated 
by repositories like 
https://github.com/oracle/graalvm-reachability-metadata/tree/0.3.8/metadata and 
https://github.com/apache/shardingsphere/tree/5.5.0/infra/reachability-metadata/src/main/resources/META-INF/native-image.
 To ascertain the actual Maven GAV details for a specific third-party package 
within an Uber JAR, merely looking at 
https://central.sonatype.com/artifact/org.apache.hive/hive-jdbc/dependencies is 
insufficient. One must examine the source code, particularly the definitions of 
specific Maven profiles at 
https://github.com/apache/hive/blob/rel/release-4.0.0/jdbc/pom.xml .

- The Uber JAR of {*}org.apache.hive:hive-jdbc:4.0.0{*} does not generate new 
shaded packages, hence it does not currently face the issue discussed in 
https://github.com/oracle/graalvm-reachability-metadata/issues/377 . In 
contrast, an Uber JAR like {*}io.grpc:grpc-netty-shaded{*} redirects the 
{*}io.netty{*} package to {*}io.grpc.netty.shaded.io.netty{*}, which 
necessitates additional JSON entries or definitions in 
{*}native-image.properties{*} related to GraalVM Reachability Metadata.

> The module `org.apache.hive:hive-jdbc:4.0.0` unintuitively removed all 
> dependencies under the Compile Scope
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-28308
>                 URL: https://issues.apache.org/jira/browse/HIVE-28308
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Qiheng He
>            Priority: Major
>
> - The module *org.apache.hive:hive-jdbc:4.0.0* unintuitively removed all 
> dependencies under the Compile Scope.
>  - Comparing the dependencies listed at 
> [https://central.sonatype.com/artifact/org.apache.hive/hive-jdbc/4.0.0/dependencies]
>  with those at 
> [https://central.sonatype.com/artifact/org.apache.hive/hive-jdbc/3.1.3/dependencies]
>  , it becomes apparent that *org.apache.hive:hive-jdbc:4.0.0* includes only 
> test dependencies. This results in the need to manually add additional 
> dependencies when utilizing the HiveServer2 JDBC Driver.
>  - 
> {code:xml}
> <dependency>
>   <groupId>org.apache.hive</groupId>
>   <artifactId>hive-jdbc</artifactId>
>   <version>4.0.0</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.hive</groupId>
>   <artifactId>hive-service</artifactId>
>   <version>4.0.0</version>
> <exclusions>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-slf4j-impl</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.slf4j</groupId>
>     <artifactId>slf4j-reload4j</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-web</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-core</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-api</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-1.2-api</artifactId>
>   </exclusion>
>   </exclusions>
> </dependency>
> <dependency>
>   <groupId>org.apache.hadoop</groupId>
>   <artifactId>hadoop-client-runtime</artifactId>
>   <version>3.3.6</version>
> </dependency>
> {code}
>  - More early surveys come from 
> https://github.com/apache/shardingSphere/pull/31526 and 
> https://github.com/dbeaver/dbeaver/issues/22777 . I personally think this is 
> not a reasonable phenomenon.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to