-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-15590] [WEBUI] Paginate Job Table in Jobs tab #13620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
add to whitelist |
| r | ||
| } | ||
|
|
||
| def slicedJobIds: Set[Int] = _slicedJobIds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it's deprecated. I will remove it. Thanks.
|
@nblintao this looks pretty good. There were a few methods that don't seem to be used anywhere. Am I missing something? |
|
Test build #60444 has finished for PR 13620 at commit
|
|
Test build #60469 has finished for PR 13620 at commit
|
|
Test build #60543 has finished for PR 13620 at commit
|
|
This looks great, I checked out the code and it looks good locally on my machine as well. I've read through the code and it looks good with the fixes @andrewor14 suggested so |
|
also cc @zsxwing |
|
Just opened this in the history server to double check the bug I found on your stages pr and discovered that this is completely non-functional on the history server, so I'm striking my earlier |
|
@ajbozarth Thanks for your checking and reporting. I didn't notice that the UI for history servers are different and just changed the AllJobsPage. I will try to check the page for history servers. But do you think it would be better if we use another PR to solve this (adding the pagination support for the jobs page in history servers)? |
|
They actually share the core majority of their code so your pagination is already there, it just can't change pages or change the number of shown jobs. I think its has to do with how your calling and parsing the http requests since I didn't see any parameters in the url when I would try to change pages |
|
@ajbozarth Got it, that's a really fatal bug. I will fix it in this PR. Thanks again! |
## What changes were proposed in this pull request? This patch adds pagination support for the Stage Tables in the Stage tab. Pagination is provided for all of the four Job Tables (active, pending, completed, and failed). Besides, the paged stage tables are also used in JobPage (the detail page for one job) and PoolPage. Interactions (jumping, sorting, and setting page size) for paged tables are also included. ## How was this patch tested? Tested manually by using checking the Web UI after completing and failing hundreds of jobs. Same as the testings for [Paginate Job Table in Jobs tab](apache#13620). This shows the pagination for completed stages:  Author: Tao Lin <[email protected]> Closes apache#13708 from nblintao/stageTable.
|
Test build #61910 has finished for PR 13620 at commit
|
|
I believe this commit has resolved the bugs reported by @ajbozarth. It looks well on history server pages now, and it could keep the status of other tables while changing one. |
|
@nblintao I just finished testing your changes and it looks good. I did find a odd behavior though, but I think it's intentional in the original pagination code. If you make the table large enough to fit all the jobs the pagination toolbar disappears. Given you can just click the back button to fix it I don't think it's an issue to be fixed, but it is a bit annoying. Another fyi is that only ~1000 jobs are shown still, but I'm assuming the pagination doesn't fix the reasoning behind only showing the most recent 1000 jobs. tl;dr LGTM |
| jobs: Seq[JobUIData]): Seq[Node] = { | ||
| val allParameters = request.getParameterMap.asScala.toMap | ||
| val parameterOtherTable = allParameters.filterNot(_._1.startsWith(jobTag)) | ||
| .map(para => para._1 + "=" + para._2(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does parameterOtherTable do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It keeps the status of other tables on the page. See #13708 (comment)
|
@nblintao Can you comment on your PR to explain which parts are new code and which parts are based on existing code (comments like https://github.com/apache/spark/pull/13620/files#r71997586)? |
| override def row(jobTableRow: JobTableRowData): Seq[Node] = { | ||
| val job = jobTableRow.jobData | ||
|
|
||
| <tr id={"job-" + job.jobId}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
|
@yhuai I updated the description of the PR:
And thanks for your review! |
|
retest this please |
|
LGTM. Let's run the test again since this is a pretty old PR. Thanks! |
|
Test build #62846 has finished for PR 13620 at commit
|
|
Merging to master. |
|
Great! Thanks, @andrewor14 @ajbozarth @yhuai @zsxwing. |
## What changes were proposed in this pull request? This issue was reported by wangyum. In the AllJobsPage, JobPage and StagePage, the description length was limited before like as follows.  But recently, the limitation seems to have been accidentally removed.  The cause is that some tables are no longer `sortable` class although they were, and `sortable` class does not only mark tables as sortable but also limited the width of their child `td` elements. The reason why now some tables are not `sortable` class is because another sortable mechanism was introduced by #13620 and #13708 with pagination feature. To fix this issue, I've introduced new class `table-cell-width-limited` which limits the description cell width and the description is like what it was. <img width="1260" alt="2016-12-20 1 00 34" src="https://cloud.githubusercontent.com/assets/4736016/21320478/89141c7a-c654-11e6-8494-f8f91325980b.png"> ## How was this patch tested? Tested manually with my browser. Author: Kousuke Saruta <[email protected]> Closes #16338 from sarutak/SPARK-18837.
## What changes were proposed in this pull request? This issue was reported by wangyum. In the AllJobsPage, JobPage and StagePage, the description length was limited before like as follows.  But recently, the limitation seems to have been accidentally removed.  The cause is that some tables are no longer `sortable` class although they were, and `sortable` class does not only mark tables as sortable but also limited the width of their child `td` elements. The reason why now some tables are not `sortable` class is because another sortable mechanism was introduced by #13620 and #13708 with pagination feature. To fix this issue, I've introduced new class `table-cell-width-limited` which limits the description cell width and the description is like what it was. <img width="1260" alt="2016-12-20 1 00 34" src="https://cloud.githubusercontent.com/assets/4736016/21320478/89141c7a-c654-11e6-8494-f8f91325980b.png"> ## How was this patch tested? Tested manually with my browser. Author: Kousuke Saruta <[email protected]> Closes #16338 from sarutak/SPARK-18837. (cherry picked from commit f2ceb2a) Signed-off-by: Sean Owen <[email protected]>
## What changes were proposed in this pull request? This issue was reported by wangyum. In the AllJobsPage, JobPage and StagePage, the description length was limited before like as follows.  But recently, the limitation seems to have been accidentally removed.  The cause is that some tables are no longer `sortable` class although they were, and `sortable` class does not only mark tables as sortable but also limited the width of their child `td` elements. The reason why now some tables are not `sortable` class is because another sortable mechanism was introduced by apache#13620 and apache#13708 with pagination feature. To fix this issue, I've introduced new class `table-cell-width-limited` which limits the description cell width and the description is like what it was. <img width="1260" alt="2016-12-20 1 00 34" src="https://cloud.githubusercontent.com/assets/4736016/21320478/89141c7a-c654-11e6-8494-f8f91325980b.png"> ## How was this patch tested? Tested manually with my browser. Author: Kousuke Saruta <[email protected]> Closes apache#16338 from sarutak/SPARK-18837.
## What changes were proposed in this pull request? This issue was reported by wangyum. In the AllJobsPage, JobPage and StagePage, the description length was limited before like as follows.  But recently, the limitation seems to have been accidentally removed.  The cause is that some tables are no longer `sortable` class although they were, and `sortable` class does not only mark tables as sortable but also limited the width of their child `td` elements. The reason why now some tables are not `sortable` class is because another sortable mechanism was introduced by apache#13620 and apache#13708 with pagination feature. To fix this issue, I've introduced new class `table-cell-width-limited` which limits the description cell width and the description is like what it was. <img width="1260" alt="2016-12-20 1 00 34" src="https://cloud.githubusercontent.com/assets/4736016/21320478/89141c7a-c654-11e6-8494-f8f91325980b.png"> ## How was this patch tested? Tested manually with my browser. Author: Kousuke Saruta <[email protected]> Closes apache#16338 from sarutak/SPARK-18837.
What changes were proposed in this pull request?
This patch adds pagination support for the Job Tables in the Jobs tab. Pagination is provided for all of the three Job Tables (active, completed, and failed). Interactions (jumping, sorting, and setting page size) for paged tables are also included.
The diff didn't keep track of some lines based on the original ones. The function
makeRowof the originalAllJobsPage.scalais reused. They are separated at the beginning of the functionjobRow(L427-439) and the functionrow(L594-618) in the newAllJobsPage.scala.How was this patch tested?
Tested manually by using checking the Web UI after completing and failing hundreds of jobs.
Generate completed jobs by:
Generate failed jobs by calling the following code multiple times:
Interactions like jumping, sorting, and setting page size are all tested.
This shows the pagination for completed jobs:

This shows the sorting works in job tables:

This shows the pagination for failed jobs and the effect of jumping and setting page size:
