Merge pull request #717 from viirya/dev1
Do not copy local jars given to SparkContext in yarn mode
This commit is contained in:
commit
413b84172e
|
@ -41,4 +41,7 @@ object SparkHadoopUtil {
|
|||
|
||||
// add any user credentials to the job conf which are necessary for running on a secure Hadoop cluster
|
||||
def addCredentials(conf: JobConf) {}
|
||||
|
||||
def isYarnMode(): Boolean = { false }
|
||||
|
||||
}
|
||||
|
|
|
@ -41,4 +41,7 @@ object SparkHadoopUtil {
|
|||
|
||||
// add any user credentials to the job conf which are necessary for running on a secure Hadoop cluster
|
||||
def addCredentials(conf: JobConf) {}
|
||||
|
||||
def isYarnMode(): Boolean = { false }
|
||||
|
||||
}
|
||||
|
|
|
@ -577,7 +577,12 @@ class SparkContext(
|
|||
} else {
|
||||
val uri = new URI(path)
|
||||
val key = uri.getScheme match {
|
||||
case null | "file" => env.httpFileServer.addJar(new File(uri.getPath))
|
||||
case null | "file" =>
|
||||
if (SparkHadoopUtil.isYarnMode()) {
|
||||
logWarning("local jar specified as parameter to addJar under Yarn mode")
|
||||
return
|
||||
}
|
||||
env.httpFileServer.addJar(new File(uri.getPath))
|
||||
case _ => path
|
||||
}
|
||||
addedJars(key) = System.currentTimeMillis
|
||||
|
|
|
@ -190,8 +190,8 @@ object SparkBuild extends Build {
|
|||
)
|
||||
} else {
|
||||
Seq(
|
||||
"org.apache.hadoop" % "hadoop-core" % HADOOP_VERSION excludeAll(excludeJackson, excludeNetty),
|
||||
"org.apache.hadoop" % "hadoop-client" % HADOOP_VERSION excludeAll(excludeJackson, excludeNetty)
|
||||
"org.apache.hadoop" % "hadoop-core" % HADOOP_VERSION excludeAll(excludeJackson, excludeNetty, excludeAsm),
|
||||
"org.apache.hadoop" % "hadoop-client" % HADOOP_VERSION excludeAll(excludeJackson, excludeNetty, excludeAsm)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue