[
https://issues.apache.org/jira/browse/BEAM-14489?focusedWorklogId=773802&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-773802
]
ASF GitHub Bot logged work on BEAM-14489:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/May/22 23:06
Start Date: 23/May/22 23:06
Worklog Time Spent: 10m
Work Description: lostluck commented on code in PR #17712:
URL: https://github.com/apache/beam/pull/17712#discussion_r879919826
##########
sdks/go/pkg/beam/io/textio/sdf.go:
##########
@@ -37,17 +37,21 @@ func init() {
// ReadSdf is a variation of Read implemented via SplittableDoFn. This should
// result in increased performance with runners that support splitting.
+//
+// Deprecated: Called directly by Read, use that instead.
func ReadSdf(s beam.Scope, glob string) beam.PCollection {
- s = s.Scope("textio.ReadSdf")
+ s = s.Scope("textio.Read")
filesystem.ValidateScheme(glob)
return readSdf(s, beam.Create(s, glob))
}
// ReadAllSdf is a variation of ReadAll implemented via SplittableDoFn. This
// should result in increased performance with runners that support splitting.
+//
+// Deprecated: Called directly by ReadAll, use that instead.
func ReadAllSdf(s beam.Scope, col beam.PCollection) beam.PCollection {
- s = s.Scope("textio.ReadAllSdf")
+ s = s.Scope("textio.ReadAll")
Review Comment:
Agreed. Great call! Moved and ensured placement was reasonable, and dropped
vestigial SDFs that were no longer necessary (though added documentation that
they are SDFs and that they're useful for splitting within files.)
##########
sdks/go/pkg/beam/io/textio/sdf.go:
##########
@@ -37,17 +37,21 @@ func init() {
// ReadSdf is a variation of Read implemented via SplittableDoFn. This should
// result in increased performance with runners that support splitting.
+//
+// Deprecated: Called directly by Read, use that instead.
func ReadSdf(s beam.Scope, glob string) beam.PCollection {
- s = s.Scope("textio.ReadSdf")
+ s = s.Scope("textio.Read")
Review Comment:
Agreed it could be confusing, or breaking, so changed it to maintain scopes.
Issue Time Tracking
-------------------
Worklog Id: (was: 773802)
Time Spent: 1h (was: 50m)
> Make all TextIO SDF.
> --------------------
>
> Key: BEAM-14489
> URL: https://issues.apache.org/jira/browse/BEAM-14489
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Robert Burke
> Assignee: Robert Burke
> Priority: P2
> Time Spent: 1h
> Remaining Estimate: 0h
>
> We currently have two kinds of textio.Read an SDF version and a Non SDF
> version. They should be unified (removing the non-SDF one) to avoid confusing
> users.
> Since there are likely a number of various packages using one or the other,
> we will point others to the existing Read calls but mark the SDF ones as
> deprecated. They will not be removed, as that's the Go way.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)