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 280: Enable Stream tags for Python bindings. #281

Merged
merged 17 commits into from
Jul 1, 2021

Conversation

shrids
Copy link
Contributor

@shrids shrids commented Jun 30, 2021

Change log description

  • Enable Stream tags for Python bindings.

Purpose of the change
Fixes #280

What the code does

  • Enable passing of Stream scaling policy and Retention policy for python bindings.
  • Enable Stream Tag APIs on python bindings.
# create a stream with stream scaling is enabled with data rate as 10kbps, scaling factor as 2 and initial segments as 1
scalingpolicy = StreamScalingPolicy.auto_scaling_policy_by_data_rate(10, 2, 1)
stream_manager.create_stream_with_policy(scope_name=scope, stream_name="testStream1", scaling_policy=scalingpolicy)
# By default retention policy is disabled.

# update stream with retentionpolicy and tags.
##retention policy of 10GB
retentionpolicy = StreamRetentionPolicy.by_size(10*1024*1024 * 1024)
stream_manager.update_stream_with_policy(scope, "testStream1", scalingpolicy, retentionpolicy, tags=['t1', 't2'])

# fetch stream tags for the given Stream
tags = stream_manager.get_stream_tags(scope, "testStream1")

How to verify it
All the existing and newly added tests should pass.

shrids added 15 commits June 1, 2021 17:49
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
@shrids shrids marked this pull request as ready for review June 30, 2021 13:10
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
shared/src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: Sandeep <sandeep.shridhar@emc.com>
@codecov-commenter
Copy link

Codecov Report

Merging #281 (ecfc844) into master (1d73528) will increase coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #281      +/-   ##
==========================================
+ Coverage   76.58%   76.67%   +0.09%     
==========================================
  Files          44       44              
  Lines       11066    11143      +77     
==========================================
+ Hits         8475     8544      +69     
- Misses       2591     2599       +8     
Impacted Files Coverage Δ
shared/src/lib.rs 80.98% <ø> (ø)
connection_pool/src/connection_pool.rs 90.59% <0.00%> (-2.80%) ⬇️
src/byte/reader.rs 97.31% <0.00%> (ø)
wire_protocol/src/mock_connection.rs 75.57% <0.00%> (+0.05%) ⬆️
wire_protocol/src/client_connection.rs 94.62% <0.00%> (+0.37%) ⬆️
wire_protocol/src/connection_factory.rs 77.77% <0.00%> (+1.38%) ⬆️
wire_protocol/src/connection.rs 13.15% <0.00%> (+2.66%) ⬆️
src/segment/raw_client.rs 85.18% <0.00%> (+6.83%) ⬆️

@tkaitchuck tkaitchuck merged commit 8954c04 into master Jul 1, 2021
@tkaitchuck tkaitchuck deleted the stream-tag-python branch July 1, 2021 17:16
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 Stream tags for Python bindings.
4 participants