WinkerDu commented on a change in pull request #29000:
URL: https://github.com/apache/spark/pull/29000#discussion_r460664415
##########
File path:
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
##########
@@ -106,15 +106,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 =>
+ handleDynamicPartitionOverwrite(dir)
new Path(Option(f.getWorkPath).map(_.toString).getOrElse(path))
- case _ => new Path(path)
+ case _ =>
+ handleDynamicPartitionOverwrite(dir)
Review comment:
Since we leverage FileOutputCommitter to commit task attempt file, we
only need to handle this in 'case f: FileOutputCommitter' branch
----------------------------------------------------------------
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]