diff options
author | Andrew Or <andrew@databricks.com> | 2015-03-24 16:49:27 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2015-03-24 16:49:27 -0700 |
commit | dd907d1a9df52ffe0a8e1e8dacd837019d11742c (patch) | |
tree | ddea59dce23174d471cd93e6e2edf92aafe7475f /core/src | |
parent | f7c3668ee62d5b87a0fdf64614aa45c7409ff585 (diff) | |
download | spark-dd907d1a9df52ffe0a8e1e8dacd837019d11742c.tar.gz spark-dd907d1a9df52ffe0a8e1e8dacd837019d11742c.tar.bz2 spark-dd907d1a9df52ffe0a8e1e8dacd837019d11742c.zip |
Revert "[SPARK-5771] Number of Cores in Completed Applications of Standalone Master Web Page always be 0 if sc.stop() is called"
This reverts commit dd077abf2e2949fdfec31074b760b587f00efcf2.
Conflicts:
core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala
core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala | 2 | ||||
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala | 32 |
2 files changed, 7 insertions, 27 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala b/core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala index 536aedb6f9..f979ffa166 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala @@ -91,7 +91,7 @@ private[deploy] class ApplicationInfo( } } - private[master] val requestedCores = desc.maxCores.getOrElse(defaultCores) + private val requestedCores = desc.maxCores.getOrElse(defaultCores) private[master] def coresLeft: Int = requestedCores - coresGranted diff --git a/core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala b/core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala index 9ab3c8f8fe..45412a35e9 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala @@ -75,16 +75,12 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") { val workers = state.workers.sortBy(_.id) val workerTable = UIUtils.listingTable(workerHeaders, workerRow, workers) - val activeAppHeaders = Seq("Application ID", "Name", "Cores in Use", - "Cores Requested", "Memory per Node", "Submitted Time", "User", "State", "Duration") + val appHeaders = Seq("Application ID", "Name", "Cores", "Memory per Node", "Submitted Time", + "User", "State", "Duration") val activeApps = state.activeApps.sortBy(_.startTime).reverse - val activeAppsTable = UIUtils.listingTable(activeAppHeaders, activeAppRow, activeApps) - - val completedAppHeaders = Seq("Application ID", "Name", "Cores Requested", "Memory per Node", - "Submitted Time", "User", "State", "Duration") + val activeAppsTable = UIUtils.listingTable(appHeaders, appRow, activeApps) val completedApps = state.completedApps.sortBy(_.endTime).reverse - val completedAppsTable = UIUtils.listingTable(completedAppHeaders, completeAppRow, - completedApps) + val completedAppsTable = UIUtils.listingTable(appHeaders, appRow, completedApps) val driverHeaders = Seq("Submission ID", "Submitted Time", "Worker", "State", "Cores", "Memory", "Main Class") @@ -191,7 +187,7 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") { </tr> } - private def appRow(app: ApplicationInfo, active: Boolean): Seq[Node] = { + private def appRow(app: ApplicationInfo): Seq[Node] = { val killLink = if (parent.killEnabled && (app.state == ApplicationState.RUNNING || app.state == ApplicationState.WAITING)) { val killLinkUri = s"app/kill?id=${app.id}&terminate=true" @@ -201,7 +197,6 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") { (<a href={killLinkUri} onclick={confirm}>kill</a>) </span> } - <tr> <td> <a href={"app?appId=" + app.id}>{app.id}</a> @@ -210,15 +205,8 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") { <td> <a href={app.desc.appUiUrl}>{app.desc.name}</a> </td> - { - if (active) { - <td> - {app.coresGranted} - </td> - } - } <td> - {app.requestedCores} + {app.coresGranted} </td> <td sorttable_customkey={app.desc.memoryPerSlave.toString}> {Utils.megabytesToString(app.desc.memoryPerSlave)} @@ -230,14 +218,6 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") { </tr> } - private def activeAppRow(app: ApplicationInfo): Seq[Node] = { - appRow(app, active = true) - } - - private def completeAppRow(app: ApplicationInfo): Seq[Node] = { - appRow(app, active = false) - } - private def driverRow(driver: DriverInfo): Seq[Node] = { val killLink = if (parent.killEnabled && (driver.state == DriverState.RUNNING || |