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

Andrzej Bialecki  commented on SOLR-12467:
------------------------------------------

This is by design. The primary way of updating autoscaling config is through 
{{AutoscalingHandler}} at {{/admin/autoscaling}}, which also performs 
validation of the config. Manipulating the config by hand may be tricky because 
there are interdependencies between different sections that are sometimes not 
obvious (eg. trigger listeners need to refer to existing triggers, trigger 
action implementations must be valid classes, waitFor must be expressed in 
seconds, Policy needs to be consistent, etc...).

If you're feeling adventurous enough you can update ZK directly... you could 
also use the {{DistribStateManager}} API, which at least hides the ZK 
complexity, eg like this: {{new 
ZkDistribStateManager(cloudSolrClient.getZkStateReader().getZkClient())}}. But 
I strongly advise using  {{/admin/autoscaling}} :)

> allow to change the autoscaling configuration via SolrJ
> -------------------------------------------------------
>
>                 Key: SOLR-12467
>                 URL: https://issues.apache.org/jira/browse/SOLR-12467
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 7.3.1
>            Reporter: Hendrik Haddorp
>            Priority: Minor
>
> Using SolrJ's CloudSolrClient it is possible to read the autoscaling 
> configuration:
> cloudSolrClient.getZkStateReader().getAutoScalingConfig()
> There is however no way to update it. One can only read out the list of life 
> nodes and then do a call to Solr using the LBHttpSolrClient for example. 
> Given that the config is stored in ZooKeeper and thus could be written 
> directly and even when no Solr instance is running this is not optimal.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to