Repository: spark
Updated Branches:
  refs/heads/branch-1.0 3eba9bd2f -> 7493ca947


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 <[email protected]>

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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7493ca94
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7493ca94
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7493ca94

Branch: refs/heads/branch-1.0
Commit: 7493ca947a1198ffe0824766d7d51f9e44795c15
Parents: 3eba9bd
Author: Sean Owen <[email protected]>
Authored: Thu Apr 24 23:34:00 2014 -0700
Committer: Matei Zaharia <[email protected]>
Committed: Thu Apr 24 23:35:21 2014 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/deploy/yarn/ClientBase.scala   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/7493ca94/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
----------------------------------------------------------------------
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 b403292..eb95d78 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() = {

Reply via email to