Ignore:
Timestamp:
2014-08-20T22:03:28+12:00 (10 years ago)
Author:
ak19
Message:

SOLR related. TEMPORARY changes for the GS3 workshop. Owing to the change to Solr 4.7.2, solr collections can't re-build despite activate if the GS3 server is running because there is a conflict with the jetty server launched by buildcol and jetty finds a lock on the index. The result is that one can't search the solr index after such a rebuild. Dr Bainbridge suggested a temporary measure: instead of commandline building solr collections, we will now build them in GLI. GLI will build solr collections with activate on but, for solr collections alone, it will stop the GS3 server before a build and start it again upon completion. In future, we will get rid of the solr jetty server and just have solr running over HTTP from tomcat. The Java GS3 runtime code will have to access Solr as a HTTPSolrServer rather than as an EmbeddedSolrServer at that point.

File:
1 edited

Legend:

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

    r20117 r29222  
    6363
    6464import org.greenstone.gatherer.collection.CollectionManager;
     65import org.greenstone.gatherer.util.GS3ServerThread;
    6566
    6667/** This class provides a GUI view showing some statistics on your current collection, and options for building it. As the collection is built this initial view is replaced with one showing progress bars and a message log of the creation process. This log can be later accessed via the options tree located in the center of the initial pane. This class is also responsible for creating the GShellProgressMonitors that are then attatched to external shell processes, and calling the methods in the CollectionManager for actually importing and building the collection. <br><BR>
     
    694695            */
    695696                prepareForBuild();
     697
     698        // Starting building,
     699    // For now, for a GS3 solr collection, we need to stop the GS3 server before building
     700    // and restart it after building is complete. Restart is done in CollectionManager.processComplete()
     701    if(CollectionManager.isSolrCollection()) {
     702        GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "stop");
     703        thread.start();
     704    }
     705
    696706                Gatherer.c_man.importCollection(); //This starts the building process.
    697707            /*
     
    860870        // Remove the collection lock.
    861871        //Gatherer.g_man.lockCollection(false, false);
     872
     873        // Cancelling building:
     874    // For now, for a GS3 solr collection, we need to stop the GS3 server before building
     875    // and restart it after building is complete. If a cancel is pressed during build
     876    // then we also restart the GS3 server
     877    if(CollectionManager.isSolrCollection()) {
     878        GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
     879        thread.start();
     880    }
     881
     882
    862883    }
    863884    }
Note: See TracChangeset for help on using the changeset viewer.