Skip to content

Commit 49ac38c

Browse files
author
Devaraj K
committed
Addressed the review comment
1 parent 42848ad commit 49ac38c

File tree

1 file changed

+2
-6
lines changed
  • yarn/src/main/scala/org/apache/spark/deploy/yarn

1 file changed

+2
-6
lines changed

yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,12 +1452,8 @@ object Client extends Logging {
14521452
conf: SparkConf,
14531453
fs: FileSystem,
14541454
appStagingDir: String): Path = {
1455-
val stagingRootDir = conf.get(STAGING_DIR).orNull
1456-
if (stagingRootDir != null) {
1457-
new Path(stagingRootDir, appStagingDir)
1458-
} else {
1459-
new Path(fs.getHomeDirectory, appStagingDir)
1460-
}
1455+
val baseDir = conf.get(STAGING_DIR).map { new Path(_) }.getOrElse(fs.getHomeDirectory())
1456+
new Path(baseDir, appStagingDir)
14611457
}
14621458

14631459
}

0 commit comments

Comments
 (0)