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 "joe.cohen.m@gmail.com" <jo...@gmail.com> on 2012/11/22 18:17:17 UTC

Reload core via CoreAdminRequest doesnt work with solr cloud? (solrj)

Hi,
I'm using solr-4.0.0
I'm trying to reload all the cores of a given collection in my solr cloud.
I use it like this:

CloudSolrServer server = new CloudSolrServer (zkserver:port);
server.setDefaultCollection("collection1");
CoreAdminRequest req = new CoreAdminRequest();
req.reloadCore("collection1", server)

This throws an Exception telling me that no live solr servers are availble,
listing the servers like this:
http://server/solr/collection1

Of course doing other tasks like adding documnets to the CloudSolrServer 
above works fine.
Using reloadCore on a HttpSolrServer also works fine.

Any know issue with CloudSolrServer   and CoreAdminRequest ?


Note that I moved to solr-4.0.0 from solr-4.0.0-beta after trying the same
thing also failed, but with a different exception.
it failed saying cannot cast string to map in class ClusterState,  in load()
method (line 300), because the key "range" gave some String value instead of
a map object.




--
View this message in context: http://lucene.472066.n3.nabble.com/Reload-core-via-CoreAdminRequest-doesnt-work-with-solr-cloud-solrj-tp4021882.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Reload core via CoreAdminRequest doesnt work with solr cloud? (solrj)

Posted by Mark Miller <ma...@gmail.com>.
I think that core admin commands may not work with CloudSolrServer at the moment. There is a JIRA issue for it I think.

For now, I'd use the HTTP imp and point at the node you want to work with or reload with the collections api.

- Mark

On Nov 22, 2012, at 12:17 PM, joe.cohen.m@gmail.com wrote:

> Hi,
> I'm using solr-4.0.0
> I'm trying to reload all the cores of a given collection in my solr cloud.
> I use it like this:
> 
> CloudSolrServer server = new CloudSolrServer (zkserver:port);
> server.setDefaultCollection("collection1");
> CoreAdminRequest req = new CoreAdminRequest();
> req.reloadCore("collection1", server)
> 
> This throws an Exception telling me that no live solr servers are availble,
> listing the servers like this:
> http://server/solr/collection1
> 
> Of course doing other tasks like adding documnets to the CloudSolrServer 
> above works fine.
> Using reloadCore on a HttpSolrServer also works fine.
> 
> Any know issue with CloudSolrServer   and CoreAdminRequest ?
> 
> 
> Note that I moved to solr-4.0.0 from solr-4.0.0-beta after trying the same
> thing also failed, but with a different exception.
> it failed saying cannot cast string to map in class ClusterState,  in load()
> method (line 300), because the key "range" gave some String value instead of
> a map object.
> 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Reload-core-via-CoreAdminRequest-doesnt-work-with-solr-cloud-solrj-tp4021882.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Reload core via CoreAdminRequest doesnt work with solr cloud? (solrj)

Posted by "joe.cohen.m@gmail.com" <jo...@gmail.com>.
Yes, but which url would tou use?
I'm in solr cloud. my index is distributed among 10 servers.
I was trying to use the solrJ API which seem to work in HttpSolrServer.


Tomás Fernández Löbbe wrote
> If you need to reload all the cores from a given collection you can use
> the
> Collections API:
> http://localhost:8983/solr/admin/collections?action=RELOAD&name=mycollection
> 
> 
> On Thu, Nov 22, 2012 at 3:17 PM, 

> joe.cohen.m@

>  <

> joe.cohen.m@

>> wrote:
> 
>> Hi,
>> I'm using solr-4.0.0
>> I'm trying to reload all the cores of a given collection in my solr
>> cloud.
>> I use it like this:
>>
>> CloudSolrServer server = new CloudSolrServer (zkserver:port);
>> server.setDefaultCollection("collection1");
>> CoreAdminRequest req = new CoreAdminRequest();
>> req.reloadCore("collection1", server)
>>
>> This throws an Exception telling me that no live solr servers are
>> availble,
>> listing the servers like this:
>> http://server/solr/collection1
>>
>> Of course doing other tasks like adding documnets to the CloudSolrServer
>> above works fine.
>> Using reloadCore on a HttpSolrServer also works fine.
>>
>> Any know issue with CloudSolrServer   and CoreAdminRequest ?
>>
>>
>> Note that I moved to solr-4.0.0 from solr-4.0.0-beta after trying the
>> same
>> thing also failed, but with a different exception.
>> it failed saying cannot cast string to map in class ClusterState,  in
>> load()
>> method (line 300), because the key "range" gave some String value instead
>> of
>> a map object.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Reload-core-via-CoreAdminRequest-doesnt-work-with-solr-cloud-solrj-tp4021882.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>





--
View this message in context: http://lucene.472066.n3.nabble.com/Reload-core-via-CoreAdminRequest-doesnt-work-with-solr-cloud-solrj-tp4021882p4022249.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Reload core via CoreAdminRequest doesnt work with solr cloud? (solrj)

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
If you need to reload all the cores from a given collection you can use the
Collections API:
http://localhost:8983/solr/admin/collections?action=RELOAD&name=mycollection


On Thu, Nov 22, 2012 at 3:17 PM, joe.cohen.m@gmail.com <
joe.cohen.m@gmail.com> wrote:

> Hi,
> I'm using solr-4.0.0
> I'm trying to reload all the cores of a given collection in my solr cloud.
> I use it like this:
>
> CloudSolrServer server = new CloudSolrServer (zkserver:port);
> server.setDefaultCollection("collection1");
> CoreAdminRequest req = new CoreAdminRequest();
> req.reloadCore("collection1", server)
>
> This throws an Exception telling me that no live solr servers are availble,
> listing the servers like this:
> http://server/solr/collection1
>
> Of course doing other tasks like adding documnets to the CloudSolrServer
> above works fine.
> Using reloadCore on a HttpSolrServer also works fine.
>
> Any know issue with CloudSolrServer   and CoreAdminRequest ?
>
>
> Note that I moved to solr-4.0.0 from solr-4.0.0-beta after trying the same
> thing also failed, but with a different exception.
> it failed saying cannot cast string to map in class ClusterState,  in
> load()
> method (line 300), because the key "range" gave some String value instead
> of
> a map object.
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Reload-core-via-CoreAdminRequest-doesnt-work-with-solr-cloud-solrj-tp4021882.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>