gerlowskija commented on code in PR #955:
URL: https://github.com/apache/solr/pull/955#discussion_r935952977
##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -801,7 +815,11 @@ public void load() {
ClusterAPI clusterAPI = new ClusterAPI(collectionsHandler,
configSetsHandler);
containerHandlers.getApiBag().registerObject(clusterAPI);
containerHandlers.getApiBag().registerObject(clusterAPI.commands);
- containerHandlers.getApiBag().registerObject(clusterAPI.configSetCommands);
+ containerHandlers.getApiBag().registerObject(new CreateConfigSetAPI(this));
+ containerHandlers.getApiBag().registerObject(new DeleteConfigSetAPI(this));
+ containerHandlers.getApiBag().registerObject(new ListConfigSetsAPI(this));
+ containerHandlers.getApiBag().registerObject(new UploadConfigSetAPI(this));
+ containerHandlers.getApiBag().registerObject(new
UploadConfigSetFileAPI(this));
Review Comment:
Yeah, it's not ideal for sure. Core-level APIs are registered out of
solrconfig.xml's, so they don't have the same downside. It's just the
Solr/container-level APIs. But still, it won't scale out as we split up more
APIs.
I did create an ApiRegistrar class to group things together, so that
CoreContainer can register whole groups of APIs with a single call. So maybe
I'll go that route with these APIs in the short term. I should've done that
out of the gate, my mistake.
As for an annotation-discovery framework - I'd love to use an existing one.
But IMO there are too many good options out there to justify writing our own.
I've proposed JAX-RS in the past as a fix for a wider set of problems but the
idea had lukewarm reception, but maybe opinion will have changed on that, or
maybe there's some lighter alternative to solve this problem only.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]