[SPARK-20966][WEB-UI][SQL]Table data is not sorted by startTime time desc, time is not formatted and redundant code in JDBC/ODBC Server page.#18186
[SPARK-20966][WEB-UI][SQL]Table data is not sorted by startTime time desc, time is not formatted and redundant code in JDBC/ODBC Server page.#18186guoxiaolongzte wants to merge 37 commits intoapache:masterfrom guoxiaolongzte:SPARK-20966
Conversation
…ucceeded|failed|unknown]
…remove redundant description.
… not formatted and redundant code in JDBC/ODBC Server page.
|
@srowen @ajbozarth @jerryshao Help to review the code, thanks. |
| val headerRow = Seq("User", "JobID", "GroupID", "Start Time", "Finish Time", "Duration", | ||
| "Statement", "State", "Detail") | ||
| val dataRows = listener.getExecutionList | ||
| val dataRows = listener.getExecutionList.sortBy(_.startTimestamp).reverse |
There was a problem hiding this comment.
What was this sorted by before? Was there a reason it was that way? If there wasn't, I'm ok with this change.
There was a problem hiding this comment.
In the ThriftServerSessionPage.scala, this sorted is order by startTimestamp desc.
But in the ThriftServerPage.scala, this sorted by before is default, this sorted is not order by startTimestamp desc.
So sort by time in reverse order is in line with spark UI style.
| } | ||
|
|
||
| /** Generate stats of batch sessions of the thrift server program */ | ||
| private def generateSessionStatsTable(): Seq[Node] = { |
There was a problem hiding this comment.
From what I can tell this has never been used, is this something that should be used rather than deleted? I have't worked in the ThiftSever UI much so I'm not sure myself.
There was a problem hiding this comment.
In the whole spark project, I did not find this method where it was used. When I remove this method to recompile the package test, I did not find any problems with this ThiftSever ui. SoI think can remove this method because it is redundant code. Thanks.
There was a problem hiding this comment.
There's also a method like this in ThriftServerPage.scala above. I guess we can remove it too. It's dead code.
There was a problem hiding this comment.
@srowen
No, This method of generateSessionStatsTable in ThriftServerPage.scala is used. It is not dead code.
There was a problem hiding this comment.
@srowen
This method implements the functions shown in the figure
|
@zsxwing |
|
Test build #3774 has finished for PR 18186 at commit
|
|
Test build #3776 has finished for PR 18186 at commit
|
|
Ping @guoxiaolongzte |
|
@srowen |
|
You saw my comment at #18186 (comment) above right? |
|
@srowen |
|
Merged to master |

What changes were proposed in this pull request?
fix before :

fix after :

fix before :

fix after :

The function of 'generateSessionStatsTable' has not been used
How was this patch tested?
manual tests
Please review http://spark.apache.org/contributing.html before opening a pull request.