Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Add ack and fail to Streamlet API (#2909) #3217

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jmark99
Copy link
Contributor

@jmark99 jmark99 commented Mar 15, 2019

This PR updates Heron to allow for ack and fail behaviour with the Streamlet API.

Would request feedback, especially as to the caching of id's and tuples.

These updates have been tested against a collection of streamlet examples. The repo located at https://github.com/jmark99/heron-examples contains a collection of many streamlet examples. The modifications have been run successfully against this collection. The README file for that repo describes the steps taken to exercise the changes.

This commit is intended to fix #2909

Update the streamlet API to allow ack/fail for messages.
@nwangtw nwangtw requested a review from jerrypeng March 15, 2019 16:13
@nwangtw
Copy link
Contributor

nwangtw commented Mar 15, 2019

Is there a way to verify the behavior with unit tests?

@jmark99
Copy link
Contributor Author

jmark99 commented Mar 15, 2019

I believe I will have to find a way to test via integration tests in order to verify programmatically. Even with integration tests I'm not sure how to test tuple failures. I'm open to ideas.

While running my heron-examples there are situation where tuples fail and are re-emitted successfully. I'm just not sure how to force that behaviour in testing.

@nwangtw
Copy link
Contributor

nwangtw commented Mar 15, 2019

Most operators don't have "failure" case (for example filter, flatmap). Only ack I remember.

The only way to trigger fail() I can think of now is to write a simple bolt that has failure cases and then use the applyOperator() function.

I was thinking of catching exceptions as failures but it might have some unwanted side effects so it is not decided yet.

Added unit tests for SupplierSource and ComplexSource. Added two helper
classes for the the tests. Updated several other classes to use clearer
variable names. Also updated location of ackingEnabled check and cache
creation.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ack and fail to Streamlet API
2 participants