LuciferYang commented on a change in pull request #30681:
URL: https://github.com/apache/spark/pull/30681#discussion_r573404875
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala
##########
@@ -223,6 +223,28 @@ object FileFormatWriter extends Logging {
processStats(description.statsTrackers, ret.map(_.summary.stats))
logInfo(s"Finished processing stats for write job ${description.uuid}.")
+ val insertStats : String = try {
+ description.statsTrackers.map{
+ s =>
+ val header = s"File stats [ "
+ val metrics = s.asInstanceOf[BasicWriteJobStatsTracker].metrics
+ val inner = metrics.map{
+ p => p._1 + "=" + p._2.value
+ }.mkString("; ")
+ header + inner + " ]\n"
+ }.mkString("\n")
+ } catch {
+ case e: Exception => logWarning("Exception write logs error", e)
+ ""
+ }
+
+ if
(!sparkSession.sparkContext.getConf.get(config.FILE_INSERT_STATUS_LOG_FLAG)) {
+ print(insertStats)
Review comment:
Why `print` instead of `log`?
----------------------------------------------------------------
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]