sjvanrossum commented on code in PR #34420:
URL: https://github.com/apache/beam/pull/34420#discussion_r2012439841
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java:
##########
@@ -704,16 +707,19 @@ abstract static class UnboundedSourceRestriction<OutputT,
CheckpointT extends Ch
UnboundedSourceRestriction<OutputT, CheckpointT> create(
UnboundedSource<OutputT, CheckpointT> source,
@Nullable CheckpointT checkpoint,
- Instant watermark) {
+ Instant watermark,
+ @Nullable Integer index) {
return new
AutoValue_Read_UnboundedSourceAsSDFWrapperFn_UnboundedSourceRestriction<>(
- source, checkpoint, watermark);
+ source, checkpoint, watermark, index);
}
public abstract UnboundedSource<OutputT, CheckpointT> getSource();
public abstract @Nullable CheckpointT getCheckpoint();
public abstract Instant getWatermark();
+
+ public abstract @Nullable Integer getKey();
Review Comment:
When I was tinkering with this I had put this down as `byte[]` or
`ByteString` in case sub-splitting a split is ever added. The root split starts
out with an empty byte blob (for a single root) or a varint encoded index (for
multiple roots) and the id of a split would be composed of the parent split id
and another varint encoded index (constructed when looping over the result of
`#split()`) appended/prepended.
It's entirely unnecessary to model it like that today though and an integer
should suffice. :)
--
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]