We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42848ad commit 49ac38cCopy full SHA for 49ac38c
yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
@@ -1452,12 +1452,8 @@ object Client extends Logging {
1452
conf: SparkConf,
1453
fs: FileSystem,
1454
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
- }
+ val baseDir = conf.get(STAGING_DIR).map { new Path(_) }.getOrElse(fs.getHomeDirectory())
+ new Path(baseDir, appStagingDir)
1461
}
1462
1463
0 commit comments