RE: Programmatically find out if node is overseer

2015-07-21 Thread Markus Jelsma
Hello - this approach not only solves the problem but also allows me to run different processing threads on other nodes. Thanks! Markus -Original message- > From:Chris Hostetter > Sent: Saturday 18th July 2015 1:00 > To: solr-user > Subject: Re: Programmatically find ou

Re: Programmatically find out if node is overseer

2015-07-17 Thread Chris Hostetter
: Hello - i need to run a thread on a single instance of a cloud so need : to find out if current node is the overseer. I know we can already : programmatically find out if this replica is the leader of a shard via : isLeader(). I have looked everywhere but i cannot find an isOverseer. I At o

Re: Programmatically find out if node is overseer

2015-07-17 Thread Vincenzo D'Amore
Hi, in solrj I did this to find leaders url : CloudSolrServer solr = (CloudSolrServer) Configurazione.getSolrServer(); String collection = "collection1"; Map collectionAliases = solr.getZkStateReader().getAliases().getCollectionAliasMap(); if (collectionAliases.containsKey(collection)) { corename

Re: Programmatically find out if node is overseer

2015-07-17 Thread Shalin Shekhar Mangar
On Sat, Jul 18, 2015 at 1:00 AM, Shai Erera wrote: >> >> Also, ideally, there shouldn't be a point where you have multiple active >> Overseers in a single cluster. >> > > In the reference guide, CLUSTERSTATUS shows as if the overseer role can > return more than one node. Does it mean that these no

Re: Programmatically find out if node is overseer

2015-07-17 Thread Shai Erera
> > Also, ideally, there shouldn't be a point where you have multiple active > Overseers in a single cluster. > In the reference guide, CLUSTERSTATUS shows as if the overseer role can return more than one node. Does it mean that these nodes were designated potential 'overseers', but OVERSEERSTATUS

Re: Programmatically find out if node is overseer

2015-07-17 Thread Shalin Shekhar Mangar
Just for the record, SOLR-5859 only affects people who used the overseer roles feature released in 4.7 and no one else. This was fixed in 4.8 On Sat, Jul 18, 2015 at 12:18 AM, Anshum Gupta wrote: > It shouldn't happen unless you're using an older version of Solr (< 4.8) in > which case, you might

Re: Programmatically find out if node is overseer

2015-07-17 Thread Anshum Gupta
It shouldn't happen unless you're using an older version of Solr (< 4.8) in which case, you might end up hitting SOLR-5859 . On Fri, Jul 17, 2015 at 11:29 AM, wrote: > Hi Anshum what do you mean by: > >ideally, there shouldn't be a point where you

Re: Programmatically find out if node is overseer

2015-07-17 Thread solr . user . 1507
Hi Anshum what do you mean by: >ideally, there shouldn't be a point where you have multiple active Overseers in a single cluster How can multiple Overseers happen? And what are the consequences? Regards > On 17 Jul 2015, at 19:37, Anshum Gupta wrote: > > ideally, there shouldn't be a point whe

Re: Programmatically find out if node is overseer

2015-07-17 Thread Anshum Gupta
As Shai mentioned, OVERSEERSTATUS is the most straight forward and recommended way to go. It basically does what Erick suggested i.e. get the first entry from '/overseer_elect/leader' in zk. Also, ideally, there shouldn't be a point where you have multiple active Overseers in a single cluster. On

Re: Programmatically find out if node is overseer

2015-07-17 Thread Erick Erickson
good point Shai! On Thu, Jul 16, 2015 at 9:36 PM, Shai Erera wrote: > An easier way (IMO) and more 'official' is to use the CLUSTERSTATUS ( > https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api18) > or OVERSEERSTATUS ( > https://cwiki.apache.org/confluence/display/

Re: Programmatically find out if node is overseer

2015-07-16 Thread Shai Erera
An easier way (IMO) and more 'official' is to use the CLUSTERSTATUS ( https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api18) or OVERSEERSTATUS ( https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api17) API. The OVERSEERSTATUS returns a

Re: Programmatically find out if node is overseer

2015-07-16 Thread Erick Erickson
look at the overseer election ephemeral node in ZK, the first one in line is the current overseer. Best, Erick On Thu, Jul 16, 2015 at 3:42 AM, Markus Jelsma wrote: > Hello - i need to run a thread on a single instance of a cloud so need to > find out if current node is the overseer. I know we