-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil #6917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…efixing shaded package in IPCUtil
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
I've noticed that this patch can be incompatible with some shading configurations.
For example, here's one configuration we evaluated for using both HBase 1 and 2 clients in the same project:
tasks.shadowJar {
relocate("org.apache.hadoop.hbase", "shaded.hbase1") {
exclude("org/apache/hadoop/hbase/codec/**")
// Exclude exceptions except protobuf and shaded packages
exclude("%regex[org/apache/hadoop/hbase/((?!protobuf|shaded)[^/]+/.*)?[^/]+Exception]")
}
archiveClassifier.set("")
}
In this setup, we are replacing org.apache.hadoop.hbase with shaded.hbase1, rather than simply prepending a custom prefix, a strategy this patch currently assumes. As a result, we get:
ipc.ShadedPrefixUtil: Cannot find shaded pattern for shaded.hbase1.ipc
Also, note that we intentionally avoided shading *Exception classes to address the original issue of not recognizing exception names from the server. So modifying the class name would cause ClassNotFoundException.
|
Thank you for your review. |
HBASE-29267