On 2/4/2016 2:12 PM, Aki Balogh wrote:
> I found the state.json file and it indeed shows that the range for shard1
> is null.
>
> In order to fix, do I need to upload a corrected state.json file with
> corrected hash ranges?   How can I do that? (zkcli.sh?)

The easiest way to figure out the correct hash range, if you do not know
it and cannot figure it out by looking at the other hash ranges, is to
create a new collection with the same number of shards as the broken
collection, then look at the clusterstate for that collection to see
what the hash ranges are, to determine which range is missing.  Then
once you have fixed the existing collection, delete the new collection.

You can upload the changed state.json file with zkcli.sh, I think the
command is "putfile", and you will need the full path within zookeeper. 
Alternately, you can get a GUI zookeeper client for IDEs like Eclipse
and IntelliJ IDEA for a more interactive experience.  Reloading the
collection after replacing the state.json file is probably required.

Thanks,
Shawn

Reply via email to