I see that you are trying to get solrcloud cluster state using java., You could try something like this..
CloudSolrServer server = new CloudSolrServer("192.112.21.21:9983"); server.setZkConnectTimeout(15*60*1000); server.setZkClientTimeout(15*60*1000); server.setParser(new BinaryResponseParser()); server.setRequestWriter(new BinaryRequestWriter()); CollectionAdminRequest adminRequest = new CollectionAdminRequest(); adminRequest.setAction(CollectionAction.CLUSTERSTATUS); CollectionAdminResponse adminResponse = adminRequest.process(server); System.out.println(adminResponse.toString()); And the output will be something like this for a collection with 2shards.,
Read full article from java - How to get the cluster state of Solr Cloud using the solrZkClient and zkStateReader? - Stack Overflow
No comments:
Post a Comment