aboutsummaryrefslogtreecommitdiff
path: root/yarn/common
diff options
context:
space:
mode:
authorSean Owen <sowen@cloudera.com>2014-04-24 23:34:00 -0700
committerMatei Zaharia <matei@databricks.com>2014-04-24 23:34:00 -0700
commit6e101f1183f92769779bc8ac14813c063bf1ff3f (patch)
treecd4dbbe7142fcf690672bc4ec8b25c707eeeee2b /yarn/common
parent45ad7f0ca7be4a89c066b246b0fee0c0c2e7c759 (diff)
downloadspark-6e101f1183f92769779bc8ac14813c063bf1ff3f.tar.gz
spark-6e101f1183f92769779bc8ac14813c063bf1ff3f.tar.bz2
spark-6e101f1183f92769779bc8ac14813c063bf1ff3f.zip
SPARK-1607. Replace octal literals, removed in Scala 2.11, with hex literals
Octal literals like "0700" are deprecated in Scala 2.10, generating a warning. They have been removed entirely in 2.11. See https://issues.scala-lang.org/browse/SI-7618 This change simply replaces two uses of octals with hex literals, which seemed the next-best representation since they express a bit mask (file permission in particular) Author: Sean Owen <sowen@cloudera.com> Closes #529 from srowen/SPARK-1607 and squashes the following commits: 1ee0e67 [Sean Owen] Use Integer.parseInt(...,8) for octal literal instead of hex equivalent 0102f3d [Sean Owen] Replace octal literals, removed in Scala 2.11, with hex literals
Diffstat (limited to 'yarn/common')
-rw-r--r--yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
index b403292d9c..eb95d78431 100644
--- a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
+++ b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
@@ -59,9 +59,11 @@ trait ClientBase extends Logging {
private val distCacheMgr = new ClientDistributedCacheManager()
// Staging directory is private! -> rwx--------
- val STAGING_DIR_PERMISSION: FsPermission = FsPermission.createImmutable(0700: Short)
+ val STAGING_DIR_PERMISSION: FsPermission =
+ FsPermission.createImmutable(Integer.parseInt("700", 8): Short)
// App files are world-wide readable and owner writable -> rw-r--r--
- val APP_FILE_PERMISSION: FsPermission = FsPermission.createImmutable(0644: Short)
+ val APP_FILE_PERMISSION: FsPermission =
+ FsPermission.createImmutable(Integer.parseInt("644", 8): Short)
// TODO(harvey): This could just go in ClientArguments.
def validateArgs() = {