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 2025/04/18 02:23:26 UTC

[PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

mwkang opened a new pull request, #6917:
URL: https://github.com/apache/hbase/pull/6917

   [HBASE-29267](https://issues.apache.org/jira/browse/HBASE-29267)


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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6917:
URL: https://github.com/apache/hbase/pull/6917#discussion_r3246035162


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ShadedPrefixUtil.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.ipc;
+
+import java.util.concurrent.ConcurrentHashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ShadedPrefixUtil {

Review Comment:
   This class has only a private constructor but is not declared final, which violates the repository's Checkstyle FinalClass rule (hbase-checkstyle/src/main/resources/hbase/checkstyle.xml:53). Mark the class final or expose an appropriate non-private constructor so the build passes checkstyle.
   



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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #6917:
URL: https://github.com/apache/hbase/pull/6917#issuecomment-2815073915

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 32s |  |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  2s |  |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck  |
   |||| _ Prechecks _ |
   |||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 13s |  |  master passed  |
   | +1 :green_heart: |  compile  |   0m 20s |  |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 17s |  |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m 56s |  |  branch has no errors when building our shaded downstream artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m  4s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 21s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 21s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 16s |  |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 52s |  |  patch has no errors when building our shaded downstream artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 35s |  |  hbase-client in the patch passed.  |
   |  |   |  22m 38s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/6917 |
   | Optional Tests | javac javadoc unit compile shadedjars |
   | uname | Linux 097e06808130 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / ae2040476d29dfaa0fe1795dc21ff948ddc0b69f |
   | Default Java | Eclipse Adoptium-17.0.11+9 |
   |  Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/2/testReport/ |
   | Max. process+thread count | 325 (vs. ulimit of 30000) |
   | modules | C: hbase-client U: hbase-client |
   | Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/2/console |
   | versions | git=2.34.1 maven=3.9.8 |
   | Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "mwkang (via GitHub)" <gi...@apache.org>.
mwkang commented on code in PR #6917:
URL: https://github.com/apache/hbase/pull/6917#discussion_r3246372018


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ShadedPrefixUtil.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.ipc;
+
+import java.util.concurrent.ConcurrentHashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ShadedPrefixUtil {
+  private static final Logger LOG = LoggerFactory.getLogger(ShadedPrefixUtil.class);
+
+  // Marked with '!' to prevent shading tools from replacing this value
+  static final String ORIGINAL_BASE = "org!apache!hadoop!hbase".replace('!', '.');
+
+  private static final ShadedPrefixUtil INSTANCE =
+    newInstance(ShadedPrefixUtil.class.getPackage().getName());
+
+  /**
+   * The shaded equivalent of "org.apache.hadoop.hbase", or null if not in a shaded environment.
+   * <ul>
+   * <li>Prefix-prepend shading (e.g., current package "a.b.c.org.apache.hadoop.hbase.ipc"):
+   * "a.b.c.org.apache.hadoop.hbase"</li>
+   * <li>Full-replacement shading (e.g., current package "shaded.hbase1.ipc"): "shaded.hbase1"</li>
+   * </ul>
+   */
+  private final String shadedBase;
+
+  /**
+   * Cache from original class name to its resolved (shaded or original) equivalent. Class.forName
+   * for a missing class is expensive as it searches all classloaders, so we memoize the result to

Review Comment:
   Thanks — reworded to "walks the supplied classloader's parent delegation chain" in 6f5a5c0 to match the actual call.



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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "mwkang (via GitHub)" <gi...@apache.org>.
mwkang commented on code in PR #6917:
URL: https://github.com/apache/hbase/pull/6917#discussion_r3255918791


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ShadedPrefixUtil.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.ipc;
+
+import java.util.concurrent.ConcurrentHashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ShadedPrefixUtil {
+  private static final Logger LOG = LoggerFactory.getLogger(ShadedPrefixUtil.class);
+
+  // Marked with '!' to prevent shading tools from replacing this value
+  static final String ORIGINAL_BASE = "org!apache!hadoop!hbase".replace('!', '.');
+
+  private static final ShadedPrefixUtil INSTANCE =
+    newInstance(ShadedPrefixUtil.class.getPackage().getName());
+
+  /**
+   * The shaded equivalent of "org.apache.hadoop.hbase", or null if not in a shaded environment.
+   * <ul>
+   * <li>Prefix-prepend shading (e.g., current package "a.b.c.org.apache.hadoop.hbase.ipc"):
+   * "a.b.c.org.apache.hadoop.hbase"</li>
+   * <li>Full-replacement shading (e.g., current package "shaded.hbase1.ipc"): "shaded.hbase1"</li>
+   * </ul>
+   */
+  private final String shadedBase;
+
+  /**
+   * Cache from original class name to its resolved (shaded or original) equivalent. Class.forName
+   * for a missing class is expensive as it searches all classloaders, so we memoize the result to

Review Comment:
   Good point, dropped the second sentence in 01cff7fb7b. Thanks!



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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "junegunn (via GitHub)" <gi...@apache.org>.
junegunn commented on code in PR #6917:
URL: https://github.com/apache/hbase/pull/6917#discussion_r3246282607


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ShadedPrefixUtil.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.ipc;
+
+import java.util.concurrent.ConcurrentHashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ShadedPrefixUtil {
+  private static final Logger LOG = LoggerFactory.getLogger(ShadedPrefixUtil.class);
+
+  // Marked with '!' to prevent shading tools from replacing this value
+  static final String ORIGINAL_BASE = "org!apache!hadoop!hbase".replace('!', '.');
+
+  private static final ShadedPrefixUtil INSTANCE =
+    newInstance(ShadedPrefixUtil.class.getPackage().getName());
+
+  /**
+   * The shaded equivalent of "org.apache.hadoop.hbase", or null if not in a shaded environment.
+   * <ul>
+   * <li>Prefix-prepend shading (e.g., current package "a.b.c.org.apache.hadoop.hbase.ipc"):
+   * "a.b.c.org.apache.hadoop.hbase"</li>
+   * <li>Full-replacement shading (e.g., current package "shaded.hbase1.ipc"): "shaded.hbase1"</li>
+   * </ul>
+   */
+  private final String shadedBase;
+
+  /**
+   * Cache from original class name to its resolved (shaded or original) equivalent. Class.forName
+   * for a missing class is expensive as it searches all classloaders, so we memoize the result to

Review Comment:
   > all classloaders
   
   We pass a ClassLoader to `Class.forName`, so I'd tighten up the wording.



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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #6917:
URL: https://github.com/apache/hbase/pull/6917#issuecomment-2814473743

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 36s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  |  Patch does not have any anti-patterns.  |
   |||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 51s |  |  master passed  |
   | +1 :green_heart: |  compile  |   0m 53s |  |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 19s |  |  master passed  |
   | +1 :green_heart: |  spotbugs  |   0m 51s |  |  master passed  |
   | +1 :green_heart: |  spotless  |   0m 51s |  |  branch has no errors when running spotless:check.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 24s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 56s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 56s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks issues.  |
   | -0 :warning: |  checkstyle  |   0m 20s | [/results-checkstyle-hbase-client.txt](https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/1/artifact/yetus-general-check/output/results-checkstyle-hbase-client.txt) |  hbase-client: The patch generated 1 new + 1 unchanged - 0 fixed = 2 total (was 1)  |
   | +1 :green_heart: |  spotbugs  |   0m 59s |  |  the patch passed  |
   | +1 :green_heart: |  hadoopcheck  |  13m 34s |  |  Patch does not cause any errors with Hadoop 3.3.6 3.4.0.  |
   | +1 :green_heart: |  spotless  |   0m 58s |  |  patch has no errors when running spotless:check.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 13s |  |  The patch does not generate ASF License warnings.  |
   |  |   |  36m 37s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/6917 |
   | Optional Tests | dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless |
   | uname | Linux 7db3c4edfe8f 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 7c847808a29f1c935628fe04314af66e97533d6d |
   | Default Java | Eclipse Adoptium-17.0.11+9 |
   | Max. process+thread count | 82 (vs. ulimit of 30000) |
   | modules | C: hbase-client U: hbase-client |
   | Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/1/console |
   | versions | git=2.34.1 maven=3.9.8 spotbugs=4.7.3 |
   | Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "junegunn (via GitHub)" <gi...@apache.org>.
junegunn commented on code in PR #6917:
URL: https://github.com/apache/hbase/pull/6917#discussion_r3247752071


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ShadedPrefixUtil.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.ipc;
+
+import java.util.concurrent.ConcurrentHashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ShadedPrefixUtil {
+  private static final Logger LOG = LoggerFactory.getLogger(ShadedPrefixUtil.class);
+
+  // Marked with '!' to prevent shading tools from replacing this value
+  static final String ORIGINAL_BASE = "org!apache!hadoop!hbase".replace('!', '.');
+
+  private static final ShadedPrefixUtil INSTANCE =
+    newInstance(ShadedPrefixUtil.class.getPackage().getName());
+
+  /**
+   * The shaded equivalent of "org.apache.hadoop.hbase", or null if not in a shaded environment.
+   * <ul>
+   * <li>Prefix-prepend shading (e.g., current package "a.b.c.org.apache.hadoop.hbase.ipc"):
+   * "a.b.c.org.apache.hadoop.hbase"</li>
+   * <li>Full-replacement shading (e.g., current package "shaded.hbase1.ipc"): "shaded.hbase1"</li>
+   * </ul>
+   */
+  private final String shadedBase;
+
+  /**
+   * Cache from original class name to its resolved (shaded or original) equivalent. Class.forName
+   * for a missing class is expensive as it searches all classloaders, so we memoize the result to

Review Comment:
   Sorry to nitpick, but maybe we can just drop the second sentence. The `Class.forName` cost detail feels a little out of place and not really needed here. `Class.forName` is already mentioned in the comment near the call site.



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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #6917:
URL: https://github.com/apache/hbase/pull/6917#issuecomment-2815123489

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   6m 27s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  |  Patch does not have any anti-patterns.  |
   |||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 30s |  |  master passed  |
   | +1 :green_heart: |  compile  |   0m 48s |  |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 16s |  |  master passed  |
   | +1 :green_heart: |  spotbugs  |   0m 43s |  |  master passed  |
   | +1 :green_heart: |  spotless  |   0m 56s |  |  branch has no errors when running spotless:check.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   6m 30s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 49s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 49s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks issues.  |
   | -0 :warning: |  checkstyle  |   0m 15s | [/results-checkstyle-hbase-client.txt](https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/2/artifact/yetus-general-check/output/results-checkstyle-hbase-client.txt) |  hbase-client: The patch generated 1 new + 1 unchanged - 0 fixed = 2 total (was 1)  |
   | +1 :green_heart: |  spotbugs  |   0m 55s |  |  the patch passed  |
   | +1 :green_heart: |  hadoopcheck  |  21m  4s |  |  Patch does not cause any errors with Hadoop 3.3.6 3.4.0.  |
   | +1 :green_heart: |  spotless  |   0m 52s |  |  patch has no errors when running spotless:check.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 11s |  |  The patch does not generate ASF License warnings.  |
   |  |   |  56m 54s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/6917 |
   | Optional Tests | dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless |
   | uname | Linux 28dfe1dab58b 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / ae2040476d29dfaa0fe1795dc21ff948ddc0b69f |
   | Default Java | Eclipse Adoptium-17.0.11+9 |
   | Max. process+thread count | 83 (vs. ulimit of 30000) |
   | modules | C: hbase-client U: hbase-client |
   | Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/2/console |
   | versions | git=2.34.1 maven=3.9.8 spotbugs=4.7.3 |
   | Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "mwkang (via GitHub)" <gi...@apache.org>.
mwkang commented on PR #6917:
URL: https://github.com/apache/hbase/pull/6917#issuecomment-3712600824

   Thank you for your review.
   Sorry for the late reply.
   I will check the points you mentioned.


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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "mwkang (via GitHub)" <gi...@apache.org>.
mwkang commented on code in PR #6917:
URL: https://github.com/apache/hbase/pull/6917#discussion_r3246370587


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ShadedPrefixUtil.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.ipc;
+
+import java.util.concurrent.ConcurrentHashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ShadedPrefixUtil {

Review Comment:
   Fixed in 6f5a5c0 — marked the class `final`.



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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #6917:
URL: https://github.com/apache/hbase/pull/6917#issuecomment-2814492431

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   6m 20s |  |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck  |
   |||| _ Prechecks _ |
   |||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   4m 22s |  |  master passed  |
   | +1 :green_heart: |  compile  |   0m 26s |  |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 27s |  |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 48s |  |  branch has no errors when building our shaded downstream artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   5m 52s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 26s |  |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   8m  6s |  |  patch has no errors when building our shaded downstream artifacts.  |
   |||| _ Other Tests _ |
   | -1 :x: |  unit  |   1m 59s | [/patch-unit-hbase-client.txt](https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/1/artifact/yetus-jdk17-hadoop3-check/output/patch-unit-hbase-client.txt) |  hbase-client in the patch failed.  |
   |  |   |  38m 28s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/6917 |
   | Optional Tests | javac javadoc unit compile shadedjars |
   | uname | Linux 69a78ed48eaf 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 7c847808a29f1c935628fe04314af66e97533d6d |
   | Default Java | Eclipse Adoptium-17.0.11+9 |
   |  Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/1/testReport/ |
   | Max. process+thread count | 280 (vs. ulimit of 30000) |
   | modules | C: hbase-client U: hbase-client |
   | Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6917/1/console |
   | versions | git=2.34.1 maven=3.9.8 |
   | Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "mwkang (via GitHub)" <gi...@apache.org>.
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


Re: [PR] HBASE-29267 Support shaded clients in Exception deserialization by prefixing shaded package in IPCUtil [hbase]

Posted by "junegunn (via GitHub)" <gi...@apache.org>.
junegunn merged PR #6917:
URL: https://github.com/apache/hbase/pull/6917


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