Re: CoreAdmin for replication STATUS

2009-01-16 Thread Chris Hostetter

: > How do I find out the status of a slave's index?  I have the following
: > scenario:

FYI: regardless of where your index comes from (java replication, script 
replication, manual mucking, etc...) the stats page of any solr core will 
tell you the index version number in use by the current searcher which 
always increases as an index is modified over time.

the replication handler might tell you that the slave is currently 
replicating, but maybe it's already finished replicating the version you 
care about, and has moved on to replicating an even newer version?  or 
maybe replciation has finished, but auto-warming is stll taking place (i'm 
not sure what the replication handler status says in that case)

checking the info page on your master, remembering the version number, and 
then checking the info page on the slaves will always tell you if hte 
slave is currently searching an index version equal to or greater then 
when you last checked the master...

http://localhost:8983/solr/admin/stats.jsp
...

  
searcher
  
...

  1200621623713



-Hoss



Re: CoreAdmin for replication STATUS

2009-01-15 Thread Akshay
On Fri, Jan 16, 2009 at 4:57 AM, Jacob Singh  wrote:

> Hi,
>
> How do I find out the status of a slave's index?  I have the following
> scenario:
>
> 1. Boot up the slave.  I give it a core name of boot-$CoreName.
>
> 2. I call boot-$CoreName/replication?command=snappull
>
> 3. I check back every minute using cron and I want to see if the slave
> has actually gotten the data.
>
> 4. When it gets the data I call
> solr/admin/cores?action=RENAME&core=boot-$CoreName&other=$CoreName.
>
> I do this because the balancer will start hitting the slave before it
> has the full index otherwise.  Step 3 is the problem.  I don't have a
> reliable way to know it has finished replication AFAIK.  I see in
> ?action=STATUS for the CoreAdmin there is a field called "current".
> Is this useful for this?  If not, what is recommended.  I could hit
> the admin/replication/index.jsp url and screenscrape the HTML, but I
> imagine there is a better way.


>From the slave you can issue a http command,
boot-$CoreName/replication?command=details
this returns XML which contains a node isReplicating having boolean value.
This will tell you whether replication is in progress or completed.

Thanks,
> Jacob
>
> --
>
> +1 510 277-0891 (o)
> +91  33 7458 (m)
>
> web: http://pajamadesign.com
>
> Skype: pajamadesign
> Yahoo: jacobsingh
> AIM: jacobsingh
> gTalk: jacobsi...@gmail.com
>



-- 
Regards,
Akshay Ukey.


CoreAdmin for replication STATUS

2009-01-15 Thread Jacob Singh
Hi,

How do I find out the status of a slave's index?  I have the following scenario:

1. Boot up the slave.  I give it a core name of boot-$CoreName.

2. I call boot-$CoreName/replication?command=snappull

3. I check back every minute using cron and I want to see if the slave
has actually gotten the data.

4. When it gets the data I call
solr/admin/cores?action=RENAME&core=boot-$CoreName&other=$CoreName.

I do this because the balancer will start hitting the slave before it
has the full index otherwise.  Step 3 is the problem.  I don't have a
reliable way to know it has finished replication AFAIK.  I see in
?action=STATUS for the CoreAdmin there is a field called "current".
Is this useful for this?  If not, what is recommended.  I could hit
the admin/replication/index.jsp url and screenscrape the HTML, but I
imagine there is a better way.

Thanks,
Jacob

-- 

+1 510 277-0891 (o)
+91  33 7458 (m)

web: http://pajamadesign.com

Skype: pajamadesign
Yahoo: jacobsingh
AIM: jacobsingh
gTalk: jacobsi...@gmail.com