[ https://issues.apache.org/jira/browse/BEAM-7443?focusedWorklogId=252054&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-252054 ]
ASF GitHub Bot logged work on BEAM-7443: ---------------------------------------- Author: ASF GitHub Bot Created on: 31/May/19 21:04 Start Date: 31/May/19 21:04 Worklog Time Spent: 10m Work Description: lukecwik commented on pull request #8641: [BEAM-7443] Create a BoundedSource -> SDF wrapper in Python SDK URL: https://github.com/apache/beam/pull/8641#discussion_r289541805 ########## File path: sdks/python/apache_beam/io/iobase.py ########## @@ -1180,15 +1180,47 @@ def check_done(self): raise NotImplementedError def try_split(self, fraction_of_remainder): + """Splits current restriction based on fraction_of_remainder. + + Invoked when SDK receiving ProcessBundleSplitRequest during processing + bundle. + + Args: + fraction_of_remainder: a fraction of (cur_pos, stop_pos). + + Returns: ``None`` when current restriction has been checkpointed, or + split_point is out of current restriction range. Otherwise, return + ((start_pos, split_pos), (split_pos, stop_pos)). + + ** Thread safety ** + Accessing to position and checkpoint status should be guarded by a single + lock object. Review comment: ``` Returns: ``(primary_restriction, residual_restriction)`` if a split was possible, otherwise returns ``None``. ``` ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 252054) Time Spent: 3h 10m (was: 3h) > BoundedSource->SDF needs a wrapper in Python SDK > ------------------------------------------------- > > Key: BEAM-7443 > URL: https://issues.apache.org/jira/browse/BEAM-7443 > Project: Beam > Issue Type: New Feature > Components: sdk-py-core > Reporter: Boyuan Zhang > Assignee: Boyuan Zhang > Priority: Major > Time Spent: 3h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)