You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/02/28 10:17:14 UTC

[GitHub] sijie opened a new pull request #1217: Shade bookkeeper in distributedlog-core-shaded and allow using shaded bookkeeper client to resolve ledger manager factory class

sijie opened a new pull request #1217:  Shade bookkeeper in distributedlog-core-shaded and allow using shaded bookkeeper client to resolve ledger manager factory class
URL: https://github.com/apache/bookkeeper/pull/1217
 
 
   Descriptions of the changes in this PR:
   
   *Motivation*
   
   1. when `distributedlog-core-shaded` is co-used with other bookkeeper jars, it would cause class conflicts because `distributedlog-core-shaded` shades
   most of its dependencies except bookkeeper. so it is better to also shade bookkeeper to avoid such conflicts.
   
   2. if we shade bookkeeper, it would cause a problem on resolving ledger manager factory class.
   
   ```
   java.io.IOException: Failed to instantiate ledger manager factory org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory
   	at dlshade.org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory.attemptToResolveShadedLedgerManagerFactory(AbstractZkLedgerManagerFactory.java:256) ~[distributedlog-core-shaded-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT]
   	at dlshade.org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory.newLedgerManagerFactory(AbstractZkLedgerManagerFactory.java:203) ~[distributedlog-core-shaded-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT]
   ```
   
   *Solution*
   
   - shade bookkeeper dependencies in `distributedlog-core-shaded`
   - add flags to allow using shaded bookkeeper jar to resolve ledger manager factory
   
   
   > ---
   > Be sure to do all of the following to help us incorporate your contribution
   > quickly and easily:
   >
   > If this PR is a BookKeeper Proposal (BP):
   >
   > - [ ] Make sure the PR title is formatted like:
   >     `<BP-#>: Description of bookkeeper proposal`
   >     `e.g. BP-1: 64 bits ledger is support`
   > - [ ] Attach the master issue link in the description of this PR.
   > - [ ] Attach the google doc link if the BP is written in Google Doc.
   >
   > Otherwise:
   > 
   > - [ ] Make sure the PR title is formatted like:
   >     `<Issue #>: Description of pull request`
   >     `e.g. Issue 123: Description ...`
   > - [ ] Make sure tests pass via `mvn clean apache-rat:check install spotbugs:check`.
   > - [ ] Replace `<Issue #>` in the title with the actual Issue number.
   > 
   > ---
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services