rangadi opened a new pull request, #38384:
URL: https://github.com/apache/spark/pull/38384

   ### What changes were proposed in this pull request?
   The protobuf package shades _com.google.protobuf_ classes. That implies that 
the user jar providing Java classes also needs to be shaded in the same manner. 
Otherwise, it does not work as the `Descriptor` class used in here and the one 
provided by the does not match. In fact, most likely the Protobuf class can't 
even be instantiated.
   
   This is an inconvenience and unintuitive for the users. But we can't make 
this work without shading as Spark already includes an old version of 
_protobuf-java_ library (2.5.0) and it will conflict with user's jar. 
   
   This improves error handling to detect various mismatches and provides more 
descriptive error message. 
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   - Tested manually with shaded and unshaded jars.
      - How can we test with shaded classes in unit tests? 
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to