Skip to content

Release Notes 0.5.0

Olof Nilsson edited this page Apr 4, 2014 · 2 revisions

Hydra 0.5.0

Major changes

  • Rewrite of the Hydra Stage API
    • Stages no longer have access to RemotePipeline.
    • Stages can no longer create documents.
    • The deprecated InputStages have all been removed.
    • To discard a document, call LocalDocument#discard
    • To get document attachments, call LocalDocument#getFile et.al.
    • Now uses Guava Service instead of handling the lifecycle of long living threads ourselves.
    • All exceptions thrown in stage implementations are now caught and fails the document.
    • The failDocumentOnProcessException stage parameter is no more.
    • Output stages no longer have the accept() method. This method could previously be used for batching, but it did not work well.
    • Output stages will implicitly mark documents as processed if the output() method returns without exceptions.

Upgrading from 0.4.x

  • Stages built using API 0.4.0+ can still be started and communicate with a 0.5.0 Core, but it is recommend to recompile using the 0.5.0 API.
  • When updating the dependency on hydra-api, Stages need to be updated:
    • ProcessException has been removed. Make sure to handle exceptions in your stages, and call fail() on documents that should be failed.
    • Replace calls to RemotePipeline related to files, use LocalDocument.getFile() instead.
    • Replace calls to RemotePipeline.markDiscarded() with LocalDocument.discard().
    • When testing your stages, don't use setParameters(). Instead, create setters for your parameters and use those.
  • If your stage created documents, (i.e. called RemotePipeline.save*), or is an input stage, it is no longer supported going forward. If you have a great need for this type of stage, please join the discussion on the mailing list and issues.
  • Output stages need to remove all accept() calls, instead making sure that any failure state is handled by throwing exceptions.

Pull requests merged into 0.5.0

  • #313 laserval/rebased_remen_api_refactor remen's API rewrite

Contributors

  • @laserval
  • @remen