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

Merge pull request #717 from viirya/dev1

Do not copy local jars given to SparkContext in yarn mode
parents 0d0a47cb d1738d72
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
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