GitHub user zsxwing opened a pull request:

    https://github.com/apache/spark/pull/17044

    [SPARK-19718][SS]Handle more interrupt cases properly for Hadoop

    ## What changes were proposed in this pull request?
    
    [SPARK-19617](https://issues.apache.org/jira/browse/SPARK-19617) changed 
`HDFSMetadataLog` to enable interrupts when using the local file system. 
However, now we hit 
[HADOOP-12074](https://issues.apache.org/jira/browse/HADOOP-12074): 
`Shell.runCommand` converts `InterruptedException` to `new 
IOException(ie.toString())` before Hadoop 2.8. This is the Hadoop patch to fix 
HADOOP-1207: 
https://github.com/apache/hadoop/commit/95c73d49b1bb459b626a9ac52acadb8f5fa724de
    
    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zsxwing/spark SPARK-19718

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/17044.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #17044
    
----
commit 071a1e94823a3dca0f3ef77c25dc2501ddc4921e
Author: Shixiong Zhu <[email protected]>
Date:   2017-02-23T22:14:12Z

    Handle more interrupt cases properly for Hadoop

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to