lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Trivial Update of "DataImportHandler" by MarkoBonaci
Date Fri, 10 Sep 2010 12:23:43 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "DataImportHandler" page has been changed by MarkoBonaci.
http://wiki.apache.org/solr/DataImportHandler?action=diff&rev1=252&rev2=253

--------------------------------------------------

  
  
  <<Anchor(scheduling)>>
- = Scheduling DIH =
+ = Scheduling =
+  * Version 1.0
   * Author Marko Bonaci, Croatia
-  * Version 1.0
+  * Enables scheduling DIH delta and/or full imports
   * Proofs the concept, needs almost complete overhaul
-  * Tested on Apache Tomcat v6
+  * Successfully tested on Apache Tomcat v6 (should work on any container)
+  * Wasn't incorporated in SVN (needs more polishing in order to commit)
  
  Global /!\ :TODO: /!\
   * add comments to methods
   * try to use Solr's internal classes wherever possible
+  * parametrize the schedule interval in minutes (currently set to 10 minutes in ApplicationListener's
contextInitialized method)
   
+ == Prereqs ==
+  * working DIH configuration in place
+  * dataimport.properties file in folder ''solr.home/conf/'' with mandatory params inside
(see bellow for the example of dataimport.properties)
  
  == SolrDataImportProperties ==
+  * uses [[http://download.oracle.com/javase/6/docs/api/java/util/Properties.html|java.util.Properties]]
to get settings from dataimport.properties
+ 
-  * the class uses resource loading to get DIHScheduler settings
-  * requires dataimport.properties file in folder solr.home/conf/
-  * see constants for param names which should be added to dataimport.properties
  /!\ :TODO: /!\
   * uses system property for locating solr.home (use Solr's resource loader instead)
  
@@ -1137, +1142 @@

  	public void contextInitialized(ServletContextEvent servletContextEvent) {
  		ServletContext servletContext = servletContextEvent.getServletContext();
  		try{
- 			// create the timer and timer task objects
+ 			// create the timer and HTTPPostScheduler (TimerTask) objects
  			Timer timer = new Timer();
  			HTTPPostScheduler task = new HTTPPostScheduler(servletContext.getServletContextName());
  
@@ -1145, +1150 @@

  			Calendar calendar = Calendar.getInstance();
  			Date startTime = calendar.getTime();
  
- 			// schedule the task to run hourly
+ 			// schedule the task to run every ten minutes
  			timer.scheduleAtFixedRate(task, startTime, 1000 * 60 * 10);
  
- 			// save our timer for later use
+ 			// save our timer in context attribute map for later use
  			servletContext.setAttribute("timer", timer);
  			
  		} catch (Exception e) {

Mime
View raw message