You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/20 18:43:28 UTC
[GitHub] [spark] steveloughran commented on a diff in pull request #29000: [SPARK-27194][SPARK-29302][SQL] Fix commit collision in dynamic partition overwrite mode
steveloughran commented on code in PR #29000:
URL: https://github.com/apache/spark/pull/29000#discussion_r1053638820
##########
core/src/main/scala/org/apache/spark/internal/io/FileCommitProtocol.scala:
##########
@@ -169,4 +169,8 @@ object FileCommitProtocol extends Logging {
ctor.newInstance(jobId, outputPath)
}
}
+
+ def getStagingDir(path: String, jobId: String): Path = {
+ new Path(path, ".spark-staging-" + jobId)
+ }
Review Comment:
HadoopMapReduceCommitProtocol is using the RDD.id as the job ID here, not uuid or hadoop job ID (which has had uniqueness issues elsewhere). if different jobs on different spark clusters try to write to same table using dynamic output partitioning, risk of output corruption -especially if hadoop "broken" v2 commit algorithm is used.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org