Skip to content
Snippets Groups Projects
Commit 6ed71390 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

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

Remove unused addIfNoPort.
parents 41d230cc 4fe1fbdd
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment