Merge pull request #626 from stephenh/remove-add-if-no-port

Remove unused addIfNoPort.
This commit is contained in:
Matei Zaharia 2013-05-29 10:14:22 -07:00
commit 6ed71390d9

View file

@ -403,17 +403,6 @@ private object Utils extends Logging {
hostPortParseResults.get(hostPort)
}
def addIfNoPort(hostPort: String, port: Int): String = {
if (port <= 0) throw new IllegalArgumentException("Invalid port specified " + port)
// This is potentially broken - when dealing with ipv6 addresses for example, sigh ... but then hadoop does not support ipv6 right now.
// For now, we assume that if port exists, then it is valid - not check if it is an int > 0
val indx: Int = hostPort.lastIndexOf(':')
if (-1 != indx) return hostPort
hostPort + ":" + port
}
private[spark] val daemonThreadFactory: ThreadFactory =
new ThreadFactoryBuilder().setDaemon(true).build()