aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorPatrick Wendell <pwendell@gmail.com>2013-07-02 16:28:40 -0700
committerPatrick Wendell <pwendell@gmail.com>2013-07-02 16:28:40 -0700
commit39e2325675e40c2231e26a7e693035f54039b1d5 (patch)
tree7839ad58e89d74ead4df340203669b985c79fbe5 /core
parent8ca1cc1786a376b227ba69872efbf8e26952b80d (diff)
downloadspark-39e2325675e40c2231e26a7e693035f54039b1d5.tar.gz
spark-39e2325675e40c2231e26a7e693035f54039b1d5.tar.bz2
spark-39e2325675e40c2231e26a7e693035f54039b1d5.zip
Removing dead code
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/spark/Utils.scala13
1 files changed, 0 insertions, 13 deletions
diff --git a/core/src/main/scala/spark/Utils.scala b/core/src/main/scala/spark/Utils.scala
index c1616de641..c5faf79ac3 100644
--- a/core/src/main/scala/spark/Utils.scala
+++ b/core/src/main/scala/spark/Utils.scala
@@ -589,19 +589,6 @@ private object Utils extends Logging {
"%s at %s:%s".format(callSiteInfo.lastSparkMethod, callSiteInfo.firstUserFile,
callSiteInfo.firstUserLine)
}
- /**
- * Try to find a free port to bind to on the local host. This should ideally never be needed,
- * except that, unfortunately, some of the networking libraries we currently rely on (e.g. Spray)
- * don't let users bind to port 0 and then figure out which free port they actually bound to.
- * We work around this by binding a ServerSocket and immediately unbinding it. This is *not*
- * necessarily guaranteed to work, but it's the best we can do.
- */
- def findFreePort(): Int = {
- val socket = new ServerSocket(0)
- val portBound = socket.getLocalPort
- socket.close()
- portBound
- }
/** Return a string containing the last `n` bytes of a file. */
def lastNBytes(path: String, n: Int): String = {