lhotari commented on PR #22850:
URL: https://github.com/apache/pulsar/pull/22850#issuecomment-2159796740

   Since this code is touched, it might be useful to make use of 
`loadReportType` in detecting the type of the object that is stored in JSON:
   
https://github.com/apache/pulsar/blob/c326d8e2203b6e9be37f4f2066fd7e90a9b9fb54/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/BrokerMonitor.java#L315-L328
   
   It could be useful to refactor BrokerMonitor to use Jackson instead of Gson. 
Mixing Jackson and Gson in the code base is something we want to get rid of 
eventually.
   
   `loadReportType` is handled in Pulsar's Jackson ObjectMapper config:
   
https://github.com/apache/pulsar/blob/c326d8e2203b6e9be37f4f2066fd7e90a9b9fb54/pulsar-common/src/main/java/org/apache/pulsar/common/util/ObjectMapperFactory.java#L263-L271
   When LoadManagerReport is requested, it will choose the correct 
implementation class based on the loadReportType field (however, it looks that 
shaded classnames aren't properly handled). 
   
   
   
   
   
   
   


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