beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [beam] lostluck commented on a change in pull request #11188: [BEAM-3301] Adding restriction trackers and validation.
Date Mon, 23 Mar 2020 23:02:49 GMT
lostluck commented on a change in pull request #11188: [BEAM-3301] Adding restriction trackers
and validation.
URL: https://github.com/apache/beam/pull/11188#discussion_r396803249
 
 

 ##########
 File path: sdks/go/pkg/beam/core/graph/fn_test.go
 ##########
 @@ -562,7 +595,13 @@ func (fn *GoodSdf) RestrictionSize(int, RestT) float64 {
 	return 0
 }
 
-// TODO(BEAM-3301): Add ProcessElement impl. when restriction trackers are in.
+func (fn *GoodSdf) CreateTracker(RestT) *RTrackerT {
+	return &RTrackerT{}
+}
+
+func (fn *GoodSdf) ProcessElement(*RTrackerT, int) int {
 
 Review comment:
   What do you think of having ProcessElement actually just have an sdf.RTracker value? 
   Having it as the interface simplifies our wrapping approach for dynamic splitting, and
means the framework can do it all the time, for safety etc.
   
   CreateTracker would still need the actual implementation type, and check that it implements
sdf.RTracker of course.
   
   We can always extend things to allow a user to "unwrap" the interface if they need direct
access to their RTracker implementation for whatever reason.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message