[
https://issues.apache.org/jira/browse/BEAM-7342?focusedWorklogId=245389&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-245389
]
ASF GitHub Bot logged work on BEAM-7342:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/May/19 18:00
Start Date: 20/May/19 18:00
Worklog Time Spent: 10m
Work Description: boyuanzz commented on pull request #8607: [BEAM-7342]
Extend SyntheticPipeline map steps to be splittable.
URL: https://github.com/apache/beam/pull/8607#discussion_r285706285
##########
File path: sdks/python/apache_beam/testing/synthetic_pipeline.py
##########
@@ -115,6 +115,108 @@ def process(self, element):
for _ in range(self._output_records_per_input_record):
yield element
+class SyntheticSDFStepRestrictionProvider(RestrictionProvider):
+ """A `RestrictionProvider` for SyntheticSDFStep.
+
+ In initial_restriction and split that operates on num_records and ignores
+ source description (element).
+
+ """
+
+ def __init__(self, num_records, initial_splitting_num_bundles):
+ self._num_records = num_records
+ self._initial_splitting_num_bundles = initial_splitting_num_bundles
+
+ def initial_restriction(self, element):
+ return (0, self._num_records)
Review comment:
Any reason why prefer using OffRange rather than a (start_pos, end_pos)? If
using OffsetRange instead of a simple tuple, then a RestrictionProvider can
only create an OffRangeTracker in process fn, right? I'm not sure whether there
are other links of tracker expected to be created, though.
----------------------------------------------------------------
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: 245389)
Time Spent: 1.5h (was: 1h 20m)
> Extend SyntheticPipeline map steps to be able to be splittable (Beam Python
> SDK)
> --------------------------------------------------------------------------------
>
> Key: BEAM-7342
> URL: https://issues.apache.org/jira/browse/BEAM-7342
> Project: Beam
> Issue Type: New Feature
> Components: testing
> Environment: Beam Python
> Reporter: Lara Schmidt
> Assignee: Lara Schmidt
> Priority: Minor
> Original Estimate: 1m
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> Add the ability for map steps to be configured to be splittable.
> Possible configuration options:
> - uneven bundle sizes
> - possible incorrect sizing returned
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)