lostluck commented on a change in pull request #16428:
URL: https://github.com/apache/beam/pull/16428#discussion_r779068445
##########
File path: sdks/go/pkg/beam/io/filesystem/gcs/gcs.go
##########
@@ -139,3 +139,40 @@ func (f *fs) Size(ctx context.Context, filename string)
(int64, error) {
return attrs.Size, nil
}
+
+// Remove the named file from the filesystem.
+func (f *fs) Remove(ctx context.Context, filename string) error {
Review comment:
Each of the file systems is only expected to receive and handle it's own
set of paths. Anything else is wrong by construction. Results are undefined.
Essentially, we don't currently provide a helper for a "cross filesystem
move", which would notionally be something that happens at the file system
package level (eg, instead of the utility methods taking in a
filesystem.Interface they just take in the paths and the filesystem package
looks up the file systems.) However, for testing purposes it's much better for
them to be passed in for now.
Ideally, some kind of abstraction layer would exist *outside* of beam, and
we could import and inherit from that instead that (eg. https://gocloud.dev/ )
but we haven't hit a point where that's strictly necessary right now.
--
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]