Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/2852#discussion_r19300512
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/HistoryPage.scala ---
@@ -21,12 +21,28 @@ import javax.servlet.http.HttpServletRequest
import scala.xml.Node
-import org.apache.spark.ui.{WebUIPage, UIUtils}
+import org.apache.spark.ui.{UITableBuilder, UITable, WebUIPage, UIUtils}
private[spark] class HistoryPage(parent: HistoryServer) extends
WebUIPage("") {
private val pageSize = 20
+ val appTable: UITable[ApplicationHistoryInfo] = {
+ val builder = new UITableBuilder[ApplicationHistoryInfo]()
+ import builder._
+ customCol("App ID") { info =>
+ val uiAddress = HistoryServer.UI_PATH_PREFIX + s"/${info.id}"
+ <a href={uiAddress}>{info.id}</a>
+ }
+ col("App Name") { _.name }
--- End diff --
I really like this change, but I find col slightly confusing here. For
somebody who comes to the code base without understanding the details of
UITableBuilder and the import up there, they can get confused on where col is
coming from.
Why don't we just remove the import builder._ and add builder to every
line? If you feel this is too long, just use a shorter variable name like t.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]