-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31642] Add Pagination Support for Structured Streaming Page #28485
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
|
ok to test |
|
cc @gengliangwang and @HeartSaVioR as well |
|
Test build #122469 has finished for PR 28485 at commit
|
|
retest this please |
|
Jenkins retest this please |
|
Test build #122479 has finished for PR 28485 at commit
|
|
Seems like an unrelated and flaky failure and will fixed in #28391 |
|
Jenkins retest this please |
|
Test build #122485 has finished for PR 28485 at commit
|
uncleGen
left a comment
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.
Bunch of codes seem to be copied from codebase, it might be better to find the way how to reuse them.
| s"&$pageNumberFormField=$page" + | ||
| s"&$tableTag.sort=$encodedSortColumn" + | ||
| s"&$tableTag.desc=$sortDesc" + | ||
| s"&$pageSizeFormField=$pageSize" + | ||
| s"#$tableTag" |
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.
nit: indent
| } | ||
|
|
||
| eventually(timeout(30.seconds), interval(100.milliseconds)) { | ||
| eventually(timeout(300.seconds), interval(100.milliseconds)) { |
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.
This was modified accidentally, I will update this.
|
Test build #122493 has finished for PR 28485 at commit
|
| List("Name", "Status", "Id", "Run ID", "Start Time", "Duration", "Avg Input /sec", | ||
| "Avg Process /sec", "Lastest Batch") | ||
|
|
||
| val arrow = 0x25BE.toChar |
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.
nit: Why not just simply use a literal like '\u25BE' ?
|
LGTM. Pending on #28512 accepted and then update this PR. |
### What changes were proposed in this pull request? Currently while implementing pagination using the existing pagination framework, a lot of code is being copied as pointed out [here](#28485 (review)). I introduced some changes in `PagedTable` which is the main trait for implementing the pagination. * Added function for getting table parameters. * Added a function for table header row. This will help in maintaining consistency across the tables. All the header rows across tables will be consistent now. ### Why are the changes needed? * A lot of code is copied every time pagination is implemented for any table. * Code readability is not great as lot of HTML is embedded. * Paginating other tables will be a lot easier now. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually. This is mainly refactoring work, no new functionality introduced. Existing test cases should pass. Closes #28512 from iRakson/refactorPaginationFramework. Authored-by: iRakson <[email protected]> Signed-off-by: Sean Owen <[email protected]>
|
Test build #122941 has finished for PR 28485 at commit
|
|
Jenkins retest this please |
|
Test build #123008 has finished for PR 28485 at commit
|
|
I've merged to |
| ("Run ID", true, None), | ||
| ("Start Time", true, None), | ||
| ("Duration", true, None), | ||
| ("Avg Input /sec", true, None), |
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.
@iRakson could you update the PR description with the screenshot. |
Updated. |
…us column sortable ### What changes were proposed in this pull request? In #28485 pagination support for tables of Structured Streaming Tab was added. It missed 2 things: * For sorting duration column, `String` was used which sometimes gives wrong results(consider `"3 ms"` and `"12 ms"`). Now we first sort the duration column and then convert it to readable String * Status column was not made sortable. ### Why are the changes needed? To fix the wrong result for sorting and making Status column sortable. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? After changes: <img width="1677" alt="Screenshot 2020-06-08 at 2 18 48 PM" src="https://user-images.githubusercontent.com/15366835/84010992-153fa280-a993-11ea-9846-bf176f2ec5d7.png"> Closes #28752 from iRakson/ssTests. Authored-by: iRakson <[email protected]> Signed-off-by: Sean Owen <[email protected]>
What changes were proposed in this pull request?
Add Pagination Support for structured streaming page. Now both tables
Active QueriesandCompleted Querieswill have pagination.To implement pagination, pagination framework from #7399 is used.
Why are the changes needed?
Does this PR introduce any user-facing change?
Yes. Both tables will support pagination.
How was this patch tested?
Before Changes:

After Changes:
