goutamadwant opened a new pull request, #40983: URL: https://github.com/apache/beam/pull/40983
Addresses #39176. ## Summary - Add optional `SeekableOpener` and `ReaderAtCloser` support for local, memfs, GCS and S3 without changing `OpenRead`. - Add `FileMetadata.ReadSeekEfficient` and `ReadableFile.OpenSeekable`, keeping the filesystem alive until the reader closes. Unsupported files return `ErrNotSeekable` so callers can use the existing buffered fallback. - Pin GCS range reads to an object generation and guard S3 reads with the initial ETag. Reject unsupported gzip content encoding and handle cancellation, EOF and response cleanup. Parquet reader integration is a separate follow-up. ## Before and after - Before: memfs did not expose positional reads, and cloud filesystem reads opened sequential streams. - After: callers can read footer bytes by offset. The GCS fixture fetches only the requested six footer bytes, and S3 tests check bounded ranges and reject reads after an object changes. ## Testing From `sdks`: ```sh go test -race -p 4 -count=1 -timeout=8m ./go/pkg/beam/io/filesystem/... ./go/pkg/beam/io/fileio go test -p 4 -count=1 -timeout=8m ./go/pkg/beam/io/... go vet -p 4 ./go/pkg/beam/io/filesystem/... ./go/pkg/beam/io/fileio ``` All passed: seven packages under the race detector and 23 packages in the broader I/O suite. Formatting and `git diff --check` also pass. Coverage includes concurrent reads, partial reads and EOF, cancellation and close ordering, object changes, compression rejection, failed-open cleanup and metadata coder round trips. Cloud tests use fake services and local HTTP fixtures; live cloud integration and the full SDK suite were not run. -- 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]
