Skip to content

[SPARK-19909][SS] Batches will fail in case that temporary checkpoint dir is on local file system while metadata dir is on HDFS - #17248

Closed
sarutak wants to merge 1 commit into
apache:masterfrom
sarutak:SPARK-19909
Closed

[SPARK-19909][SS] Batches will fail in case that temporary checkpoint dir is on local file system while metadata dir is on HDFS#17248
sarutak wants to merge 1 commit into
apache:masterfrom
sarutak:SPARK-19909

Conversation

@sarutak

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

When we try to run Structured Streaming in local mode but use HDFS for the storage, batches will be fail because of error like as follows.

val handle = stream.writeStream.format("console").start()
17/03/09 16:54:45 ERROR StreamMetadata: Error writing stream metadata StreamMetadata(fc07a0b1-5423-483e-a59d-b2206a49491e) to /private/var/folders/4y/tmspvv353y59p3w4lknrf7cc0000gn/T/temporary-79d4fe05-4301-4b6d-a902-dff642d0ddca/metadata
org.apache.hadoop.security.AccessControlException: Permission denied: user=kou, access=WRITE, inode="/private/var/folders/4y/tmspvv353y59p3w4lknrf7cc0000gn/T/temporary-79d4fe05-4301-4b6d-a902-dff642d0ddca/metadata":hdfs:supergroup:drwxr-xr-x

It's because that a temporary checkpoint directory is created on local file system but metadata whose path is based on the checkpoint directory will be created on HDFS.

This PR will fixe this issue.

How was this patch tested?

I tested manually in local mode with HDFS.

@SparkQA

Copy link
Copy Markdown

Test build #74334 has finished for PR 17248 at commit cc7a3f8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgaido91

Copy link
Copy Markdown
Contributor

I don't think this PR resolve properly the issue. Indeed, it somewhat forces the metadata to be written in a local dir instead of the configured default filesystem.
Of course, this fixes the exception, but we loose all the benefits of a distributed file system, as fault tolerance.
Thus in my opinion, it would be better to let the metadata be written on the default file system, but changing the default location.

@HyukjinKwonHyukjinKwon mentioned this pull request Jun 25, 2017
@gatorsmile

Copy link
Copy Markdown
Member

We are closing it due to inactivity. please do reopen if you want to push it forward. Thanks!

@sarutak

Copy link
Copy Markdown
MemberAuthor

O.K. I'll close this PR. Thanks!

@sarutaksarutak closed this Jun 27, 2017
ghost pushed a commit to dbtsai/spark that referenced this pull request Jun 27, 2017
## What changes were proposed in this pull request?
This PR proposes to close stale PRs, mostly the same instances with apache#18017
I believe the author in apache#14807 removed his account.
Closesapache#7075Closesapache#8927Closesapache#9202Closesapache#9366Closesapache#10861Closesapache#11420Closesapache#12356Closesapache#13028Closesapache#13506Closesapache#14191Closesapache#14198Closesapache#14330Closesapache#14807Closesapache#15839Closesapache#16225Closesapache#16685Closesapache#16692Closesapache#16995Closesapache#17181Closesapache#17211Closesapache#17235Closesapache#17237Closesapache#17248Closesapache#17341Closesapache#17708Closesapache#17716Closesapache#17721Closesapache#17937
Added:
Closesapache#14739Closesapache#17139Closesapache#17445Closesapache#18042Closesapache#18359
Added:
Closesapache#16450Closesapache#16525Closesapache#17738
Added:
Closesapache#16458Closesapache#16508Closesapache#17714
Added:
Closesapache#17830Closesapache#14742
## How was this patch tested?
N/A
Author: hyukjinkwon <gurwls223@gmail.com>
Closesapache#18417 from HyukjinKwon/close-stale-pr.
@sarutak
sarutak deleted the SPARK-19909 branch June 4, 2021 20:45
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
## What changes were proposed in this pull request?
This PR proposes to close stale PRs, mostly the same instances with apache#18017
I believe the author in apache#14807 removed his account.
Closesapache#7075Closesapache#8927Closesapache#9202Closesapache#9366Closesapache#10861Closesapache#11420Closesapache#12356Closesapache#13028Closesapache#13506Closesapache#14191Closesapache#14198Closesapache#14330Closesapache#14807Closesapache#15839Closesapache#16225Closesapache#16685Closesapache#16692Closesapache#16995Closesapache#17181Closesapache#17211Closesapache#17235Closesapache#17237Closesapache#17248Closesapache#17341Closesapache#17708Closesapache#17716Closesapache#17721Closesapache#17937
Added:
Closesapache#14739Closesapache#17139Closesapache#17445Closesapache#18042Closesapache#18359
Added:
Closesapache#16450Closesapache#16525Closesapache#17738
Added:
Closesapache#16458Closesapache#16508Closesapache#17714
Added:
Closesapache#17830Closesapache#14742
## How was this patch tested?
N/A
Author: hyukjinkwon <gurwls223@gmail.com>
Closesapache#18417 from HyukjinKwon/close-stale-pr.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@sarutak@SparkQA@mgaido91@gatorsmile