You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "mwkang (via GitHub)" <gi...@apache.org> on 2026/05/04 12:17:12 UTC
Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]
mwkang commented on PR #6917:
URL: https://github.com/apache/hbase/pull/6917#issuecomment-4370951897
Thank you again for the detailed feedback. I've updated the patch to address both concerns you raised.
**1. Support for full-replacement shading**
The previous detection logic searched for .org.apache.hadoop.hbase. as a substring, which only worked
for prefix-prepend configurations (e.g. a.b.c.org.apache.hadoop.hbase.ipc). It silently fell back to
no-op for full-replacement configurations like yours (shaded.hbase1.ipc).
The new approach derives the shaded base by stripping the known .ipc suffix from the current package
name:
- a.b.c.org.apache.hadoop.hbase.ipc → shadedBase = a.b.c.org.apache.hadoop.hbase
- shaded.hbase1.ipc → shadedBase = shaded.hbase1
This covers both strategies uniformly.
**2. Fallback for selectively excluded exception classes**
The new resolveShading() method attempts to load the transformed class name via Class.forName. If the
shaded class is not found (e.g. because *Exception classes were excluded from relocation), it falls
back to the original name. The result is memoized in a ConcurrentHashMap so Class.forName is invoked
at most once per distinct class name.
--
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: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org