This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new a3e79f456c8 [SPARK-43719][WEBUI] Handle `missing row.excludedInStages` 
field
a3e79f456c8 is described below

commit a3e79f456c84a1634c0452515dd9630c67b43234
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon May 22 22:17:11 2023 -0700

    [SPARK-43719][WEBUI] Handle `missing row.excludedInStages` field
    
    ### What changes were proposed in this pull request?
    
    This PR aims to handle a corner case when `row.excludedInStages` field is 
missing.
    
    ### Why are the changes needed?
    
    To fix the following type error when Spark loads some very old 2.4.x or 
3.0.x logs.
    
    
![missing](https://github.com/apache/spark/assets/9700541/f402df10-bf92-4c9f-8bd1-ec9b98a67966)
    
    We have two places and this PR protects both places.
    ```
    $ git grep row.excludedInStages
    core/src/main/resources/org/apache/spark/ui/static/executorspage.js:    if 
(typeof row.excludedInStages === "undefined" || row.excludedInStages.length == 
0) {
    core/src/main/resources/org/apache/spark/ui/static/executorspage.js:    
return "Active (Excluded in Stages: [" + row.excludedInStages.join(", ") + "])";
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, this will remove the error case only.
    
    ### How was this patch tested?
    
    Manual review.
    
    Closes #41266 from dongjoon-hyun/SPARK-43719.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit eeab2e701330f7bc24e9b09ce48925c2c3265aa8)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 core/src/main/resources/org/apache/spark/ui/static/executorspage.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/src/main/resources/org/apache/spark/ui/static/executorspage.js 
b/core/src/main/resources/org/apache/spark/ui/static/executorspage.js
index b7fbe0492b6..8c2dc13c35b 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/executorspage.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/executorspage.js
@@ -45,7 +45,7 @@ function formatStatus(status, type, row) {
   }
 
   if (status) {
-    if (row.excludedInStages.length == 0) {
+    if (typeof row.excludedInStages === "undefined" || 
row.excludedInStages.length == 0) {
       return "Active"
     }
     return "Active (Excluded in Stages: [" + row.excludedInStages.join(", ") + 
"])";


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to