-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25719][UI] : Search functionality in datatables in stages page should search over formatted data rather than the raw data #24419
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
Changes from 2 commits
a1e72f7
a3a74f7
8822c82
9208914
35f78c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,6 +145,16 @@ private[spark] object UIUtils extends Logging { | |
| } | ||
| } | ||
|
|
||
| def formatBytes(bytes: Long): String = { | ||
|
||
| if (bytes == 0) { | ||
| return "0.0 B" | ||
| } | ||
| val factor = 1024 | ||
| val sizes = Array("B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB") | ||
| val num = (Math.floor(Math.log(bytes.toDouble) / Math.log(factor.toDouble))).toInt | ||
| "%.1f".format((bytes / Math.pow(factor, num)).toFloat) + " " + sizes(num) | ||
| } | ||
|
|
||
| // Yarn has to go through a proxy so the base uri is provided and has to be on all links | ||
| def uiRoot(request: HttpServletRequest): String = { | ||
| // Knox uses X-Forwarded-Context to notify the application the base path | ||
|
|
||
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 is also adding new fields to search as well, no big deal, but should probably add to the description of the pr.
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.
Done