cshuo commented on code in PR #19330:
URL: https://github.com/apache/hudi/pull/19330#discussion_r3630018034


##########
packaging/hudi-flink-bundle/pom.xml:
##########
@@ -677,10 +677,6 @@
                       <pattern>com.google.common.</pattern>
                       
<shadedPattern>${flink.bundle.shade.prefix}com.google.common.</shadedPattern>
                     </relocation>
-                    <relocation>
-                      <pattern>com.google.protobuf.</pattern>

Review Comment:
   The protobuf relocation is still required.
   
   `hudi-io` is shaded independently before it is consumed by this bundle, so 
it already contains protobuf under `org.apache.hudi.com.google.protobuf.*`. 
Removing the protobuf relocation from this profile does not undo that earlier 
shading, and Hive classes from `hive-exec` were compiled against 
`com.google.protobuf.*`. The filter removes Hive's embedded 
`com/google/protobuf/**`, and without the profile-level relocation those Hive 
bytecode references are not rewritten to 
`org.apache.hudi.com.google.protobuf.*`, which may lead to 
`NoClassDefFoundError` when loading some classes, for e.g., 
`LlapDaemonProtocolProtos`:
   
   `NoClassDefFoundError: 
com/google/protobuf/Descriptors$FileDescriptor$InternalDescriptorAssigner`.
   
   
   Please retain the protobuf relocation in both profiles so Hive's references 
are rewritten to the protobuf classes already shaded by `hudi-io`, while 
continuing to filter out Hive's stale embedded protobuf copy.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to