You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Furkan KAMACI <fu...@gmail.com> on 2013/06/09 22:40:39 UTC

Why clusterstate.json says active for a killed Solr Node?

I want to get cluster state of my SolrCloud and this is my method:

private final CloudSolrServer solrServer;

public SolrCloudServerFactory(String zkHost) throws MalformedURLException {
     this.solrServer = new CloudSolrServer(zkHost);
     solrServer.connect();
}

and I get what I want from solrServer variable. However I killed a running
Solr node from my cluster and I see that clusterstate.json at still shows
it as active and my solrserver variable says same thing too. I have killed
that start.jar but why it is still active? How can I understand it is down?
I think that Solr admin page doesn't look at clusterstate.json?

Re: Why clusterstate.json says active for a killed Solr Node?

Posted by Furkan KAMACI <fu...@gmail.com>.
Here is my code to check state of node:

!liveNodes.contains(replica.getNodeName()) ? ZkStateReader.DOWN :
replica.get(ZkStateReader.STATE_PROP).toString()


2013/6/10 Mark Miller <ma...@gmail.com>

> You currently kind of have to look at both if you want to know the true
> state.
>
> An active state means that shard is up to date and online serving - as
> long as it's live node is also up.
>
> - Mark
>
> On Jun 9, 2013, at 6:18 PM, Furkan KAMACI <fu...@gmail.com> wrote:
>
> > Is it enough just look at only live nodes(if not: could you tell me is
> there any example code part at Solr source code)? By the way what does
> active means for clusterstate.json?
> >
> > 2013/6/10 Mark Miller <ma...@gmail.com>
> > The true current state is the live nodes info combined with the
> > clusterstate.json. If a node is not live, whatever is in
> clusterstate.json
> > is simply it's last state, not the current one.
> >
> > - Mark
> >
> >
> > On Sun, Jun 9, 2013 at 4:40 PM, Furkan KAMACI <furkankamaci@gmail.com
> >wrote:
> >
> > > I want to get cluster state of my SolrCloud and this is my method:
> > >
> > > private final CloudSolrServer solrServer;
> > >
> > > public SolrCloudServerFactory(String zkHost) throws
> MalformedURLException {
> > >      this.solrServer = new CloudSolrServer(zkHost);
> > >      solrServer.connect();
> > > }
> > >
> > > and I get what I want from solrServer variable. However I killed a
> running
> > > Solr node from my cluster and I see that clusterstate.json at still
> shows
> > > it as active and my solrserver variable says same thing too. I have
> killed
> > > that start.jar but why it is still active? How can I understand it is
> down?
> > > I think that Solr admin page doesn't look at clusterstate.json?
> > >
> >
> >
> >
> > --
> > - Mark
> >
>
>

Re: Why clusterstate.json says active for a killed Solr Node?

Posted by Mark Miller <ma...@gmail.com>.
You currently kind of have to look at both if you want to know the true state.

An active state means that shard is up to date and online serving - as long as it's live node is also up.

- Mark

On Jun 9, 2013, at 6:18 PM, Furkan KAMACI <fu...@gmail.com> wrote:

> Is it enough just look at only live nodes(if not: could you tell me is there any example code part at Solr source code)? By the way what does active means for clusterstate.json?
> 
> 2013/6/10 Mark Miller <ma...@gmail.com>
> The true current state is the live nodes info combined with the
> clusterstate.json. If a node is not live, whatever is in clusterstate.json
> is simply it's last state, not the current one.
> 
> - Mark
> 
> 
> On Sun, Jun 9, 2013 at 4:40 PM, Furkan KAMACI <fu...@gmail.com>wrote:
> 
> > I want to get cluster state of my SolrCloud and this is my method:
> >
> > private final CloudSolrServer solrServer;
> >
> > public SolrCloudServerFactory(String zkHost) throws MalformedURLException {
> >      this.solrServer = new CloudSolrServer(zkHost);
> >      solrServer.connect();
> > }
> >
> > and I get what I want from solrServer variable. However I killed a running
> > Solr node from my cluster and I see that clusterstate.json at still shows
> > it as active and my solrserver variable says same thing too. I have killed
> > that start.jar but why it is still active? How can I understand it is down?
> > I think that Solr admin page doesn't look at clusterstate.json?
> >
> 
> 
> 
> --
> - Mark
> 


Re: Why clusterstate.json says active for a killed Solr Node?

Posted by Furkan KAMACI <fu...@gmail.com>.
Is it enough just look at only live nodes(if not: could you tell me is
there any example code part at Solr source code)? By the way what does
active means for clusterstate.json?

2013/6/10 Mark Miller <ma...@gmail.com>

> The true current state is the live nodes info combined with the
> clusterstate.json. If a node is not live, whatever is in clusterstate.json
> is simply it's last state, not the current one.
>
> - Mark
>
>
> On Sun, Jun 9, 2013 at 4:40 PM, Furkan KAMACI <furkankamaci@gmail.com
> >wrote:
>
> > I want to get cluster state of my SolrCloud and this is my method:
> >
> > private final CloudSolrServer solrServer;
> >
> > public SolrCloudServerFactory(String zkHost) throws
> MalformedURLException {
> >      this.solrServer = new CloudSolrServer(zkHost);
> >      solrServer.connect();
> > }
> >
> > and I get what I want from solrServer variable. However I killed a
> running
> > Solr node from my cluster and I see that clusterstate.json at still shows
> > it as active and my solrserver variable says same thing too. I have
> killed
> > that start.jar but why it is still active? How can I understand it is
> down?
> > I think that Solr admin page doesn't look at clusterstate.json?
> >
>
>
>
> --
> - Mark
>

Re: Why clusterstate.json says active for a killed Solr Node?

Posted by Mark Miller <ma...@gmail.com>.
The true current state is the live nodes info combined with the
clusterstate.json. If a node is not live, whatever is in clusterstate.json
is simply it's last state, not the current one.

- Mark


On Sun, Jun 9, 2013 at 4:40 PM, Furkan KAMACI <fu...@gmail.com>wrote:

> I want to get cluster state of my SolrCloud and this is my method:
>
> private final CloudSolrServer solrServer;
>
> public SolrCloudServerFactory(String zkHost) throws MalformedURLException {
>      this.solrServer = new CloudSolrServer(zkHost);
>      solrServer.connect();
> }
>
> and I get what I want from solrServer variable. However I killed a running
> Solr node from my cluster and I see that clusterstate.json at still shows
> it as active and my solrserver variable says same thing too. I have killed
> that start.jar but why it is still active? How can I understand it is down?
> I think that Solr admin page doesn't look at clusterstate.json?
>



-- 
- Mark