New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-15100: make ConfigSetService configurable in solr.xml #2343
Conversation
good job! I need this feature customized ConfigSetService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! I just have some minor feedback. Thank you for contributing!
all the fix have done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a few lines to solr/solr-ref-guide/src/format-of-solr-xml.adoc
about this?
Can you please also add a CHANGES.txt entry for 8.9 under Improvements?:
* SOLR-15100: Make the ConfigSetService pluggable/configurable via <string name="xxxxxx" /> in solr.xml
(your name here)
@@ -65,8 +65,8 @@ public static ConfigSetService createConfigSetService(NodeConfig nodeConfig, Sol | |||
try { | |||
Class<? extends ConfigSetService> clazz = loader.findClass(configSetServiceClass, ConfigSetService.class); | |||
Constructor<? extends ConfigSetService> constructor | |||
= clazz.getConstructor(SolrResourceLoader.class, Boolean.TYPE, ZkController.class); | |||
return constructor.newInstance(loader, nodeConfig.hasSchemaCache(), zkController); | |||
= clazz.getConstructor(SolrResourceLoader.class, NodeConfig.class, ZkController.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we can remove SolrResourceLoader as well, which is on NodeConfig.
Come to think of it, if the constructor was simply CoreContainer, it could get everything it might need? That would be very clean. |
that's a good idea , Since that is so,shall i modify the method ConfigSetService.createConfigSetService() and simply the params list to one 'CoreContainer', that will be clean |
Great idea! |
… ConfigSetService constructor params
…port org.apache.solr.cloud.ZkController
Description
modify the static method ConfigSetService.createConfigSetService in that I can define the customized class name of ConfigSetService in solr.xml and create it in the method, https://issues.apache.org/jira/browse/SOLR-15100
Solution
modify the static method ConfigSetService.createConfigSetService , get property 'configSetService' which is name of customized ConfigSetService class name config in solr.xml and initialize it by java refect
Tests
add a test case in TestCoreContainer, test method is testCustomConfigSetService()
Checklist
Please review the following and check all that apply:
master
branch../gradlew check
.