Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Feb 18, 2017

What changes were proposed in this pull request?

Backport #16947 to branch 2.1. Note: we still need to support old Hadoop versions in 2.1.*.

How was this patch tested?

Jenkins

Copy link
Member Author

Choose a reason for hiding this comment

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

This file is almost same as #16947 except this comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also run mkdirs into runUninterruptiblyIfLocal because it calls Shell.runCommand.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed the comment. I added it in 88c43f4 but it was wrong. We don't need to use runUninterruptibly to workaround HADOOP-14084. The root cause is HADOOP-10622.

@SparkQA
Copy link

SparkQA commented Feb 18, 2017

Test build #73091 has finished for PR 16979 at commit 7a0b199.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Feb 18, 2017

Test build #73101 has started for PR 16979 at commit 1d776c3.

@zsxwing
Copy link
Member Author

zsxwing commented Feb 18, 2017

retest this please

@SparkQA
Copy link

SparkQA commented Feb 19, 2017

Test build #73117 has finished for PR 16979 at commit 1d776c3.

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

}

private def runUninterruptiblyIfLocal[T](body: => T): T = {
if (fileManager.isLocalFileSystem && Thread.currentThread.isInstanceOf[UninterruptibleThread]) {
Copy link
Member Author

@zsxwing zsxwing Feb 21, 2017

Choose a reason for hiding this comment

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

Have to change the condition here because StreamExecution will create a HDFSMetadata in a non UninterruptibleThread. (mkdirs)

Copy link
Contributor

Choose a reason for hiding this comment

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

So we are changing this to a best-effort attempt, rather than the try-and-explicitly-fail attempt, in the case of a local file system... right?


private def runUninterruptiblyIfLocal[T](body: => T): T = {
if (fileManager.isLocalFileSystem && Thread.currentThread.isInstanceOf[UninterruptibleThread]) {
// When using a local file system, some file system APIs like "create" or "mkdirs" must be
Copy link
Member Author

Choose a reason for hiding this comment

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

I fixed the comments to point to the root cause: HADOOP-10622.

@tdas
Copy link
Contributor

tdas commented Feb 22, 2017

LGTM.

@zsxwing
Copy link
Member Author

zsxwing commented Feb 22, 2017

Thanks. Merging to 2.1.

asfgit pushed a commit that referenced this pull request Feb 22, 2017
… query quickly (branch-2.1)

## What changes were proposed in this pull request?

Backport #16947 to branch 2.1. Note: we still need to support old Hadoop versions in 2.1.*.

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <shixiong@databricks.com>

Closes #16979 from zsxwing/SPARK-19617-branch-2.1.
@zsxwing zsxwing closed this Feb 22, 2017
@zsxwing zsxwing deleted the SPARK-19617-branch-2.1 branch February 22, 2017 04:16
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