Revision 2387
Added by Duane Costa almost 20 years ago
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 |
<!-- |
|
292 |
<servlet> |
|
293 |
<servlet-name>HarvesterServlet</servlet-name> |
|
294 |
<servlet-class>edu.ucsb.nceas.metacat.harvesterClient.HarvesterServlet</servlet-class> |
|
295 |
<init-param> |
|
296 |
<param-name>debug</param-name> |
|
297 |
<param-value>1</param-value> |
|
298 |
</init-param> |
|
299 |
<init-param> |
|
300 |
<param-name>listings</param-name> |
|
301 |
<param-value>true</param-value> |
|
302 |
</init-param> |
|
303 |
<load-on-startup>1</load-on-startup> |
|
304 |
</servlet> |
|
305 |
--> |
|
306 |
</code></pre> |
|
307 |
is changed to: |
|
308 |
<pre><code> |
|
309 |
<servlet> |
|
310 |
<servlet-name>HarvesterServlet</servlet-name> |
|
311 |
<servlet-class>edu.ucsb.nceas.metacat.harvesterClient.HarvesterServlet</servlet-class> |
|
312 |
<init-param> |
|
313 |
<param-name>debug</param-name> |
|
314 |
<param-value>1</param-value> |
|
315 |
</init-param> |
|
316 |
<init-param> |
|
317 |
<param-name>listings</param-name> |
|
318 |
<param-value>true</param-value> |
|
319 |
</init-param> |
|
320 |
<load-on-startup>1</load-on-startup> |
|
321 |
</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
Modify Harvester documentation to provide instructions for configuring and running Harvester as a servlet.