Github user gaborgsomogyi commented on a diff in the pull request:
https://github.com/apache/spark/pull/23092#discussion_r234919472
--- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala
---
@@ -471,7 +471,11 @@ object SparkHadoopUtil {
try {
// Use reflection as this uses apis only avialable in hadoop 3
val builderMethod = fs.getClass().getMethod("createFile",
classOf[Path])
- val builder = builderMethod.invoke(fs, path)
+ // the builder api does not resolve relative paths, nor does it
create parent dirs, while
+ // the old api does.
+ fs.mkdirs(path.getParent())
--- End diff --
Some error handling would be good if `mkdirs ` returns false.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]