You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/09/08 06:36:54 UTC

[GitHub] [lucene-solr] noblepaul commented on a change in pull request #1813: SOLR-14613: No new APIs. use the existing APIs

noblepaul commented on a change in pull request #1813:
URL: https://github.com/apache/lucene-solr/pull/1813#discussion_r484682298



##########
File path: solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
##########
@@ -551,11 +555,29 @@ public AssignStrategyFactory(SolrCloudManager solrCloudManager) {
       this.solrCloudManager = solrCloudManager;
     }
 
+    @SuppressWarnings("unchecked")
     public AssignStrategy create(ClusterState clusterState, CloudConfig cloudConfig, DocCollection collection) throws IOException, InterruptedException {
       @SuppressWarnings({"unchecked", "rawtypes"})
       List<Map> ruleMaps = (List<Map>) collection.get("rule");
       @SuppressWarnings({"rawtypes"})
       List snitches = (List) collection.get(SNITCH);
+      Map<String, Object> props = solrCloudManager.getClusterStateProvider().getClusterProperties();
+      Map<String,Object> assignInfo = (Map<String, Object>) props.get("assign-strategy");

Review comment:
       We already have an endpoint called  `/api/cluster/plugin`  GET/POST
   
   Please refer to [SOLR-14404](https://issues.apache.org/jira/browse/SOLR-14404) for details
   
   it can look as follows
   
   ```
   curl -X POST -H 'Content-type:application/json' --data-binary '
   {
     "set-assign-strategy": {
     "class": "full.ClassName", 
     "key1" : "val1"
     }
   }' http://localhost:8983/api/cluster/plugins
   ```




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org