[
https://issues.apache.org/jira/browse/BEAM-2939?focusedWorklogId=232462&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-232462
]
ASF GitHub Bot logged work on BEAM-2939:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Apr/19 01:06
Start Date: 25/Apr/19 01:06
Worklog Time Spent: 10m
Work Description: pabloem commented on pull request #8338: [BEAM-2939]
Initial SyntheticSDF as Source and add an Synthetic pipeline to sdf test
URL: https://github.com/apache/beam/pull/8338#discussion_r278368654
##########
File path: sdks/python/apache_beam/testing/synthetic_pipeline.py
##########
@@ -250,6 +252,95 @@ def default_output_coder(self):
[beam.coders.BytesCoder(), beam.coders.BytesCoder()])
+class SyntheticSDFSourceRestrictionProvider(RestrictionProvider):
+ """A `RestrictionProvider` for SyntheticSDFAsSource.
+
+ In initial_restriction(element) and split(element), element means source
+ description.
+ A typical element is like:
+
+ {
+ 'key_size': 1,
+ 'value_size': 1,
+ 'initial_splitting_num_bundles': 2,
+ 'initial_splitting_desired_bundle_size': 2,
+ 'sleep_per_input_record_sec': 0,
+ 'initial_splitting' : 'const'
+
+ }
+
+ """
+
+ def initial_restriction(self, element):
+ return (0, element['num_records'])
+
+ def create_tracker(self, restriction):
+ return restriction_trackers.OffsetRestrictionTracker(
+ restriction[0], restriction[1])
+
+ def split(self, element, restriction):
Review comment:
Also for my edification, can `split` be called on restrictions that have
already been split? If so, would the implementation of this method change?
(because it seems that it calculates splits based on the 'global/unsplit' info
coming from the element).
TBH you know this way better than me, so I may be barking at the wrong tree
: )
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 232462)
Time Spent: 17h (was: 16h 50m)
> Fn API SDF support
> ------------------
>
> Key: BEAM-2939
> URL: https://issues.apache.org/jira/browse/BEAM-2939
> Project: Beam
> Issue Type: Improvement
> Components: beam-model
> Reporter: Henning Rohde
> Assignee: Luke Cwik
> Priority: Major
> Labels: portability, triaged
> Time Spent: 17h
> Remaining Estimate: 0h
>
> The Fn API should support streaming SDF. Detailed design TBD.
> Once design is ready, expand subtasks similarly to BEAM-2822.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)