[SPARK-19042] spark executor can't download the jars when uber jar's http url contains any query strings
If the uber jars' https contains any query strings, the Executor.updateDependencies method can't can't download the jars correctly. This is because the "localName = name.split("/").last" won't get the expected jar's url. The bug fix is the same as [SPARK-17855] Author: xiaojian.fxj <xiaojian.fxj@alibaba-inc.com> Closes #16509 from hustfxj/bug.
This commit is contained in:
parent
9112f31bb8
commit
c9d612f82c
|
@ -19,7 +19,7 @@ package org.apache.spark.executor
|
|||
|
||||
import java.io.{File, NotSerializableException}
|
||||
import java.lang.management.ManagementFactory
|
||||
import java.net.URL
|
||||
import java.net.{URI, URL}
|
||||
import java.nio.ByteBuffer
|
||||
import java.util.Properties
|
||||
import java.util.concurrent.{ConcurrentHashMap, TimeUnit}
|
||||
|
@ -640,7 +640,7 @@ private[spark] class Executor(
|
|||
currentFiles(name) = timestamp
|
||||
}
|
||||
for ((name, timestamp) <- newJars) {
|
||||
val localName = name.split("/").last
|
||||
val localName = new URI(name).getPath.split("/").last
|
||||
val currentTimeStamp = currentJars.get(name)
|
||||
.orElse(currentJars.get(localName))
|
||||
.getOrElse(-1L)
|
||||
|
|
Loading…
Reference in a new issue