wzhfy commented on a change in pull request #27079: [SPARK-30410][SQL]
Calculating size of table with large number of partitions causes flooding logs
URL: https://github.com/apache/spark/pull/27079#discussion_r362746797
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/CommandUtils.scala
##########
@@ -55,11 +55,13 @@ object CommandUtils extends Logging {
def calculateTotalSize(spark: SparkSession, catalogTable: CatalogTable):
BigInt = {
val sessionState = spark.sessionState
- if (catalogTable.partitionColumnNames.isEmpty) {
+ val startTime = System.nanoTime()
+ val totalSize = if (catalogTable.partitionColumnNames.isEmpty) {
calculateLocationSize(sessionState, catalogTable.identifier,
catalogTable.storage.locationUri)
} else {
// Calculate table size as a sum of the visible partitions. See
SPARK-21079
val partitions =
sessionState.catalog.listPartitions(catalogTable.identifier)
+ logInfo(s"Starting to calculate sizes for ${partitions.length}
partitions.")
Review comment:
ok, merged to one line 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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]