nodece commented on code in PR #23886:
URL: https://github.com/apache/pulsar/pull/23886#discussion_r1927188170


##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/ObjectMapperFactory.java:
##########
@@ -263,15 +262,7 @@ private static void setAnnotationsModule(ObjectMapper 
mapper) {
         mapper.addMixIn(FunctionState.class, JsonIgnorePropertiesMixIn.class);
         mapper.addMixIn(Metrics.class, MetricsMixIn.class);
 
-        try {
-            // We look for LoadManagerReport first, then add deserializer to 
the module
-            // With shaded client, org.apache.pulsar.policies is relocated to
-            // org.apache.pulsar.shade.org.apache.pulsar.policies
-            
ClassUtils.getClass("org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport");

Review Comment:
   > just wondering if a solution would work where this line 
`ClassUtils.getClass("org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport")`
 is removed. 
   
   Yes. It works fine.
   
   > I wonder why this is present?
   
   Usually, we don't shade the API package.
   
   However, the 
`org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport` exists in the 
`pulsar-client-admin-api` module, the shade plugin didn't ignore that.
   
   > It seems strange that there would need to be separate handling for the 
`org.apache.pulsar.policies.data.loadbalancer` package. It wouldn't be 
consistent with the remaining parts of the shading solution.
   
   It looks confusing, I guess that is because of the package name, and this is 
a special case, we must take care of that.



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