aboutsummaryrefslogtreecommitdiff
path: root/yarn
diff options
context:
space:
mode:
authorY.CORP.YAHOO.COM\tgraves <tgraves@thatenemy-lm.champ.corp.yahoo.com>2013-08-26 13:57:01 -0500
committerY.CORP.YAHOO.COM\tgraves <tgraves@thatenemy-lm.champ.corp.yahoo.com>2013-08-26 13:57:01 -0500
commitdfb4c697bcfcbbe7e0959894244e71f38edd79f9 (patch)
tree7f521131d77d31f66bb41b86929ad934a09e9c9b /yarn
parentc0b4095ee8b5363d157094ff11bab2c47e77dbf4 (diff)
downloadspark-dfb4c697bcfcbbe7e0959894244e71f38edd79f9.tar.gz
spark-dfb4c697bcfcbbe7e0959894244e71f38edd79f9.tar.bz2
spark-dfb4c697bcfcbbe7e0959894244e71f38edd79f9.zip
Throw exception if the yarn local dirs isn't set
Diffstat (limited to 'yarn')
-rw-r--r--yarn/src/main/scala/spark/deploy/yarn/ApplicationMaster.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/yarn/src/main/scala/spark/deploy/yarn/ApplicationMaster.scala b/yarn/src/main/scala/spark/deploy/yarn/ApplicationMaster.scala
index cda3c21c58..33e6293a6b 100644
--- a/yarn/src/main/scala/spark/deploy/yarn/ApplicationMaster.scala
+++ b/yarn/src/main/scala/spark/deploy/yarn/ApplicationMaster.scala
@@ -102,7 +102,11 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration) e
val yarnLocalSysDirs = Option(System.getenv("YARN_LOCAL_DIRS"))
yarnLocalSysDirs match {
case Some(s) => localDirs = s
- case None => if (localDirs == null) localDirs = ""
+ case None => {
+ if ((localDirs == null) || (localDirs.isEmpty())) {
+ throw new Exception("Yarn Local dirs can't be empty")
+ }
+ }
}
return localDirs
}