Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to use registerFileSystemsOnce for SerializablePipelineOptions constructor #34028

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ public class SerializablePipelineOptions implements Serializable {
public SerializablePipelineOptions(PipelineOptions options) {
this.serializedPipelineOptions = serializeToJson(options);
this.options = options;
FileSystems.setDefaultPipelineOptions(options);
FileSystems.registerFileSystemsOnce(options);
}

public SerializablePipelineOptions(String json) {
this.serializedPipelineOptions = json;
this.options = deserializeFromJson(json);
FileSystems.setDefaultPipelineOptions(options);
FileSystems.registerFileSystemsOnce(options);
}

public PipelineOptions get() {
Expand All @@ -59,7 +59,6 @@ public PipelineOptions get() {
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {
is.defaultReadObject();
this.options = deserializeFromJson(serializedPipelineOptions);
// TODO https://github.com/apache/beam/issues/18430: remove this call.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this no longer relevant? This still seems dicy (unconditionally overwriting the options as a side effect of deserialization).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored TODO statement here for now

FileSystems.setDefaultPipelineOptions(options);
}

Expand Down
Loading