On Fri, Jan 16, 2009 at 4:57 AM, Jacob Singh <jacobsi...@gmail.com> 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 9999 33 7458 (m) > > web: http://pajamadesign.com > > Skype: pajamadesign > Yahoo: jacobsingh > AIM: jacobsingh > gTalk: jacobsi...@gmail.com > -- Regards, Akshay Ukey.