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/06 17:26:39 UTC

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

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



##########
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:
       Do you have code (and curl) examples of how the `assign-strategy` property or similar ones are stored in `clusterprops.json`?
   
   As I'm switching my PR to not use `solr.xml` but instead use `clusterprops.json`, I not only need to retrieve the plugin class name if any, but also associated configuration values whose names/keys and types are unknown since they are plugin specific.
   
   If I copy the code as written here, I assume an iteration over `assignInfo` would reveal all configured values, want to make sure this makes sense.




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