You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by bo...@apache.org on 2023/07/06 09:11:39 UTC

[kyuubi] branch master updated: [KYUUBI #5025] Use formatDuration instead of formatDurationVerbose in SparkUI's engine tab

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

bowenliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new cff7eb625 [KYUUBI #5025] Use formatDuration instead of formatDurationVerbose in SparkUI's engine tab
cff7eb625 is described below

commit cff7eb6256ccf98b087f93d6c3c06903aba9084a
Author: liangbowen <li...@gf.com.cn>
AuthorDate: Thu Jul 6 17:11:29 2023 +0800

    [KYUUBI #5025] Use formatDuration instead of formatDurationVerbose in SparkUI's engine tab
    
    ### _Why are the changes needed?_
    
    - previously used `formatDurationVerbose` generates duration with dedicated unit parts
    - Spark UI itself also uses `formatDuration` in its Job/Stage pages for displaying duration
       - `JobDataUtil.getFormattedDuration` in AllJobsPage, and `formatDuration` used in `getFormattedDuration` , https://github.com/apache/spark/blob/v3.3.2/core/src/main/scala/org/apache/spark/ui/jobs/JobDataUtil.scala#L32
    
    Before:
    ![image](https://github.com/apache/kyuubi/assets/1935105/e7fce841-5519-4bf9-bc04-701ea2a90dae)
    
    After:
    ![image](https://github.com/apache/kyuubi/assets/1935105/b2805183-b7ea-4d4a-af9e-d532019dae31)
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request
    
    Closes #5025 from bowenliang123/format-duration.
    
    Closes #5025
    
    dc214acac [liangbowen] use formatDuration instead of formatDurationVerbose for duration in Engine tab
    
    Authored-by: liangbowen <li...@gf.com.cn>
    Signed-off-by: liangbowen <li...@gf.com.cn>
---
 .../src/main/scala/org/apache/spark/ui/EnginePage.scala               | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala
index a2a2931f4..83626dac5 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala
@@ -292,7 +292,7 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
         <td> {session.name} </td>
         <td> {formatDate(session.startTime)} </td>
         <td> {if (session.endTime > 0) formatDate(session.endTime)} </td>
-        <td> {formatDurationVerbose(session.duration)} </td>
+        <td> {formatDuration(session.duration)} </td>
         <td> {session.totalOperations} </td>
       </tr>
     }
@@ -386,7 +386,7 @@ private class StatementStatsPagedTable(
         {if (event.completeTime > 0) formatDate(event.completeTime)}
       </td>
       <td >
-        {formatDurationVerbose(event.duration)}
+        {formatDuration(event.duration)}
       </td>
       <td>
         <span class="description-input">