Hi, in solrj I did this to find leaders url :

CloudSolrServer solr = (CloudSolrServer) Configurazione.getSolrServer();
String collection = "collection1";

Map<String,String> collectionAliases =
solr.getZkStateReader().getAliases().getCollectionAliasMap();
if (collectionAliases.containsKey(collection)) {
corename = collectionAliases.get(collection);
 for (Slice slice :
solr.getZkStateReader().getClusterState().getSlices(corename)) {
Replica sliceLeader = slice.getLeader();
log.info("faccio backup su {} {}", sliceLeader.getNodeName(),
sliceLeader.getProperties().get("core"));
                        log.info(String.format("%s/%s/",sliceLeader.get(
"base_url"), sliceLeader.getProperties().get("core")));
}
        }


On Fri, Jul 17, 2015 at 9:37 PM, Shalin Shekhar Mangar <
[email protected]> wrote:

> On Sat, Jul 18, 2015 at 1:00 AM, Shai Erera <[email protected]> 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 nodes were designated
> > potential 'overseers', but OVERSEERSTATUS' will return the actual one?
>
> Yes, the OVERSEERSTATUS will return the current (actual) leader always.
>
> >
> > Shai
> >
> > On Fri, Jul 17, 2015 at 10:11 PM, Shalin Shekhar Mangar <
> > [email protected]> wrote:
> >
> >> 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 <[email protected]>
> >> wrote:
> >> > 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
> >> > <https://issues.apache.org/jira/browse/SOLR-5859>.
> >> >
> >> > On Fri, Jul 17, 2015 at 11:29 AM, <[email protected]> wrote:
> >> >
> >> >> 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 <[email protected]>
> >> wrote:
> >> >> >
> >> >> > ideally, there shouldn't be a point where you have multiple active
> >> >> > Overseers in a single cluster
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Anshum Gupta
> >>
> >>
> >>
> >> --
> >> Regards,
> >> Shalin Shekhar Mangar.
> >>
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>



-- 
Vincenzo D'Amore
email: [email protected]
skype: free.dev
mobile: +39 349 8513251

Reply via email to