aboutsummaryrefslogtreecommitdiff
path: root/yarn/src/test
diff options
context:
space:
mode:
authorLianhui Wang <lianhuiwang09@gmail.com>2016-04-19 19:48:03 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2016-04-19 19:48:03 -0700
commit4514aebd1e807a665c270bfdc3f1127b3a1da898 (patch)
treea12c92c3b577cf671694f50f47093dfab95401c1 /yarn/src/test
parent3ae25f244bd471ef77002c703f2cc7ed6b524f11 (diff)
downloadspark-4514aebd1e807a665c270bfdc3f1127b3a1da898.tar.gz
spark-4514aebd1e807a665c270bfdc3f1127b3a1da898.tar.bz2
spark-4514aebd1e807a665c270bfdc3f1127b3a1da898.zip
[SPARK-14705][YARN] support Multiple FileSystem for YARN STAGING DIR
## What changes were proposed in this pull request? In SPARK-13063, It makes the SPARK YARN STAGING DIR as configurable. But it only support default FileSystem. If there are many clusters, It can be different FileSystem for different cluster in our spark. ## How was this patch tested? I have tested it successfully with following commands: MASTER=yarn-client ./bin/spark-shell --conf spark.yarn.stagingDir=hdfs:namenode2/temp $SPARK_HOME/bin/spark-submit --conf spark.yarn.stagingDir=hdfs:namenode2/temp cc tgravescs vanzin andrewor14 Author: Lianhui Wang <lianhuiwang09@gmail.com> Closes #12473 from lianhuiwang/SPARK-14705.
Diffstat (limited to 'yarn/src/test')
-rw-r--r--yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala b/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala
index 23050e8c1d..06efd44b5d 100644
--- a/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala
+++ b/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala
@@ -147,7 +147,7 @@ class ClientSuite extends SparkFunSuite with Matchers with BeforeAndAfterAll
val tempDir = Utils.createTempDir()
try {
- client.prepareLocalResources(tempDir.getAbsolutePath(), Nil)
+ client.prepareLocalResources(new Path(tempDir.getAbsolutePath()), Nil)
sparkConf.get(APP_JAR) should be (Some(USER))
// The non-local path should be propagated by name only, since it will end up in the app's
@@ -238,7 +238,7 @@ class ClientSuite extends SparkFunSuite with Matchers with BeforeAndAfterAll
val client = createClient(sparkConf)
val tempDir = Utils.createTempDir()
- client.prepareLocalResources(tempDir.getAbsolutePath(), Nil)
+ client.prepareLocalResources(new Path(tempDir.getAbsolutePath()), Nil)
assert(sparkConf.get(SPARK_JARS) ===
Some(Seq(s"local:${jar4.getPath()}", s"local:${single.getAbsolutePath()}/*")))
@@ -260,14 +260,14 @@ class ClientSuite extends SparkFunSuite with Matchers with BeforeAndAfterAll
val sparkConf = new SparkConf().set(SPARK_ARCHIVE, archive.getPath())
val client = createClient(sparkConf)
- client.prepareLocalResources(temp.getAbsolutePath(), Nil)
+ client.prepareLocalResources(new Path(temp.getAbsolutePath()), Nil)
verify(client).copyFileToRemote(any(classOf[Path]), meq(new Path(archive.toURI())), anyShort())
classpath(client) should contain (buildPath(PWD, LOCALIZED_LIB_DIR, "*"))
sparkConf.set(SPARK_ARCHIVE, LOCAL_SCHEME + ":" + archive.getPath())
intercept[IllegalArgumentException] {
- client.prepareLocalResources(temp.getAbsolutePath(), Nil)
+ client.prepareLocalResources(new Path(temp.getAbsolutePath()), Nil)
}
}
@@ -280,7 +280,7 @@ class ClientSuite extends SparkFunSuite with Matchers with BeforeAndAfterAll
val sparkConf = new SparkConfWithEnv(Map("SPARK_HOME" -> temp.getAbsolutePath()))
val client = createClient(sparkConf)
- client.prepareLocalResources(temp.getAbsolutePath(), Nil)
+ client.prepareLocalResources(new Path(temp.getAbsolutePath()), Nil)
verify(client).copyFileToRemote(any(classOf[Path]), meq(new Path(jar.toURI())), anyShort())
classpath(client) should contain (buildPath(PWD, LOCALIZED_LIB_DIR, "*"))
}
@@ -308,7 +308,7 @@ class ClientSuite extends SparkFunSuite with Matchers with BeforeAndAfterAll
val client = createClient(sparkConf)
val tempDir = Utils.createTempDir()
- client.prepareLocalResources(tempDir.getAbsolutePath(), Nil)
+ client.prepareLocalResources(new Path(tempDir.getAbsolutePath()), Nil)
// Only jar2 will be added to SECONDARY_JARS, jar3 which has the same name with jar1 will be
// ignored.