You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2024/06/01 01:26:40 UTC
Re: [PR] [SPARK-48484][SQL] Fix: V2Write use the same TaskAttemptId for different task attempts [spark]
LuciferYang commented on code in PR #46811:
URL: https://github.com/apache/spark/pull/46811#discussion_r1623081819
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileWriterFactory.scala:
##########
@@ -38,7 +38,7 @@ case class FileWriterFactory (
@transient private lazy val jobId = SparkHadoopWriterUtils.createJobID(jobTrackerID, 0)
override def createWriter(partitionId: Int, realTaskId: Long): DataWriter[InternalRow] = {
- val taskAttemptContext = createTaskAttemptContext(partitionId)
+ val taskAttemptContext = createTaskAttemptContext(partitionId, realTaskId.toInt & Int.MaxValue)
Review Comment:
ok, we can unify the above three cases to `math.abs` in a follow-up.
--
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