pravega-samples icon indicating copy to clipboard operation
pravega-samples copied to clipboard

Issue 191: Add at-least-once stream processing example

Open claudiofahey opened this issue 5 years ago • 13 comments

These examples are intended to illustrate how at-least-once semantics can be achieved with Pravega. In particular, these illustrative examples do not use Apache Flink.

claudiofahey avatar Mar 14 '19 06:03 claudiofahey

In the event that a single worker dies, the segments that it was reading will be automatically assigned to another worker. However, this code does not transfer the state between workers, leaving the state inconsistent.

Also, from what point does the reader read the newly assigned segments? Does it begin from the last checkpoint?

claudiofahey avatar Mar 16 '19 19:03 claudiofahey

@claudiofahey due to issues we had in previous releases merging develop into master, we have changed the release approach and the current development branch is dev. We plan to delete develop to avoid confusions, so could you please re-open this PR against dev? Thanks!

RaulGracia avatar Aug 12 '19 16:08 RaulGracia

This PR is ready for re-review.

claudiofahey avatar Aug 13 '19 22:08 claudiofahey

The latest commit should provide at-least-once semantics in a clean way using only Pravega. I believe the code is complete but it does not have any automated tests yet. We also need to update the README to describe how this works.

claudiofahey avatar Jun 20 '20 20:06 claudiofahey

This PR is ready for review. For a description of this PR, see https://github.com/claudiofahey/pravega-samples/blob/issue-191-streamprocessing/pravega-client-examples/src/main/java/io/pravega/example/streamprocessing/README.md. Unit and integration tests can be run with ./gradlew pravega-client-examples:build.

claudiofahey avatar Aug 04 '20 04:08 claudiofahey

@RaulGracia, I have addressed all of your comments. However, it appears that there is an intermittent timeout failure in the test kill5of6Test. I will continue to investigate.

claudiofahey avatar Mar 19 '21 18:03 claudiofahey

@claudiofahey maybe the failure you are seeing are related to the sporadic failures we see in Pravega core repo related to tests involving Pravega standalone: https://github.com/pravega/pravega/issues/5864

RaulGracia avatar Mar 22 '21 09:03 RaulGracia

@claudiofahey I tested the sample and it works. Also compiled with JDK11 and JDK8 and it also works (./gradlew installDist). But I also observed the failure in test kill5of6Test. Please, let's try to get this test passing so we can merge this one soon.

RaulGracia avatar Mar 25 '21 11:03 RaulGracia

FYI, I ran the integration 20 times and all have passed:

for i in {1..20}; do ./gradlew clean test; done |& tee -a /tmp/test.log
grep "SUCCESSFUL" /tmp/test.log
BUILD SUCCESSFUL in 3m 42s
BUILD SUCCESSFUL in 3m 31s
BUILD SUCCESSFUL in 3m 56s
BUILD SUCCESSFUL in 3m 41s
BUILD SUCCESSFUL in 3m 47s
BUILD SUCCESSFUL in 6m 25s
BUILD SUCCESSFUL in 4m 18s
BUILD SUCCESSFUL in 4m 34s
BUILD SUCCESSFUL in 4m 25s
BUILD SUCCESSFUL in 4m 32s
BUILD SUCCESSFUL in 4m 16s
BUILD SUCCESSFUL in 4m 16s
BUILD SUCCESSFUL in 6m 29s
BUILD SUCCESSFUL in 4m 5s
BUILD SUCCESSFUL in 4m 8s
BUILD SUCCESSFUL in 4m 6s
BUILD SUCCESSFUL in 4m 26s
BUILD SUCCESSFUL in 4m 29s
BUILD SUCCESSFUL in 4m 2s
BUILD SUCCESSFUL in 3m 37s

claudiofahey avatar Mar 25 '21 21:03 claudiofahey

@claudiofahey tests passed for me. I had to upgrade the Scala version of Spark in the Hadoop sample, as build was broken by one of the previous PRs. But now looks good, thanks!.

RaulGracia avatar Mar 26 '21 08:03 RaulGracia

@tkaitchuck please, would you mind to do another review to either approve it or request more changes?

RaulGracia avatar Mar 26 '21 08:03 RaulGracia

@claudiofahey can you address @tkaitchuck comments so we can close this one? I think we are close.

RaulGracia avatar Apr 16 '21 16:04 RaulGracia

@claudiofahey any updates addressing @tkaitchuck feedback? This one is actually looks close to get merged, wondering if it is worth it to do a last push for it.

RaulGracia avatar Jul 27 '21 07:07 RaulGracia