You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/15 04:36:40 UTC

[GitHub] [pulsar] michaeljmarshall opened a new pull request, #17661: [fix][bookie] Correctly handle list configuration values

michaeljmarshall opened a new pull request, #17661:
URL: https://github.com/apache/pulsar/pull/17661

   ### Motivation
   
   When the `metadataServiceUri` or the `zkServers` configuration for `BookieRackAffinityMapping` is provided as a comma delimited list, it is automatically parsed into an ArrayList by the configuration class because the Bookkeeper configuration class relies on the defaults in the `org.apache.commons.configuration.AbstractConfiguration` class. Here is a sample error:
   
   ```
   2022-07-29T19:25:43,437+0000 [main] ERROR org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Failed to initialize DNS Resolver org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping, used default subnet resolver
   java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.lang.String (java.util.ArrayList and java.lang.String are in module java.base of loader 'bootstrap')
   ```
   
   Also, see #6349 and https://github.com/apache/pulsar/issues/6343 for context.
   
   ### Modifications
   
   * Move the `castToString` method out to a shared class.
   * Use the `castToString` method to safely get the configuration value.
   
   ### Verifying this change
   
   This PR includes a test.
   
   ### Documentation
   
   - [x] `doc-not-needed` 
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] michaeljmarshall merged pull request #17661: [fix][bookie] Correctly handle list configuration values

Posted by GitBox <gi...@apache.org>.
michaeljmarshall merged PR #17661:
URL: https://github.com/apache/pulsar/pull/17661


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] michaeljmarshall commented on pull request #17661: [fix][bookie] Correctly handle list configuration values

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on PR #17661:
URL: https://github.com/apache/pulsar/pull/17661#issuecomment-1275195103

   @lhotari @eolivelli - PTAL, 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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org