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

[SPARK-50854][SS] Make path fully qualified before passing it to FileStreamSink #49654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vrozov
Copy link
Member

@vrozov vrozov commented Jan 24, 2025

What changes were proposed in this pull request?

  1. Ensure that if relative path is used in DataStreamWriter, the path resolution is done on the Spark Driver and is not deferred to Spark Executor.
  2. Construct fully qualified path in DataSource similar to how it is done for DataFrameWriter before it is passed to FileStreamSink.
  3. Add a check to FileStreamSink that asserts that path is an absolute path.

https://lists.apache.org/thread/ffzwn1y2fgyjw0j09cv4np9z00wymxwv

Why are the changes needed?

To properly support relative paths in structured streaming. The use case mostly applies to single node local Spark cluster.

Does this PR introduce any user-facing change?

The change is only applicable to the use case when relative path is used in DataStreamWriter, resulting in data being output to correct directory. No changes are expected for absolute path (the most common production case).

How was this patch tested?

Added new test case to FileStreamSinkSuite.

Was this patch authored or co-authored using generative AI tooling?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant