Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 183 : Enable reader group Python APIs #182

Merged
merged 35 commits into from
Nov 9, 2020
Merged

Issue 183 : Enable reader group Python APIs #182

merged 35 commits into from
Nov 9, 2020

Conversation

shrids
Copy link
Contributor

@shrids shrids commented Oct 29, 2020

Change log description

  • Enable Reader group Python APIs

Purpose of the change
Fixes #183

What the code does
This change enables the ReaderGroup APIs for the python client.
Example snippet is shown below.

import pravega_client;
import asyncio;

stream_manager = pravega_client.StreamManager("127.0.0.1:9090")
reader_group = stream_manager.create_reader_group("rg-1", "scope", "testStream")
r1 = reader_group.create_reader("reader-1")
r2 = reader_group.create_reader("reader-2")
slice= await r1.get_segment_slice_async()
for event in segment_slice:
    print(event.data())
# release a segment slice back. Releasing a partially consumed segment slice
# ensures the next segment slice has the remaining data.
r1.release_segment(slice)
# mark the reader as offline.
r1.reader_offline()

How to verify it
Python tests have been implemented. This can be invoked using the tox tool.[https://tox.readthedocs.io/en/latest/]

shrids added 27 commits October 7, 2020 18:30
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
Signed-off-by: Sandeep <[email protected]>
@shrids shrids requested review from tkaitchuck and Tristan1900 and removed request for tkaitchuck October 29, 2020 15:01
@shrids shrids requested a review from tkaitchuck October 29, 2020 15:02
@shrids shrids changed the title Issue : Enable reader group Python APIs Issue 183 : Enable reader group Python APIs Oct 30, 2020
@shrids shrids marked this pull request as ready for review November 4, 2020 14:19
@codecov-io
Copy link

Codecov Report

Merging #182 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #182   +/-   ##
=======================================
  Coverage   74.39%   74.39%           
=======================================
  Files          51       51           
  Lines        9416     9416           
=======================================
  Hits         7005     7005           
  Misses       2411     2411           
Impacted Files Coverage Δ
src/reader_group_config.rs 84.31% <100.00%> (ø)

@tkaitchuck tkaitchuck merged commit 2dbc929 into master Nov 9, 2020
@tkaitchuck tkaitchuck deleted the python-rg branch November 9, 2020 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable ReaderGroup Python APIs
4 participants