voon created HUDI-9416:
--------------------------

             Summary: Shading of aircompressor in hudi-io module
                 Key: HUDI-9416
                 URL: https://issues.apache.org/jira/browse/HUDI-9416
             Project: Apache Hudi
          Issue Type: Task
            Reporter: voon
            Assignee: voon


h1. *Presto*

Shading of hudi-io might be required for Presto might be required.
h1. *Trino*

Shading of hudi-io is not required as the SPI specifications guarantees 
classloader isolation.

Reference:
https://trino.io/docs/current/develop/spi-overview.html#building-plugins-via-maven

 

Quoting the spec:


{code:java}
All other dependencies are based on what the plugin needs for its own 
implementation. Plugins are loaded in a separate class loader to provide 
isolation and to allow plugins to use a different version of a library that 
Trino uses internally.{code}
 

However, there might still be risks of class conflict and they are:
 # Hudi's aircompressor classes "leak" out of the plugin

 ** Leaking should not happen too as hudi-io and its usages are not returning 
an instance of AirCompressor to the Trino's SPI



 # Trino attempts to use Hudi's version
 ** This is unlikely given the classloader hierarchy and if this happens, it is 
a bug on Trino's end in which they will need to fix as this breaks their SPI 
contract/guarantees

 

 

 



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

Reply via email to