You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/25 17:00:13 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #28022: [SPARK-31253][SQL] add metrics to shuffle reader

dongjoon-hyun commented on a change in pull request #28022: [SPARK-31253][SQL] add metrics to shuffle reader
URL: https://github.com/apache/spark/pull/28022#discussion_r398017307
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CustomShuffleReaderExec.scala
 ##########
 @@ -62,20 +61,113 @@ case class CustomShuffleReaderExec private(
     }
   }
 
-  override def stringArgs: Iterator[Any] = Iterator(description)
+  override def stringArgs: Iterator[Any] = {
+    val desc = if (isLocalReader) {
+      "local"
+    } else {
+      if (hasCoalescedPartition && hasSkewedPartition) {
+        "coalesced and skewed"
+      } else if (hasCoalescedPartition) {
+        "coalesced"
+      } else if (hasSkewedPartition) {
+        "skewed"
+      } else {
+        ""
+      }
+    }
+    Iterator(desc)
+  }
 
-  private var cachedShuffleRDD: RDD[InternalRow] = null
+  def hasCoalescedPartition: Boolean = {
 
 Review comment:
   Is this visible for testing or do you have some use cases in your mind?
   `hasCoalescedPartition`, `hasSkewedPartition`, `isLocalReader`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org