Ngone51 commented on a change in pull request #29000:
URL: https://github.com/apache/spark/pull/29000#discussion_r478537062
##########
File path:
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
##########
@@ -106,13 +112,13 @@ class HadoopMapReduceCommitProtocol(
val filename = getFilename(taskContext, ext)
val stagingDir: Path = committer match {
- case _ if dynamicPartitionOverwrite =>
- assert(dir.isDefined,
- "The dataset to be written must be partitioned when
dynamicPartitionOverwrite is true.")
- partitionPaths += dir.get
- this.stagingDir
// For FileOutputCommitter it has its own staging path called "work
path".
case f: FileOutputCommitter =>
+ if (dynamicPartitionOverwrite) {
+ assert(dir.isDefined,
+ "The dataset to be written must be partitioned when
dynamicPartitionOverwrite is true.")
+ partitionPaths += dir.get
+ }
new Path(Option(f.getWorkPath).map(_.toString).getOrElse(path))
Review comment:
What about the case of `dynamicPartitionOverwrite=true` but
`dir.isEmpty`? IIUC, the workPath will be
`/path/to/outputPath/.spark-staging-{jobId}/_temporary/{appAttemptId}/_temporary/{taskAttemptId}/`
in this case. And it will be committed to
`/path/to/outputPath/.spark-staging-{jobId}/` then. But it seems we don't move
them to the `/path/to/outputPath/` in the end.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]