Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/18159#discussion_r125217117
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala
---
@@ -273,12 +271,36 @@ object FileFormatWriter extends Logging {
* automatically trigger task aborts.
*/
private trait ExecuteWriteTask {
+
/**
- * Writes data out to files, and then returns the list of partition
strings written out.
- * The list of partitions is sent back to the driver and used to
update the catalog.
+ * The data structures used to measure metrics during writing.
*/
- def execute(iterator: Iterator[InternalRow]): Set[String]
+ protected val writingTimePerFile: mutable.ArrayBuffer[Long] =
mutable.ArrayBuffer.empty
--- End diff --
Now I exclude the zero values of writing time (actually < 1ms). So I
actually don't count totoalWritingTime / numFiles.
totoalWritingTime / numFiles can easily result a zero writing time, for
example the total writing time for (1ms, 1ms, 0ms, 0ms) is 2ms, and
totoalWritingTime / numFiles = 2ms / 4 = 0ms (the smallest unit is 1ms).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]