Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/21558#discussion_r196277478
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/WriteToDataSourceV2.scala
---
@@ -110,7 +108,7 @@ object DataWritingSparkTask extends Logging {
useCommitCoordinator: Boolean): WriterCommitMessage = {
val stageId = context.stageId()
val partId = context.partitionId()
- val attemptId = context.attemptNumber()
+ val attemptId = context.taskAttemptId().toInt
--- End diff --
nit: can you rename this variable `tid`? these names are pretty confusing,
but I think that at least "tid" is used consistently and exclusively for this,
while "attempt" means a lot of different things.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]