Createsnapshot null pointer exception

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Createsnapshot null pointer exception

SOLR4189
Hi all,

I use SOLR-6.5.1. When I run this command:

*http://my_server_name:8983/solr/admin/collections?action=CREATESNAPSHOT&collection=collection_name&commitName=MYCommit*

I got this exception:
Collection: collection_name operation: createsnapshot failed:
java.lang.NullPointerException
  at
org.apache.solr.cloud.CreateSnapshotCmd.call(CreateSnapshotCmd.java:128)
  at
org.apache.solr.cloud.OverseerCollectionMessageHandler.processMessage(OverseerCollectionMessageHandler.java)
 ...

Does somebody know what's a problem?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Createsnapshot null pointer exception

SOLR4189
Ok. I understood my problem. Usually I create collection with X shards and
then add some Y cores. This Y cores I use like gateways or federators (my
web application sends queries to load balancer that connected to Y cores
only).

When I create Y cores, I used this command
*http://<server_name>:<port>/solr/admin/cores?action=create&name=<collection_name>&shard=<shard_name>*

So always I got Y cores with the same name (collection name) and due to
CREATESNAPSHOT command doesn't work.

Solution is to use something like this if you need to add new cores after
creating collection:
*http://<server_name>:<port>/solr/admin/cores?action=create&name=<collection_name>_<shard_name>&collection=<collection_name>&shard=<shard_name>*





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Createsnapshot null pointer exception

SOLR4189
This post was updated on .
In reply to this post by SOLR4189
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Createsnapshot null pointer exception

Erick Erickson
You're going to continually run into issues if you use the _cores_ api
to add replicas to a _collection_.

True, the collection API ADDREPLICA command uses the _cores_ API to
add replicas, but someone else has already worked out all the finicky
details.

So do yourself a favor and use the mechanism that's already been
worked out, namely ADDREPLICA. If you need to precisely place all
replicas, you can create the collection with the EMPTY node set and
then add one replica at a time, placing it precisely where you want.
You can also control replica placement on the CREATE command.

Best,
Erick

On Tue, Feb 12, 2019 at 9:06 AM SOLR4189 <[hidden email]> wrote:

>
> Ok. I understood my problem. Usually I create collection with X shards and
> then add some Y cores. This Y cores I use like gateways or federators (my
> web application sends queries to load balancer that connected to Y cores
> only).
>
> When I create Y cores, I used this command
> *http://<server_name>:<port>/solr/admin/cores?action=create&name=<collection_name>&shard=<shard_name>*
>
> So always I got Y cores with the same name (collection name) and due to
> CREATESNAPSHOT command doesn't work.
>
> Solution is to use something like this if you need to add new cores after
> creating collection:
> *http://<server_name>:<port>/solr/admin/cores?action=create&name=<collection_name>_<shard_name>&collection=<collection_name>&shard=<shard_name>*
>
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Createsnapshot null pointer exception

SOLR4189
I think, you don't understand what I mean.

1) I create collection with X shards, each shard has hash range (by CREATE
collection command)
2) I add Y new shards in the same collection, each shard hasn't hash range,
I call them gateways (by CREATE core command)
3) I add LoadBalancer over Y gateways, so all client queries will pass
through gateways

In this case, my Y gateways forward queries and merge results only (WITHOUT
searching in their index) and my X shards search in index only (WITHOUT
forward queries and merge results). It gives me the best queries
performance.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Createsnapshot null pointer exception

Jan Høydahl / Cominvent
Hi

You take all the risk by using unsupported features.
A supported way of achieving the same could perhaps be:

1) Create a new empty collection "gatewaycoll" on the nodes you want to dedicate as "gateways"
2) Send your queries to the gateway collection but ask for data from the data collection "datacoll"
    http://some.solr.server:8983/solr/gatewaycoll?q=my query&collection=datacoll

Have not tested it but it should give the desired effect. You can hardcode the "collection" param in solrconfig.xml of gatewaycoll's /select handler if you wish

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 18. feb. 2019 kl. 08:59 skrev SOLR4189 <[hidden email]>:
>
> I think, you don't understand what I mean.
>
> 1) I create collection with X shards, each shard has hash range (by CREATE
> collection command)
> 2) I add Y new shards in the same collection, each shard hasn't hash range,
> I call them gateways (by CREATE core command)
> 3) I add LoadBalancer over Y gateways, so all client queries will pass
> through gateways
>
> In this case, my Y gateways forward queries and merge results only (WITHOUT
> searching in their index) and my X shards search in index only (WITHOUT
> forward queries and merge results). It gives me the best queries
> performance.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html