[GitHub] spark pull request #13654: [SPARK-15868] [Web UI] Executors table in Executo...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/13654 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #13654: [SPARK-15868] [Web UI] Executors table in Executo...
Github user ajbozarth commented on a diff in the pull request: https://github.com/apache/spark/pull/13654#discussion_r67035475 --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala --- @@ -53,6 +54,9 @@ private[ui] class ExecutorsPage( // When GCTimePercent is edited change ToolTips.TASK_TIME to match private val GCTimePercent = 0.1 + // a safe String to Int for sorting ids (converts non-numeric Strings to -1) + private def strToInt(str: String) : Int = Try(str.toInt).getOrElse(-1) --- End diff -- That was my intention and why I chose to leave this function private in ExecutorsPage rather than in a Utils file --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #13654: [SPARK-15868] [Web UI] Executors table in Executo...
Github user ajbozarth commented on a diff in the pull request: https://github.com/apache/spark/pull/13654#discussion_r67035481 --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala --- @@ -69,13 +73,13 @@ private[ui] class ExecutorsPage( } val execInfo = activeExecutorInfo ++ deadExecutorInfo -val execInfoSorted = execInfo.sortBy(_.id) +val execInfoSorted = execInfo.sortWith((a, b) => strToInt(a.id) > strToInt(b.id)) --- End diff -- Thanks, I've switched to using `Ordering` but decided to leave the Try in the function since I also use it in the table sorting. I'll push the update once I test it. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #13654: [SPARK-15868] [Web UI] Executors table in Executo...
Github user jaceklaskowski commented on a diff in the pull request: https://github.com/apache/spark/pull/13654#discussion_r66961307 --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala --- @@ -69,13 +73,13 @@ private[ui] class ExecutorsPage( } val execInfo = activeExecutorInfo ++ deadExecutorInfo -val execInfoSorted = execInfo.sortBy(_.id) +val execInfoSorted = execInfo.sortWith((a, b) => strToInt(a.id) > strToInt(b.id)) --- End diff -- I think I'd use `Ordering` trait instead as it's not very easy to spot what the ordering is. ``` case class Info(id: String) val infos = Seq(Info("5"), Info("driver"), Info("1"), Info("10"), Info("500")) implicit val onString = Ordering[Int].on((s: String) => util.Try(s.toInt).getOrElse(-1)) infos.sortBy(_.id) ``` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #13654: [SPARK-15868] [Web UI] Executors table in Executo...
Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/13654#discussion_r66930367 --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala --- @@ -53,6 +54,9 @@ private[ui] class ExecutorsPage( // When GCTimePercent is edited change ToolTips.TASK_TIME to match private val GCTimePercent = 0.1 + // a safe String to Int for sorting ids (converts non-numeric Strings to -1) + private def strToInt(str: String) : Int = Try(str.toInt).getOrElse(-1) --- End diff -- This makes all non-numeric strings "equal" and their sort order arbitrary. I think "driver" is probably the only non-numeric value in use and that's unlikely to change, so this is probably OK. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #13654: [SPARK-15868] [Web UI] Executors table in Executo...
GitHub user ajbozarth opened a pull request: https://github.com/apache/spark/pull/13654 [SPARK-15868] [Web UI] Executors table in Executors tab should sort Executor IDs in numerical order ## What changes were proposed in this pull request? Currently the Executors table sorts by id using a string sort (since that's what it is stored as). Since the id is a number (other than the driver) we should be sorting numerically. I have changed both the initial sort on page load as well as the table sort to sort on id numerically, treating non-numeric strings (like the driver) as "-1" ## How was this patch tested? Manually tested and dev/run-tests ![pageload](https://cloud.githubusercontent.com/assets/13952758/16027882/d32edd0a-318e-11e6-9faf-fc972b7c36ab.png) ![sorted](https://cloud.githubusercontent.com/assets/13952758/16027883/d34541c6-318e-11e6-9ed7-6bfc0cd4152e.png) You can merge this pull request into a Git repository by running: $ git pull https://github.com/ajbozarth/spark spark15868 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/13654.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #13654 commit 35b280a1882fd3f5ae34c71cb00a12bf12852a90 Author: Alex Bozarth Date: 2016-06-14T00:08:52Z Fixed sorting on executor id --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org