spark-instrumented-optimizer/repl
Josh Rosen 7215aa7455 [SPARK-6209] Clean up connections in ExecutorClassLoader after failing to load classes (master branch PR)
ExecutorClassLoader does not ensure proper cleanup of network connections that it opens. If it fails to load a class, it may leak partially-consumed InputStreams that are connected to the REPL's HTTP class server, causing that server to exhaust its thread pool, which can cause the entire job to hang.  See [SPARK-6209](https://issues.apache.org/jira/browse/SPARK-6209) for more details, including a bug reproduction.

This patch fixes this issue by ensuring proper cleanup of these resources.  It also adds logging for unexpected error cases.

This PR is an extended version of #4935 and adds a regression test.

Author: Josh Rosen <joshrosen@databricks.com>

Closes #4944 from JoshRosen/executorclassloader-leak-master-branch and squashes the following commits:

e0e3c25 [Josh Rosen] Wrap try block around getReponseCode; re-enable keep-alive by closing error stream
961c284 [Josh Rosen] Roll back changes that were added to get the regression test to fail
7ee2261 [Josh Rosen] Add a failing regression test
e2d70a3 [Josh Rosen] Properly clean up after errors in ExecutorClassLoader
2015-03-24 14:38:20 -07:00
..
scala-2.10/src [SPARK-6299][CORE] ClassNotFoundException in standalone mode when running groupByKey with class defined in REPL 2015-03-16 23:49:23 -07:00
scala-2.11/src SPARK-6338 [CORE] Use standard temp dir mechanisms in tests to avoid orphaned temp files 2015-03-20 14:16:21 +00:00
src [SPARK-6209] Clean up connections in ExecutorClassLoader after failing to load classes (master branch PR) 2015-03-24 14:38:20 -07:00
pom.xml [SPARK-6209] Clean up connections in ExecutorClassLoader after failing to load classes (master branch PR) 2015-03-24 14:38:20 -07:00