You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/12/23 06:03:00 UTC

[jira] [Assigned] (SPARK-41683) Spark UI: In jobs API, numActiveStages can be negative in some cases

     [ https://issues.apache.org/jira/browse/SPARK-41683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-41683:
------------------------------------

    Assignee: Apache Spark

> Spark UI: In jobs API, numActiveStages can be negative in some cases
> --------------------------------------------------------------------
>
>                 Key: SPARK-41683
>                 URL: https://issues.apache.org/jira/browse/SPARK-41683
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core, Web UI
>    Affects Versions: 3.3.1
>            Reporter: wy
>            Assignee: Apache Spark
>            Priority: Minor
>         Attachments: image-2022-12-22-16-06-21-180.png, image-2022-12-22-16-06-45-367.png, image-2022-12-23-13-24-30-412.png
>
>
> In API /api/v1/applications/.../jobs, for each job, there's one property called numActiveStages, telling how many active stages of the job.
> It is calculated by the following logic:
>  * When stage is submitted, numActiveStages += 1.
>  * When stage is completed, numActiveStages -= 1.
>  * When job is ended, for each pending stage, numActiveStages -= 1.
> !image-2022-12-22-16-06-45-367.png!
> !image-2022-12-23-13-24-30-412.png!
> !image-2022-12-22-16-06-21-180.png!
>  
> However, there's possibility that there's no stage submitted event for some skipped stages. In this case, when job ends, numActiveStages may be minus. Example:
>  # job 0 started with stage 0, 1, 2
>  ** stage 0: pending
>  ** stage 1: pending
>  ** stage 2: pending
>  ** numActiveStages: 0
>  # stage 0 submitted
>  ** stage 0: active
>  ** stage 1: pending
>  ** stage 2: pending
>  ** numActiveStages: 1
>  # stage 0 completed
>  ** stage 0: completed
>  ** stage 1: pending
>  ** stage 2: pending
>  ** numActiveStages: 0
>  # job 0 ended
>  ** stage 0: completed
>  ** stage 1: skipped
>  ** stage 2: skipped
>  ** numActiveStages: -2



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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