[ 
https://issues.apache.org/jira/browse/SOLR-3526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15014134#comment-15014134
 ] 

Michael Froh edited comment on SOLR-3526 at 11/19/15 6:53 PM:
--------------------------------------------------------------

3.5 years later, I decided to try taking a stab at this myself. In the 
meantime, references to KeeperException and ZooKeeper's Stat class have worked 
their way through more core Solr classes, including SolrCore and RequestParams.

After making these changes, I was able (from a clean work space) to 
successfully run the tests from TestEmbeddedSolrServerConstructors (removing 
the "extends SolrTestCaseJ4") without ZooKeeper on my classpath. (I couldn't 
extend SolrTestCaseJ4, since RevertDefaultThreadHandlerRule references 
org.apache.zookeeper.server.NIOServerCnxnFactory.)

I'm not sure how to add a test to the Solr build that will verify that someone 
is able to bring up an EmbeddedSolrServer and use core features without 
ZooKeeper. Does anyone have any suggestions?


was (Author: msfroh):
3.5 years later, I decided to try taking a stab at this myself. In the 
meantime, references to KeeperException and ZooKeeper's Stat class have worked 
there way through core Solr classes, including SolrCore and RequestParams.

After making these changes, I was able (from a clean work space) to 
successfully run the tests from TestEmbeddedSolrServerConstructors (removing 
the "extends SolrTestCaseJ4") without ZooKeeper on my classpath. (I couldn't 
extend SolrTestCaseJ4, since RevertDefaultThreadHandlerRule references 
org.apache.zookeeper.server.NIOServerCnxnFactory.)

I'm not sure how to add a test to the Solr build that will verify that someone 
is able to bring up an EmbeddedSolrServer and use core features without 
ZooKeeper. Does anyone have any suggestions?

> Remove classfile dependency on ZooKeeper from CoreContainer
> -----------------------------------------------------------
>
>                 Key: SOLR-3526
>                 URL: https://issues.apache.org/jira/browse/SOLR-3526
>             Project: Solr
>          Issue Type: Wish
>          Components: SolrCloud
>    Affects Versions: 4.0-ALPHA
>            Reporter: Michael Froh
>
> We are using Solr as a library embedded within an existing application, and 
> are currently developing toward using 4.0 when it is released.
> We are currently instantiating SolrCores with null CoreDescriptors (and hence 
> no CoreContainer), since we don't need SolrCloud functionality (and do not 
> want to depend on ZooKeeper).
> A couple of months ago, SearchHandler was modified to try to retrieve a 
> ShardHandlerFactory from the CoreContainer. I was able to work around this by 
> specifying a dummy ShardHandlerFactory in the config.
> Now UpdateRequestProcessorChain is inserting a DistributedUpdateProcessor 
> into my chains, again triggering a NPE when trying to dereference the 
> CoreDescriptor.
> I would happily place the SolrCores in CoreContainers, except that 
> CoreContainer imports and references org.apache.zookeeper.KeeperException, 
> which we do not have (and do not want) in our classpath. Therefore, I get a 
> ClassNotFoundException when loading the CoreContainer class.
> Ideally (IMHO), ZkController should isolate the ZooKeeper dependency, and 
> simply rethrow KeeperExceptions as 
> org.apache.solr.common.cloud.ZooKeeperException (or some Solr-hosted checked 
> exception). Then CoreContainer could remove the offending import/references.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to