You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Content reprocessing is a key feature of StageR. It provides the ability to execute content processing pipelines over content that is already stored in a storage unit. Reprocessing is done at the scope level of a storage unit.

Records can be reprocessed through the reprocess API calls which allow for single key, multiple key and whole scope reprocessing. Items selected for reprocessing are put in a queue that is then consumed by reprocessing worker processes. Multiple reprocessing workers can be configured for a single installation.

Reprocessing will execute the content processing modules configured for the specified scope of the key(s).


To configure reprocessing, specify reprocessQueue properties under reprocessQueue (batchSize: number of documents to process as a batch, querySize: number of records by reprocess worker to retrieve at a time, timeout: wait timeout when there are no items in the queue) and define the number of reprocessing workers on the StageR configuration file:

{
  ...,
  reprocessQueue: {
    batchSize: 20,
    querySize: 40,
    timeout: 5000
  },
  workers: {
    restapi: 1,
    reprocess: 4,
    replication: 1
  },
  ...
}

Specify the content processing modules, for the scope to be reprocessed, using the admin/setContentProcessingModules API call:

POST admin/setContentProcessingModules/STORAGE_UNIT
{
    "modules" : {
        "connector": [
            {
                "settings" : {
                    "solr-collection" : "testcollection"
                },
                "module" : "SolrPublisher"
            }
        ]
    },
    "settings" : {
        "solr-hosts" : localhost:8983"
    }
}

Enable the reprocessing queue at the storage unit level. This will register the storage unit to be scanned by the reprocess workers.

PUT admin/enableReprocessingQueue/STORAGE_UNIT/true

Automatic Updates

When foreign keys are defined for a content record and the ForeignKeyJoin processing module is defined for a storage unit, a foreign key lookup table is created in StageR which allows the foreign item to know which primary items are referencing it, allowing for any updates to the foreign item to trigger an automatic update (send the keys to reprocess) of the primary keys.

As long as the reprocessing queue for the primary item's storage unit is enabled and there are reprocessing workers configured, automatic updates will be triggered.

Remote Replication

Remote replication allows a StageR storage unit to subscribe to a remote StageR storage unit and replicate the data locally. When a storage unit is subscribed for remote replication, the remote server will be sending all of its transactions to the subscribed storage unit, this way, the subscribing storage unit will know exactly how to replicate the incoming data.

Remote replication subscriptions are managed by the replication API. When specifying a remote subscription, a zoneId specified on the replication calls will be assigned to all incoming item keys as a prefix to distinguish items from the remote server with the ones created locally, if any. 

To configure remote replication, specify the replication properties (interval: wait timeout when no more transactions were available, querySize: number of records to retrieve at a time) and define the number of replication workers on the StageR configuration file:

{
  ...,
  replication: {
    interval: 15000,
    querySize: 40
  },
  workers: {
    restapi: 1,
    reprocess: 1,
    replication: 4
  },
  ...
}
  • No labels