cloud-fan commented on code in PR #40064:
URL: https://github.com/apache/spark/pull/40064#discussion_r1115618397
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileWriterFactory.scala:
##########
@@ -30,7 +30,8 @@ case class FileWriterFactory (
description: WriteJobDescription,
committer: FileCommitProtocol) extends DataWriterFactory {
- private val jobId = SparkHadoopWriterUtils.createJobID(new Date, 0)
+ private[this] val jobTrackerID =
SparkHadoopWriterUtils.createJobTrackerID(new Date)
+ @transient private lazy val jobId =
SparkHadoopWriterUtils.createJobID(jobTrackerID, 0)
Review Comment:
can we add some comments to explain this serialization trick? Otherwise it's
hard to understand why `jobTrackerID` is a val but `jobId` is a `@transient
lazy val`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]