Eliaaazzz opened a new pull request, #39529:
URL: https://github.com/apache/beam/pull/39529

   Adds a "Reading from an unbounded source" section to the Python I/O 
connector development guide.
   
   The guide currently documents only the bounded `BoundedSource` / 
`RangeTracker` path and does not say how to build an unbounded (streaming) 
source in Python. The Java guide covers this with its `UnboundedSource` / 
`UnboundedReader` sections. The Python SDK has no `UnboundedSource` class; an 
unbounded source is written as a Splittable DoFn, but the I/O connector guide, 
which is where the Java unbounded documentation lives, had no Python 
counterpart.
   
   ### What changes
   
   - A note under "Implementing the Source interface" stating that the `Source` 
interface is bounded only, linking to the new section.
   - A new "Reading from an unbounded source" section with a minimal unbounded 
Splittable DoFn example (`@beam.DoFn.unbounded_per_element()`, 
`RestrictionParam`, `WatermarkEstimatorParam`, `try_claim`, `defer_remainder`).
   - A mapping from each `UnboundedSource` / `UnboundedReader` concern in the 
Java guide to its Splittable DoFn equivalent: initial and dynamic splitting, 
checkpointing through residual restrictions, resuming through 
`defer_remainder`, watermark estimators, deduplication, and drain through 
`RestrictionProvider.truncate`.
   - Pointers to the reusable building blocks: `PeriodicImpulse` / 
`PeriodicSequence` and the experimental `Watch` transform added in #39023.
   
   The example follows the same self-checkpoint pattern as the 
`SDF_UserInitiatedCheckpoint` snippet in the programming guide and 
`periodicsequence.py`: call `restriction_tracker.defer_remainder(...)` and 
return, which is the mechanism the portable runners implement.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] [**Choose 
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and 
mention them in a comment (`R: @username`).
    - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable. This will automatically add a link to the 
pull request in the issue. If you would like the issue to automatically close 
on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://cla.apache.org/).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more 
tips on [how to make review process 
smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit 
[https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to