aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorscwf <wangfei1@huawei.com>2014-10-01 11:51:30 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-10-01 11:53:35 -0700
commitb4f690d36d81dc60e00dd997d5edbc1e2bb72b79 (patch)
treea146376e3c54ae0468e3ef35c6dde8518b8da804 /core/src/main
parent13f33cfffe9e930ede8ec13a1b53776ef77d4813 (diff)
downloadspark-b4f690d36d81dc60e00dd997d5edbc1e2bb72b79.tar.gz
spark-b4f690d36d81dc60e00dd997d5edbc1e2bb72b79.tar.bz2
spark-b4f690d36d81dc60e00dd997d5edbc1e2bb72b79.zip
[SPARK-3756] [Core]check exception is caused by an address-port collision properly
Jetty server use MultiException to handle exceptions when start server refer https://github.com/eclipse/jetty.project/blob/jetty-8.1.14.v20131031/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java So in ```isBindCollision``` add the logical to cover MultiException Author: scwf <wangfei1@huawei.com> Closes #2611 from scwf/fix-isBindCollision and squashes the following commits: 984cb12 [scwf] optimize the fix 3a6c849 [scwf] fix bug in isBindCollision (cherry picked from commit 2fedb5dddcc10d3186f49fc4996a7bb5b68bbc85) Signed-off-by: Patrick Wendell <pwendell@gmail.com> Conflicts: core/src/main/scala/org/apache/spark/util/Utils.scala
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/scala/org/apache/spark/util/Utils.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala
index 700083e8ea..285bce005d 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -37,6 +37,7 @@ import com.google.common.io.Files
import com.google.common.util.concurrent.ThreadFactoryBuilder
import org.apache.commons.lang3.SystemUtils
import org.apache.hadoop.fs.{FileSystem, FileUtil, Path}
+import org.eclipse.jetty.util.MultiException
import org.json4s._
import tachyon.client.{TachyonFile,TachyonFS}
@@ -1490,6 +1491,7 @@ private[spark] object Utils extends Logging {
return true
}
isBindCollision(e.getCause)
+ case e: MultiException => e.getThrowables.exists(isBindCollision)
case e: Exception => isBindCollision(e.getCause)
case _ => false
}