Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Feb 23, 2017

What changes were proposed in this pull request?

SPARK-19617 changed HDFSMetadataLog to enable interrupts when using the local file system. However, now we hit HADOOP-12074: Shell.runCommand converts InterruptedException to new IOException(ie.toString()) before Hadoop 2.8. This is the Hadoop patch to fix HADOOP-1207: apache/hadoop@95c73d4

This PR adds new logic to handle the following cases related to InterruptedException.

  • Check if the message of IOException starts with java.lang.InterruptedException. If so, treat it as InterruptedException. This is for pre-Hadoop 2.8.
  • Treat InterruptedIOException as InterruptedException. This is for Hadoop 2.8+ and other places that may throw InterruptedIOException when the thread is interrupted.

How was this patch tested?

The new unit test.


/** States for [[StreamExecution]]'s lifecycle. */
trait State
case object INITIALIZING extends State
Copy link
Member Author

Choose a reason for hiding this comment

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

move them out to avoid holding the StreamExecution lock when initializing them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense. I'd consider putting this stuff at the top if not in its own file. Otherwise its kind of an awkward forward reference.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved

@SparkQA
Copy link

SparkQA commented Feb 24, 2017

Test build #73369 has finished for PR 17044 at commit 071a1e9.

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

@vanzin
Copy link
Contributor

vanzin commented Mar 2, 2017

@zsxwing I'm not the right person to review this, but can we get the ball rolling on this fix? This test is really flaky and constantly causes PR builders to fail.

@zsxwing
Copy link
Member Author

zsxwing commented Mar 3, 2017

@tdas could you take a look?

@marmbrus
Copy link
Contributor

marmbrus commented Mar 3, 2017

LGTM

@SparkQA
Copy link

SparkQA commented Mar 4, 2017

Test build #73869 has finished for PR 17044 at commit 0535f4f.

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

@zsxwing
Copy link
Member Author

zsxwing commented Mar 4, 2017

Thanks. Merging to master.

@asfgit asfgit closed this in a6a7a95 Mar 4, 2017
@zsxwing zsxwing deleted the SPARK-19718 branch March 4, 2017 02:33
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.

4 participants