Skip to content

Commit c6a5590

Browse files
author
Christophe Préaud
committed
Revert commit 8ea871f
1 parent 7456a33 commit c6a5590

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ private[spark] object Utils extends Logging {
356356
def fetchFile(url: String, targetDir: File, conf: SparkConf, securityMgr: SecurityManager,
357357
hadoopConf: Configuration) {
358358
val filename = url.split("/").last
359-
val tempFile = File.createTempFile("fetchFileTemp", null, new File(targetDir.getAbsolutePath))
359+
val tempDir = getLocalDir(conf)
360+
val tempFile = File.createTempFile("fetchFileTemp", null, new File(tempDir))
360361
val targetFile = new File(targetDir, filename)
361362
val uri = new URI(url)
362363
val fileOverwrite = conf.getBoolean("spark.files.overwrite", defaultValue = false)

0 commit comments

Comments
 (0)