sarutak commented on a change in pull request #26703: 
[SPARK-29997][WEBUI][FOLLOWUP] Refactor code for job description of empty jobs
URL: https://github.com/apache/spark/pull/26703#discussion_r358075772
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
 ##########
 @@ -695,21 +695,20 @@ private[spark] class DAGScheduler(
 
     val jobId = nextJobId.getAndIncrement()
     if (partitions.isEmpty) {
+      val currentDescription = 
sc.getLocalProperty(SparkContext.SPARK_JOB_DESCRIPTION)
+      if (currentDescription == null) {
+        sc.setJobDescription(callSite.shortForm)
+      }
+
       val time = clock.getTimeMillis()
-      val dummyStageInfo =
-        new StageInfo(
-          StageInfo.INVALID_STAGE_ID,
-          StageInfo.INVALID_ATTEMPT_ID,
-          callSite.shortForm,
-          0,
-          Seq.empty[RDDInfo],
-          Seq.empty[Int],
-          "")
       listenerBus.post(
-        SparkListenerJobStart(
-          jobId, time, Seq[StageInfo](dummyStageInfo), 
Utils.cloneProperties(properties)))
+        SparkListenerJobStart(jobId, time, Seq.empty, 
Utils.cloneProperties(properties)))
       listenerBus.post(
         SparkListenerJobEnd(jobId, time, JobSucceeded))
+
+      if (currentDescription == null) {
+        sc.setJobDescription(null)
+      }
 
 Review comment:
   Thanks! I've merged it.

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


With regards,
Apache Git Services

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

Reply via email to