Re: Solr cloud with multiple ZK instances


Jerry He <jerr...@...>
 

Hi, Sarath and Madhan

Your analysis makes sense.

I did a quick test.
From gremlin shell: 
gremlin> graph.getConfiguration().getLocalConfiguration().getProperty('index.search.solr.zookeeper-url')
It only returns the first server out of the three servers in  'index.search.solr.zookeeper-url' from the property file.
On the other hand,
gremlin> graph.getConfiguration().getLocalConfiguration().getProperty('storage.hostname')
returns the list of three zookeeper servers for the hbase property.  storage.hostname is a String[] config option.  

We need to fix it, as you suggested.

Thanks for digging into it.

Jerry 


On Tue, Oct 2, 2018 at 2:34 PM, <madhan....@...> wrote:
The issue is trigged by CommonsConfigurations implementation, which calls getString(key) for String type values. When the value for the key is an array, getString(key) returns the first element - which causes JanusGraph to use only the first zookeeper host:port.

Changing SolrIndex.ZOOKEEPER_URL from "String" to "String[]" will end up calling getStringArray() , which will return all entries of the array.


On Tuesday, October 2, 2018 at 2:19:21 PM UTC-7, Sarath Subramanian wrote:
Jerry,


final String zookeeperUrl = config.get(SolrIndex.ZOOKEEPER_URL);

Always fetches single  string value, even if comma-separated zookeeper host values are specified. 

Maybe the fix is changing the data type from String to String array below?

public static final ConfigOption<String> ZOOKEEPER_URL = new ConfigOption<>(SOLR_NS,"zookeeper-url", "URL of the Zookeeper instance coordinating the SolrCloud cluster", ConfigOption.Type.MASKABLE, "localhost:2181");


Thanks,
Sarath 


On Friday, September 28, 2018 at 12:03:24 PM UTC-7, Jerry He wrote:
I think JanusGraph simply passes the  zookeeper-url string to the Solr cloud client without doing any parsing, and the string format is what Solr needs.
It is strange and puzzling that Solr's use of zookeeper client is not doing the re-connect.  Zookeeper client itself would do the fail-over reconnect (assume the correct servers and parameters are given to it).

Thanks,

Jerry

On Thu, Sep 27, 2018 at 10:03 PM, Apoorv Naik <na...@...> wrote:
Yes this is exactly what we're doing but if the first ZK server in the ensemble goes down the server runs into an endless retry loop, doesn't failover to other hosts at all.

Apoorv Naik


On Thu, Sep 27, 2018 at 9:58 PM Jerry He <je...@...> wrote:
Hi, Apoorv

Try:

index.search.solr.zookeeper-url=aid1:2181/solr,aid2:2181/solr,aid3:2181/solr

Replace hostnames and other info, with the members in you assemble.

Thanks,

Jerry 

On Thu, Sep 27, 2018 at 9:14 PM, Apoorv Naik <na...@...> wrote:
Hi Jerry,

I've a cluster where I've three Zookeepers deployed ( single ensemble) , the moment the first one goes down the Janusgraph instance becomes unusable and goes into an exception loop. So what I was trying to achieve was a failover to the other zookepeer server in the ensemble.

On Thursday, September 27, 2018 at 9:02:41 PM UTC-7, Jerry He wrote:
Hi, Apoorv

Can you explain what you want?  Do you mean multiple servers for a Zookeeper ensemble by 'multiple zookeeper instances'?  Or you mean multiple ensembles?

Thanks,

Jerry

On Thu, Sep 27, 2018 at 8:38 PM, Apoorv Naik <na...@...> wrote:
Looking at the documentation around using Solr in cloud mode, looks like there's only one zookeeper URL that's supported. How can I configure the JanusGraph instance to use multiple zookeeper instances instead of just one ?

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To post to this group, send email to janu...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/2c870817-b0f0-413e-955b-7739689eb0db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To post to this group, send email to janu...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/6b696132-af2a-436e-93c4-49e41a16289c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To post to this group, send email to janu...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CAHkeaHVnHgzjTxsk7Y87GWFYRqCUh%3Dm_F7TOB4jvJQ79%2BHYKWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To post to this group, send email to janu...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CAOT1%3D38Sbe9q7x1jmMeV6kAGHH-9vHxFyZ8tp6Jg01ANCea3AA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To post to this group, send email to janusgraph-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/125d6193-9e40-41bf-a569-085c7848f479%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Join janusgraph-dev@lists.lfaidata.foundation to automatically receive all group messages.