aboutsummaryrefslogtreecommitdiff
path: root/core
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:51:30 -0700
commit2fedb5dddcc10d3186f49fc4996a7bb5b68bbc85 (patch)
tree578bae838a185be3541b4577c36e2d969ec36b8b /core
parent6390aae4eacbabfb1c53fb828b824f6a6518beff (diff)
downloadspark-2fedb5dddcc10d3186f49fc4996a7bb5b68bbc85.tar.gz
spark-2fedb5dddcc10d3186f49fc4996a7bb5b68bbc85.tar.bz2
spark-2fedb5dddcc10d3186f49fc4996a7bb5b68bbc85.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
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/util/Utils.scala3
1 files changed, 3 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 1d80012dc1..e5b83c069d 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -23,6 +23,8 @@ import java.nio.ByteBuffer
import java.util.{Properties, Locale, Random, UUID}
import java.util.concurrent.{ThreadFactory, ConcurrentHashMap, Executors, ThreadPoolExecutor}
+import org.eclipse.jetty.util.MultiException
+
import scala.collection.JavaConversions._
import scala.collection.Map
import scala.collection.mutable.ArrayBuffer
@@ -1470,6 +1472,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
}