apache/spark — pull request #3845 by YanTangZhai (2014-12-30 13:43:24+00:00)
Title: [SPARK-5007] [CORE] Try random port when startServiceOnPort to reduce the chance of port collision

When multiple Spark programs are submitted at the same node (called springboard machine). The ports (default 4040) of these SparkUIs are from 4040 to 4056. Then the Spark programs submitted later would fail because of SparkUI port collision.
The chance of port collision could be reduced by setting spark.ui.port or spark.port.maxRetries.
However, I think it's better to try random port when startServiceOnPort to reduce the chance of port collision.