Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For Delft-FEWS to quickly and easily find the data in the Open Archive it requires a catalogue of all data and important metadata in the Open Archive. Harvesting is the process of generating this catalogue based on the available data and metadata.

This section will briefly introduce the various harvesters that are available and how they should be configured.

From the release Delft-FEWS 2024.01 the harvest process is improved in the following way;

  1. All the data exports from FEWS to the archive now inform the archive about which data sets were newly added to the archive. The archive will immediately harvest these newly added data sets so that they become directly available in the catalogue.
  2. Archive tasks which add data to or remove data from the archive such as the archive amalgamate or the data removal task also make sure that the catalogue is immediately updated directly after they finished their task.

Various harvester tasks

The Delft-FEWS Open Archive currently has three types of harvesters:

  • Full harvester
  • Incremental harvester
  • Immediate harvester

These all contribute to generating the catalogue in their own way. You should configure all of them including a "Remove obsolete data from catalogue" task in your ArchiveTasks configuration. 

Full harvester

Note

In releases prior to Delft-FEWS 2024.01 it was recommended to have a full harvest task scheduled to run at least once a day.

From the Delft-FEWS 2024.01 release you need to configure the full harvest task as a manual task, and need to introduce the immediate and incremental harvester to the scheduling.

This task scans the entire content of the archive data folder and builds the catalogue based on the available data. The full harvester typically takes a long time to finish (if there's a lot of data in the archive), which is why this should be configured as a manual task (since 2024.01) only ran during the initial installation, or after an upgrade to a newer version. When running the full harvester manually after an upgrade, please ensure that you've first properly cleared the catalogue.

Also, when you have deleted data from the archive manually or by using your own scripts it is recommended to run the full harvest task.

For the 2024.01 version the full harvester still needs to be scheduled to also check if there are datasets in the catalogue which are no longer present in the archive. After a full harvest run the catalogue will always be up-to-date.

Incremental harvester

The incremental harvester looks back a certain (configurable) period to harvest the data. This significantly speeds up the process (compared to the full harvester).

We recommend scheduling this every hour.

Immediate harvester

The immediate harvester should be scheduled with a high frequency, e.g. every minute. When exporting data, Delft-FEWS will write a file in the upload folder which is subsequently used by the immediate harvester to harvest the new dataset.

NOTE: contrary to the functioning of the full and incremental harvester, the immediate harvester will not detect dataset that are no longer present in the archive. For deleting obsolete data from the catalogue, a new task was introduced: remove obsolete data from catalogue

Remove obsolete data from catalogue

This task check if there is data in the catalogue which has already been removed from the file system.

Configuration options

To configure the archive tasks you can use the archiveTaskSchedule xml. This should be uploaded to the archive server.

There are various tasks available, these can either be configured to run manually, or scheduled. 

For manual tasks you only need to configure:

  • the type of task
  • the description

You can run them from the Archive Admin Web GUI. 

For scheduled tasks you also need to configure:

  • start time, this should be used to configure at which moments during the day the task may run.
  • end time, this should be used to configure at which moments during the day the task may run.
  • run interval, recommend to use runIntervalInSeconds to provide the interval at which the task is scheduled. 
  • whether the task is active, when active it will run, when deactivated, it will wait to be activated and won't run in the mean time.

For a description of the various tasks, please consult: Archive tasks

Below an configuration example

Code Block
languagexml
<archiveTasksSchedule xsi:schemaLocation="http://www.wldelft.nl/fews/archive http://fews.wldelft.nl/schemas//version1.0/archive-schemas/archiveTasksSchedule.xsd" xmlns="http://www.wldelft.nl/fews/archive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<scheduledArchiveTask>
		<predefinedArchiveTask>incremental harvester internal catalogue</predefinedArchiveTask>
		<description>Incremental harvester (harvest the last 7 days)</description>
		<startTime>00:00:00</startTime>
		<endTime>23:59:00</endTime>
		<runInterval>1</runInterval>
		<active>true</active>
	</scheduledArchiveTask>
	<scheduledArchiveTask>
		<predefinedArchiveTask>immediate harvester task</predefinedArchiveTask>
		<description>Immediate harvester (harvest the newly added or deleted data sets immediately)</description>
		<startTime>00:00:00</startTime>
		<endTime>23:59:00</endTime>
		<runIntervalInSeconds>60</runIntervalInSeconds>
		<active>true</active>
	</scheduledArchiveTask>
	<scheduledArchiveTask>
		<predefinedArchiveTask>file sweeper</predefinedArchiveTask>
		<description>File sweeper</description>
		<startTime>00:00:00</startTime>
		<endTime>23:59:00</endTime>
		<runInterval>1</runInterval>
		<active>true</active>
	</scheduledArchiveTask>
	<!--<scheduledArchiveTask>
		<predefinedArchiveTask>historical events exporter</predefinedArchiveTask>
		<description>historical events exporter herstarted</description>
		<startTime>00:00:00</startTime>
		<endTime>23:00:00</endTime>
		<runInterval>1</runInterval>
		<active>true</active>
	</scheduledArchiveTask>-->
	<manualArchiveTask>
		<predefinedArchiveTask>harvester internal catalogue</predefinedArchiveTask>
		<description>Full harvest task (this task may take a long time to complete!)</description>
	</manualArchiveTask>
	<manualArchiveTask>
		<predefinedArchiveTask>clear internal catalogue</predefinedArchiveTask>
		<description>Clear internal catalogue</description>
	</manualArchiveTask>
	<manualArchiveTask>
		<predefinedArchiveTask>remove obsolete data from catalogue</predefinedArchiveTask>
		<description>Remove obsolete records from catalogue</description>
	</manualArchiveTask>
	<manualArchiveTask>
		<predefinedArchiveTask>remove netcdf cache files</predefinedArchiveTask>
		<description>Remove netcdf cache files</description>
	</manualArchiveTask>
	<manualArchiveTask>
		<predefinedArchiveTask>data management tool</predefinedArchiveTask>
		<description>Data management tool</description>
	</manualArchiveTask>
		<manualArchiveTask>
		<predefinedArchiveTask>remove data from archive</predefinedArchiveTask>
		<description>Remove expired data from the archive</description>
	</manualArchiveTask>
</archiveTasksSchedule>




  The following section describes in detail how to configure these harvesting tasks: Configuration of the Delft-FEWS Archive Server#ConfigurationofTaskScheduling