Skip to content

Commit 6e101f1

Browse files
srowenmateiz
authored andcommitted
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
1 parent 45ad7f0 commit 6e101f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ trait ClientBase extends Logging {
5959
private val distCacheMgr = new ClientDistributedCacheManager()
6060

6161
// Staging directory is private! -> rwx--------
62-
val STAGING_DIR_PERMISSION: FsPermission = FsPermission.createImmutable(0700: Short)
62+
val STAGING_DIR_PERMISSION: FsPermission =
63+
FsPermission.createImmutable(Integer.parseInt("700", 8): Short)
6364
// App files are world-wide readable and owner writable -> rw-r--r--
64-
val APP_FILE_PERMISSION: FsPermission = FsPermission.createImmutable(0644: Short)
65+
val APP_FILE_PERMISSION: FsPermission =
66+
FsPermission.createImmutable(Integer.parseInt("644", 8): Short)
6567

6668
// TODO(harvey): This could just go in ClientArguments.
6769
def validateArgs() = {

0 commit comments

Comments
 (0)