Skip to content

[SPARK-20894][SS] Resolve the checkpoint location in driver and use the resolved path in state store (branch-2.2)#18179

Closed
zsxwing wants to merge 1 commit intoapache:branch-2.2from
zsxwing:SPARK-20894-2.2
Closed

[SPARK-20894][SS] Resolve the checkpoint location in driver and use the resolved path in state store (branch-2.2)#18179
zsxwing wants to merge 1 commit intoapache:branch-2.2from
zsxwing:SPARK-20894-2.2

Conversation

@zsxwing
Copy link
Copy Markdown
Member

@zsxwing zsxwing commented Jun 1, 2017

What changes were proposed in this pull request?

Backport #18149 to 2.2.

How was this patch tested?

Jenkins.

…he resolved path in state store

When the user runs a Structured Streaming query in a cluster, if the driver uses the local file system, StateStore running in executors will throw a file-not-found exception. However, the current error is not obvious.

This PR makes StreamExecution resolve the path in driver and uses the full path including the scheme part (such as `hdfs:/`, `file:/`) in StateStore.

Then if the above error happens, StateStore will throw an error with this full path which starts with `file:/`, and it makes this error obvious: the checkpoint location is on the local file system.

One potential minor issue is that the user cannot use different default file system settings in driver and executors (e.g., use a public HDFS address in driver and a private HDFS address in executors) after this change. However, since the batch query also has this issue (See https://github.com/apache/spark/blob/4bb6a53ebd06de3de97139a2dbc7c85fc3aa3e66/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L402), it doesn't make things worse.

The new added test.

Author: Shixiong Zhu <shixiong@databricks.com>

Closes apache#18149 from zsxwing/SPARK-20894.
query.stop()
}

test("should resolve the checkpoint path") {
Copy link
Copy Markdown
Member Author

@zsxwing zsxwing Jun 1, 2017

Choose a reason for hiding this comment

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

Just this test file has conflicts with 2.2.

@zsxwing
Copy link
Copy Markdown
Member Author

zsxwing commented Jun 1, 2017

cc @tdas

@SparkQA
Copy link
Copy Markdown

SparkQA commented Jun 2, 2017

Test build #77660 has finished for PR 18179 at commit a611c47.

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

@markgrover
Copy link
Copy Markdown
Member

Doesn't look like this made to 2.2. Should we mark the JIRA resolved with 2.3 as the target version. I am assuming it's too late for this to go to 2.2.0. May be retarget this for 2.2.1?

@zsxwing
Copy link
Copy Markdown
Member Author

zsxwing commented Aug 8, 2017

@markgrover I'm going to close this one. This is just an improvement and not need to go into 2.2.1.

@zsxwing zsxwing closed this Aug 8, 2017
@markgrover
Copy link
Copy Markdown
Member

Sounds good to me. The JIRA was unresolved. I have resolved it with a fix version of 2.3.0

@zsxwing zsxwing deleted the SPARK-20894-2.2 branch February 6, 2019 22:43
Sign up for free to 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.

3 participants