cloud-fan commented on a change in pull request #32198:
URL: https://github.com/apache/spark/pull/32198#discussion_r617321522
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/BasicWriteStatsTracker.scala
##########
@@ -134,23 +134,20 @@ class BasicWriteTaskStatsTracker(hadoopConf:
Configuration)
partitions.append(partitionValues)
}
- override def newBucket(bucketId: Int): Unit = {
- // currently unhandled
+ override def newFile(filePath: String): Unit = {
+ submittedFiles += filePath
+ numSubmittedFiles += 1
}
- override def newFile(filePath: String): Unit = {
- statCurrentFile()
- curFile = Some(filePath)
- submittedFiles += 1
+ override def closeFile(filePath: String): Unit = {
+ getFileStats(filePath)
+ submittedFiles.remove(filePath)
}
- private def statCurrentFile(): Unit = {
- curFile.foreach { path =>
- getFileSize(path).foreach { len =>
- numBytes += len
- numFiles += 1
- }
- curFile = None
+ private def getFileStats(filePath: String): Unit = {
Review comment:
seems it's not `getFileStats`, but `updateFileStats`
--
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]