Changeset 29711 for main


Ignore:
Timestamp:
2015-02-03T21:57:53+13:00 (9 years ago)
Author:
ak19
Message:

Moving from using the solr jetty server to solr using the GS3 tomcat server. Now localhost:8383/solr hosts the solr server RESTful pages. Changes: 1. Minor changes to GS3 build.xml. 2. GLI no longer does the temporary stopping of the GS3 server, launching jetty server for building a solr collection, stopping jetty, restarting GS3 tomcat server. GLI leaves the GS3 server running. 3. The main changes are to ext/solr. The ext/solr/gs3-setup.sh sets the new SOLR_PORT and SOLR_HOST variables read from the GS3 build.properties, as the jetty port and host variables are no longer used. ext/solr/build.xml now puts the solr war file into tomcat's webapps, as well as helper libraries necessary (xalan related); a solr.xml context file is created from a template file and placed into tomcat's conf/Catalina/localhost; additional solr jar files are copied into tomcat/lib, as well as the slf4j bridge being copied into GS3/web/WEB-INF/lib; the solr perl code has been changed to use the new RESTful URLs and particularly to work with solr running off the GS3 tomcat server, or stop and start it as required, rather than working with (or stopping and starting) the solr jetty server. A new run_solr_server.pl executable script runs the tomcat server rather than the jetty server; major changes to the Java Solr code to no longer work with the EmbeddedSolrServer (which caused a conflict when the index is accessed by solr jetty server upon rebuild of solr collections), our solr Java code now uses HttpSolrServer to contact the solr servlet running off tomcat. 5. Still a bug: when search results go over a page after rebuilding a solr collection in GLI against a running GS3 server, the 2nd page of search results aren't present and things break. But if the server is not running, solr collections rebuild fine, so the changes do everything that GS3.06 did and more.

Location:
main/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r29514 r29711  
    10831083        // Do not do configGS3Server for a GS3 solr collection. Not at present at least, when we're stopping
    10841084        // and starting the GS3 server from GLI for solr cols, since this function clears the solr.xml file.
    1085         if(Gatherer.c_man.isSolrCollection()) {
     1085        /*if(Gatherer.c_man.isSolrCollection()) {
    10861086        return;
    1087         }
     1087        }*/
    10881088
    10891089        if (Configuration.library_url == null){
  • main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r29361 r29711  
    17531753        // For now, for a GS3 solr collection, we'd have stopped the GS3 server before building
    17541754        // and will now need to restart it.
    1755         GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
    1756         thread.start();
     1755        /*GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
     1756          thread.start();*/
    17571757       
    17581758        // Give the GS3 server time to restart:
  • main/trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java

    r29222 r29711  
    700700    // and restart it after building is complete. Restart is done in CollectionManager.processComplete()
    701701    if(CollectionManager.isSolrCollection()) {
    702         GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "stop");
    703         thread.start();
     702        /*GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "stop");
     703          thread.start();*/
    704704    }
    705705
     
    876876    // then we also restart the GS3 server
    877877    if(CollectionManager.isSolrCollection()) {
    878         GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
    879         thread.start();
     878        /*GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
     879          thread.start();*/
    880880    }
    881881
  • main/trunk/greenstone3/build.xml

    r29578 r29711  
    20342034    <if>
    20352035      <bool><istrue value="${tomcat.islocal}"/></bool>
    2036       <copy file="${web.lib}/xercesImpl.jar" todir="${web.applet}"/>
    2037       <copy file="${web.lib}/xml-apis.jar" todir="${web.applet}"/>
     2036      <if><bool><available file="${catalina.home}/lib/xercesImpl.jar"/></bool><!-- moved for solr -->
     2037    <copy file="${catalina.home}/lib/xercesImpl.jar" todir="${web.applet}"/>
     2038    <copy file="${catalina.home}/lib/xml-apis.jar" todir="${web.applet}"/>
     2039   
     2040    <else><!-- get from default GS3 web lib location-->
     2041      <copy file="${web.lib}/xercesImpl.jar" todir="${web.applet}"/>
     2042      <copy file="${web.lib}/xml-apis.jar" todir="${web.applet}"/>
     2043    </else>
     2044      </if>
    20382045    </if>
    20392046
Note: See TracChangeset for help on using the changeset viewer.