I went with the first approach which got me up and running. Your other
example config (using ./snapshooter) made me realize how foolish my
original problem was!

Anyway, I've got the whole thing up and running and it looks pretty
awesome! 

One quick question, though. As stated in the wiki, one of the benefits
of distributing the indexes is load balance the queries. Is there a
built-in solr mechanism for performing this query load balancing? I'm
suspecting there is not, and I haven't seen anything about it in the
wiki, but I wanted to check because I know I'm going to be asked.

Thanks,
Charlie

-----Original Message-----
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 3:20 PM
To: solr-user@lucene.apache.org
Subject: RE: NullPointerException (not schema related)


:     <listener event="postCommit" class="solr.RunExecutableListener">
:       <str name="exe">snapshooter</str>
:       <str name="dir">/usr/local/Production/solr/solr/bin/</str>
:       <bool name="wait">true</bool>
:     </listener>

: the directory. However, when I committed data to the index, I was
: getting "No such file or directory" errors from the Runtime.exec call.
I
: verified all of the permissions, etc, with the user I was trying to
use.
: In the end, I wrote up a little test program to see if it was a
problem
: with the Runtime.exec call and I think it is. I'm running this on
CentOS
: 4.4 and Runtime.exec seems to have a hard time directly executing bash
: scripts. For example, if I called Runtime.exec with a command of
: "test_program" (which is a bash script), it failed. If I called
: Runtime.exec with a command of "/bin/bash test_program" it worked.

this initial problem you were having may be a result of path issues.
dir
doesn't need to be the directory where your script lives, it's the
directory where you wnat your script to run (the "cwd" of the process).
it's possible that the error you were getting was because "." isn't in
the
PATH that was being used, you should try something like this...

     <listener event="postCommit" class="solr.RunExecutableListener">
       <str
name="exe">/usr/local/Production/solr/solr/bin/snapshooter</str>
       <str name="dir">/usr/local/Production/solr/solr/bin/</str>
       <bool name="wait">true</bool>
     </listener>

...or maybe even...

     <listener event="postCommit" class="solr.RunExecutableListener">
       <str name="exe">./snapshooter</str> <!-- note the ./ -->
       <str name="dir">/usr/local/Production/solr/solr/bin/</str>
       <bool name="wait">true</bool>
     </listener>

-Hoss

Reply via email to