You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Howard Gonzalez <Ho...@careerbuilder.com> on 2020/08/21 16:45:35 UTC

How to Write Autoscaling Policy changes to Zookeeper/SolrCloud using the autoscaling Java API

Hello. I am trying to use the autoscaling Java API to write some cluster policy changes to a Zookeeper/SolrCloud cluster. However, I can't find the right way to do it. I can get all the autoscaling cluster policy clauses using:

autoScalingConfig.getPolicy.getClusterPolicy

However, after getting all the right List of clauses, I don't know how to write those changes to the Zookeeper/Solr cluster using the Java API.

Any guidance please? I know I can use the HTTP solr client to send a json request, but just wondering how to do it using the provided Java API.

Thanks in advance

Re: How to Write Autoscaling Policy changes to Zookeeper/SolrCloud using the autoscaling Java API

Posted by Howard Gonzalez <Ho...@careerbuilder.com>.
Good morning! To add more context on the question, I can successfully use the Java API to build the list of new Clauses. However, the problem that I have is that I don't know how to "write" those changes back to solr using the Java API. I see there's a writeMap method in the Policy class however I can't find how to use it.

Thanks in advance

________________________________
From: Howard Gonzalez <Ho...@careerbuilder.com>
Sent: Friday, August 21, 2020 12:45 PM
To: solr-user@lucene.apache.org <so...@lucene.apache.org>
Subject: How to Write Autoscaling Policy changes to Zookeeper/SolrCloud using the autoscaling Java API

Hello. I am trying to use the autoscaling Java API to write some cluster policy changes to a Zookeeper/SolrCloud cluster. However, I can't find the right way to do it. I can get all the autoscaling cluster policy clauses using:

autoScalingConfig.getPolicy.getClusterPolicy

However, after getting all the right List of clauses, I don't know how to write those changes to the Zookeeper/Solr cluster using the Java API.

Any guidance please? I know I can use the HTTP solr client to send a json request, but just wondering how to do it using the provided Java API.

Thanks in advance