Commit 2075bf8
committed
[SPARK-16182][CORE] Utils.scala -- terminateProcess() should call Process.destroyForcibly() if and only if Process.destroy() fails
## What changes were proposed in this pull request?
Utils.terminateProcess should `destroy()` first and only fall back to `destroyForcibly()` if it fails. It's kind of bad that we're force-killing executors -- and only in Java 8. See JIRA for an example of the impact: no shutdown
While here: `Utils.waitForProcess` should use the Java 8 method if available instead of a custom implementation.
## How was this patch tested?
Existing tests, which cover the force-kill case, and Amplab tests, which will cover both Java 7 and Java 8 eventually. However I tested locally on Java 8 and the PR builder will try Java 7 here.
Author: Sean Owen <sowen@cloudera.com>
Closes apache#13973 from srowen/SPARK-16182.1 parent fbfd0ab commit 2075bf8
2 files changed
Lines changed: 47 additions & 31 deletions
File tree
- core/src
- main/scala/org/apache/spark/util
- test/scala/org/apache/spark/util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1772 | 1772 | | |
1773 | 1773 | | |
1774 | 1774 | | |
1775 | | - | |
1776 | | - | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
1777 | 1778 | | |
1778 | 1779 | | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
1790 | | - | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
1791 | 1783 | | |
| 1784 | + | |
1792 | 1785 | | |
1793 | 1786 | | |
1794 | | - | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
1795 | 1801 | | |
1796 | 1802 | | |
1797 | 1803 | | |
1798 | 1804 | | |
1799 | 1805 | | |
1800 | | - | |
| 1806 | + | |
| 1807 | + | |
1801 | 1808 | | |
1802 | 1809 | | |
1803 | | - | |
1804 | | - | |
1805 | | - | |
1806 | | - | |
1807 | | - | |
1808 | | - | |
1809 | | - | |
1810 | | - | |
1811 | | - | |
1812 | | - | |
1813 | | - | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
1814 | 1831 | | |
1815 | | - | |
1816 | | - | |
| 1832 | + | |
| 1833 | + | |
1817 | 1834 | | |
1818 | | - | |
1819 | 1835 | | |
1820 | 1836 | | |
1821 | 1837 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | | - | |
| 866 | + | |
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| |||
0 commit comments