[SPARK-7907] [SQL] [UI] Rename tab ThriftServer to SQL.

This PR has three changes:
1. Renaming the table of `ThriftServer` to `SQL`;
2. Renaming the title of the tab from `ThriftServer` to `JDBC/ODBC Server`; and
3. Renaming the title of the session page from `ThriftServer` to `JDBC/ODBC Session`.

https://issues.apache.org/jira/browse/SPARK-7907

Author: Yin Huai <yhuai@databricks.com>

Closes #6448 from yhuai/JDBCServer and squashes the following commits:

eadcc3d [Yin Huai] Update test.
9168005 [Yin Huai] Use SQL as the tab name.
221831e [Yin Huai] Rename ThriftServer to JDBCServer.

(cherry picked from commit 3c1f1baaf0)
Signed-off-by: Yin Huai <yhuai@databricks.com>
This commit is contained in:
Yin Huai 2015-05-27 20:04:29 -07:00
parent b4ecbce65c
commit bd9173c14c
4 changed files with 8 additions and 6 deletions

View file

@ -47,7 +47,7 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage(""
</h4> ++ </h4> ++
generateSessionStatsTable() ++ generateSessionStatsTable() ++
generateSQLStatsTable() generateSQLStatsTable()
UIUtils.headerSparkPage("ThriftServer", content, parent, Some(5000)) UIUtils.headerSparkPage("JDBC/ODBC Server", content, parent, Some(5000))
} }
/** Generate basic stats of the thrift server program */ /** Generate basic stats of the thrift server program */
@ -143,7 +143,7 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage(""
val headerRow = Seq("User", "IP", "Session ID", "Start Time", "Finish Time", "Duration", val headerRow = Seq("User", "IP", "Session ID", "Start Time", "Finish Time", "Duration",
"Total Execute") "Total Execute")
def generateDataRow(session: SessionInfo): Seq[Node] = { def generateDataRow(session: SessionInfo): Seq[Node] = {
val sessionLink = "%s/ThriftServer/session?id=%s" val sessionLink = "%s/sql/session?id=%s"
.format(UIUtils.prependBaseUri(parent.basePath), session.sessionId) .format(UIUtils.prependBaseUri(parent.basePath), session.sessionId)
<tr> <tr>
<td> {session.userName} </td> <td> {session.userName} </td>

View file

@ -55,7 +55,7 @@ private[ui] class ThriftServerSessionPage(parent: ThriftServerTab)
Total run {sessionStat._2.totalExecution} SQL Total run {sessionStat._2.totalExecution} SQL
</h4> ++ </h4> ++
generateSQLStatsTable(sessionStat._2.sessionId) generateSQLStatsTable(sessionStat._2.sessionId)
UIUtils.headerSparkPage("ThriftServer", content, parent, Some(5000)) UIUtils.headerSparkPage("JDBC/ODBC Session", content, parent, Some(5000))
} }
/** Generate basic stats of the streaming program */ /** Generate basic stats of the streaming program */

View file

@ -27,7 +27,9 @@ import org.apache.spark.{SparkContext, Logging, SparkException}
* This assumes the given SparkContext has enabled its SparkUI. * This assumes the given SparkContext has enabled its SparkUI.
*/ */
private[thriftserver] class ThriftServerTab(sparkContext: SparkContext) private[thriftserver] class ThriftServerTab(sparkContext: SparkContext)
extends SparkUITab(getSparkUI(sparkContext), "ThriftServer") with Logging { extends SparkUITab(getSparkUI(sparkContext), "sql") with Logging {
override val name = "SQL"
val parent = getSparkUI(sparkContext) val parent = getSparkUI(sparkContext)
val listener = HiveThriftServer2.listener val listener = HiveThriftServer2.listener

View file

@ -84,11 +84,11 @@ class UISeleniumSuite
eventually(timeout(10 seconds), interval(50 milliseconds)) { eventually(timeout(10 seconds), interval(50 milliseconds)) {
go to baseURL go to baseURL
find(cssSelector("""ul li a[href*="ThriftServer"]""")) should not be None find(cssSelector("""ul li a[href*="sql"]""")) should not be None
} }
eventually(timeout(10 seconds), interval(50 milliseconds)) { eventually(timeout(10 seconds), interval(50 milliseconds)) {
go to (baseURL + "/ThriftServer") go to (baseURL + "/sql")
find(id("sessionstat")) should not be None find(id("sessionstat")) should not be None
find(id("sqlstat")) should not be None find(id("sqlstat")) should not be None