CoreAdminRequest in SolrCloud
Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil.
Re: CoreAdminRequest in SolrCloud
Hello Nabil, isn't that what should be expected? Cores are local to nodes, so you only get the core status from the node you're asking. Cluster status refers to the entire SolrCloud cluster, so you will get the status over all collection/nodes/shards[=cores]. Check the Core Admin REST interface for comparison. Cheers, --Jürgen On 20.10.2014 11:41, nabil Kouici wrote: Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil. -- Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С уважением *i.A. Jürgen Wagner* Head of Competence Center Intelligence Senior Cloud Consultant Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543 E-Mail: juergen.wag...@devoteam.com mailto:juergen.wag...@devoteam.com, URL: www.devoteam.de http://www.devoteam.de/ Managing Board: Jürgen Hatzipantelis (CEO) Address of Record: 64331 Weiterstadt, Germany; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
Re: CoreAdminRequest in SolrCloud
Querying all shards for a collection should look familiar; it's as though SolrCloud didn't even come into play: /http://localhost:8983/solr/collection1/select?q=*:*/ If, on the other hand, you wanted to search just one shard, you can specify that shard, as in: /http://localhost:8983/solr/collection1/select?q=*:*shards=localhost:7574/solr/ If you want to search a group of shards, you can specify them together: /http://localhost:8983/solr/collection1/select?q=*:*shards=localhost:7574/solr,localhost:8983/solr/ Or you can specify a list of servers to choose from for load balancing purposes by using the pipe symbol (|): /http://localhost:8983/solr/collection1/select?q=*:*shards=localhost:7574/solr|localhost:7500/solr/ nabil Kouici wrote Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedList ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil. -- View this message in context: http://lucene.472066.n3.nabble.com/CoreAdminRequest-in-SolrCloud-tp4164918p4164941.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: CoreAdminRequest in SolrCloud
Hi Jürgen, As you can see, I'm not using direct connection to node. It's a CloudServer. Do you have example to how to get Cluster status from solrJ. Regards, Nabil. Le Lundi 20 octobre 2014 13h44, Jürgen Wagner (DVT) juergen.wag...@devoteam.com a écrit : Hello Nabil, isn't that what should be expected? Cores are local to nodes, so you only get the core status from the node you're asking. Cluster status refers to the entire SolrCloud cluster, so you will get the status over all collection/nodes/shards[=cores]. Check the Core Admin REST interface for comparison. Cheers, --Jürgen On 20.10.2014 11:41, nabil Kouici wrote: Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil. -- Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С уважением i.A. Jürgen Wagner Head of Competence Center Intelligence Senior Cloud Consultant Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543 E-Mail: juergen.wag...@devoteam.com, URL: www.devoteam.de Managing Board: Jürgen Hatzipantelis (CEO) Address of Record: 64331 Weiterstadt, Germany; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
Re: CoreAdminRequest in SolrCloud
Hi Nabil, you can get /clusterstate.json from Zookeeper. Check CloudSolrServer.getZkStateReader(): http://lucene.apache.org/solr/4_10_1/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.html Best regards, --Jürgen On 20.10.2014 15:16, nabil Kouici wrote: Hi Jürgen, As you can see, I'm not using direct connection to node. It's a CloudServer. Do you have example to how to get Cluster status from solrJ. Regards, Nabil. Le Lundi 20 octobre 2014 13h44, Jürgen Wagner (DVT) juergen.wag...@devoteam.com a écrit : Hello Nabil, isn't that what should be expected? Cores are local to nodes, so you only get the core status from the node you're asking. Cluster status refers to the entire SolrCloud cluster, so you will get the status over all collection/nodes/shards[=cores]. Check the Core Admin REST interface for comparison. Cheers, --Jürgen On 20.10.2014 11:41, nabil Kouici wrote: Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil. -- Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С уважением *i.A. Jürgen Wagner* Head of Competence Center Intelligence Senior Cloud Consultant Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543 E-Mail: juergen.wag...@devoteam.com mailto:juergen.wag...@devoteam.com, URL: www.devoteam.de http://www.devoteam.de/ Managing Board: Jürgen Hatzipantelis (CEO) Address of Record: 64331 Weiterstadt, Germany; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
Re: CoreAdminRequest in SolrCloud
Thank you Jürgen for this link. However, this will not give number of documents and shard size. Regards, Nabil. Le Lundi 20 octobre 2014 15h23, Jürgen Wagner (DVT) juergen.wag...@devoteam.com a écrit : Hi Nabil, you can get /clusterstate.json from Zookeeper. Check CloudSolrServer.getZkStateReader(): http://lucene.apache.org/solr/4_10_1/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.html Best regards, --Jürgen On 20.10.2014 15:16, nabil Kouici wrote: Hi Jürgen, As you can see, I'm not using direct connection to node. It's a CloudServer. Do you have example to how to get Cluster status from solrJ. Regards, Nabil. Le Lundi 20 octobre 2014 13h44, Jürgen Wagner (DVT) juergen.wag...@devoteam.com a écrit : Hello Nabil, isn't that what should be expected? Cores are local to nodes, so you only get the core status from the node you're asking. Cluster status refers to the entire SolrCloud cluster, so you will get the status over all collection/nodes/shards[=cores]. Check the Core Admin REST interface for comparison. Cheers, --Jürgen On 20.10.2014 11:41, nabil Kouici wrote: Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil. -- Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С уважением i.A. Jürgen Wagner Head of Competence Center Intelligence Senior Cloud Consultant Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543 E-Mail: juergen.wag...@devoteam.com, URL: www.devoteam.de Managing Board: Jürgen Hatzipantelis (CEO) Address of Record: 64331 Weiterstadt, Germany; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071