Project

General

Profile

« Previous | Next » 

Revision 2387

Added by Duane Costa over 19 years ago

Modify Harvester documentation to provide instructions for configuring and running Harvester as a servlet.

View differences:

harvester.html
236 236
  <h5><a name="Running Harvester">Running Harvester</a></h5>
237 237
  After Harvester has been appropriately 
238 238
  <a href="#Configuring Harvester">configured</a>, 
239
  it can be run as follows:
239
  it can be run in either of two ways: (A) in a command window, or, (B)
240
  as a servlet. If you wish only to test that Harvester is functioning, 
241
  or if you expect to use Harvester infrequently, it may desirable to run it from a 
242
  command window. However, under most circumstances you will want Harvester to 
243
  run continuously as a background servlet process. This eliminates the
244
  need to keep a command window continuously open while Harvester is running.
245
  Both of these procedures are described below.
246
  <ul>
247
  <li> (A) Running Harvester in a Command Window
240 248
  <ol>
241 249
  <li>Open a system command window or terminal window.</li>
242 250
  <li>Set the METACAT_HOME environment variable to the value of the Metacat
......
263 271
        <pre>sh runHarvester.sh</pre></li>
264 272
      </ul>
265 273
  </li>
266
  </ol>
274
 </ol>
267 275
  <p>The Harvester application will start executing. It will begin its first
268 276
  harvest after <code><b>delay</b></code> number of hours (as specified in the
269 277
  <a href=../../lib/metacat.properties>metacat.properties</a>
270 278
  file). The application will continue running a new harvest every
271 279
  <code><b>period</b></code> number of hours until a <code><b>maxHarvests</b></code>
272
  number of harvests have been completed.
280
  number of harvests have been completed, or until you interrupt the process by
281
  hitting CTRL/C in the command window.
273 282
  </p>
274
  <h5><a name="Reviewing Harvester">
283
  </li>
284
  <li> (B) Running Harvester as a Servlet
285
  <ol>
286
  <li>Edit the file in your Metcat installation, <code>lib/web.xml.<em>tomcatN</em></code>, where <em>tomcatN</em> corresponds to the
287
  version of Tomcat you are running. For example, if you are running Tomcat 5,
288
  edit file <code>lib/web.xml.tomcat5</code>.</li>
289
  <li>Remove the comment symbols around the HarvesterServlet entry, so that:
290
  <pre><code>
291
  &lt;!--
292
  &lt;servlet>
293
  &lt;servlet-name>HarvesterServlet&lt;/servlet-name>
294
  &lt;servlet-class>edu.ucsb.nceas.metacat.harvesterClient.HarvesterServlet&lt;/servlet-class>
295
  &lt;init-param>
296
    &lt;param-name>debug&lt;/param-name>
297
    &lt;param-value>1&lt;/param-value>
298
  &lt;/init-param>
299
  &lt;init-param>
300
    &lt;param-name>listings&lt;/param-name>
301
    &lt;param-value>true&lt;/param-value>
302
  &lt;/init-param>
303
  &lt;load-on-startup>1&lt;/load-on-startup>
304
  &lt;/servlet>
305
  --&gt;
306
  </code></pre>
307
  is changed to:
308
  <pre><code>
309
  &lt;servlet>
310
  &lt;servlet-name>HarvesterServlet&lt;/servlet-name>
311
  &lt;servlet-class>edu.ucsb.nceas.metacat.harvesterClient.HarvesterServlet&lt;/servlet-class>
312
  &lt;init-param>
313
    &lt;param-name>debug&lt;/param-name>
314
    &lt;param-value>1&lt;/param-value>
315
  &lt;/init-param>
316
  &lt;init-param>
317
    &lt;param-name>listings&lt;/param-name>
318
    &lt;param-value>true&lt;/param-value>
319
  &lt;/init-param>
320
  &lt;load-on-startup>1&lt;/load-on-startup>
321
  &lt;/servlet>
322
  </code></pre>
323
  Save the edited file.
324
  </li>
325
  <li>Shutdown Tomcat.</li>
326
  <li>Redeploy Metacat by running the following two ant commands from the top-level
327
  directory of your Metacat installation:
328
  <code><pre>
329
  ant cleanweb
330
  ant install</code></pre>
331
  </li>
332
  <li>Restart Tomcat.</li>
333
 </ol>
334
  <p>About thirty seconds after you restart Tomcat, the Harvester servlet will 
335
  start executing. It will begin its first
336
  harvest after <code><b>delay</b></code> number of hours (as specified in the
337
  <a href=../../lib/metacat.properties>metacat.properties</a>
338
  file). The servlet will continue running a new harvest every
339
  <code><b>period</b></code> number of hours until a <code><b>maxHarvests</b></code>
340
  number of harvests have been completed, or until Tomcat shuts down.
341
  </p>
342
  </li>
343
   <h5><a name="Reviewing Harvester">
275 344
  Reviewing Harvester Reports to the Harvester Administrator</a></h5>
276 345
  <P>
277 346
  After every harvest, Harvester will send an email report to the Harvester

Also available in: Unified diff