-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-29724][SPARK-29726][WEBUI][SQL] Support JDBC/ODBC tab for HistoryServer WebUI #26378
Conversation
Test build #113164 has finished for PR 26378 at commit
|
Test build #113165 has finished for PR 26378 at commit
|
dfd1ff6
to
7015ac6
Compare
Test build #113170 has finished for PR 26378 at commit
|
Test build #113166 has finished for PR 26378 at commit
|
5490c8e
to
24dde37
Compare
Test build #113171 has finished for PR 26378 at commit
|
24dde37
to
905e635
Compare
retest this please |
Test build #113172 has finished for PR 26378 at commit
|
905e635
to
4eab137
Compare
Test build #113173 has finished for PR 26378 at commit
|
retest this please |
Test build #113204 has finished for PR 26378 at commit
|
Jenkins, retest this please |
Retest this please |
841f8a5
to
540faf0
Compare
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.
cc @vanzin , @cloud-fan , @wangym , @srowen , @AngersZhuuuu
Kindly review
@@ -121,179 +129,10 @@ object HiveThriftServer2 extends Logging { | |||
} | |||
} | |||
|
|||
private[thriftserver] class SessionInfo( | |||
val sessionId: String, |
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.
The code here and below are moved to HiveThriftServer2Listener.scala
class
* An inner sparkListener called in sc.stop to clean up the HiveThriftServer2 | ||
*/ | ||
private[thriftserver] class HiveThriftServer2Listener( | ||
val server: HiveServer2, |
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.
Moved to a separate file (HiveThriftserver2Listener.scala
)
ip: String, | ||
sessionId: String, | ||
userName: String, | ||
startTime: Long) extends SparkListenerEvent |
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.
New events added for Thriftserver applications. Eventually these events will be catch by the listeners EventLoggingListner
as well as HiveThriftServer2Listener`
@@ -77,7 +77,8 @@ private[hive] class SparkExecuteStatementOperation( | |||
// RDDs will be cleaned automatically upon garbage collection. | |||
logInfo(s"Close statement with $statementId") | |||
cleanup(OperationState.CLOSED) | |||
HiveThriftServer2.listener.onOperationClosed(statementId) | |||
HiveThriftServer2.listener.postLiveListenerBus(SparkListenerOperationClosed(statementId, | |||
System.currentTimeMillis())) |
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.
Changes here are below files are,
- posting the Thriftserver specific events to LiveListener Bus, so that it can get by both EvenLoggingListener (For HistoryServer) as well as HiveThriftServer2Listener (For live UI)
class HiveThriftServer2AppStatusStore( | ||
store: KVStore, | ||
val listener: Option[HiveThriftServer2Listener] = None) { | ||
|
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.
Both Live and History UI will read from this store for populating the WEBUI
Test build #113216 has finished for PR 26378 at commit
|
Test build #113217 has finished for PR 26378 at commit
|
540faf0
to
e965c5f
Compare
retest this please |
Test build #113224 has finished for PR 26378 at commit
|
Not sure which test is failing. seems all UTs are passing as per the Jenkins report. |
Test build #113225 has finished for PR 26378 at commit
|
Test build #113284 has finished for PR 26378 at commit
|
Test build #114490 has finished for PR 26378 at commit
|
...ver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/HiveThriftServer2Listener.scala
Show resolved
Hide resolved
...src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/HiveThriftServer2EventManager.scala
Outdated
Show resolved
Hide resolved
Test build #114497 has finished for PR 26378 at commit
|
Test build #114492 has finished for PR 26378 at commit
|
Test build #114495 has finished for PR 26378 at commit
|
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.
LGTM pending scalastyle.
...tserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPageSuite.scala
Outdated
Show resolved
Hide resolved
Test build #114538 has finished for PR 26378 at commit
|
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.
LGTM, thanks for the work!
@shahidki31 one more comment, I have a good idea about fixing the UI tab order. I will merge this one once this is updated. |
Yeah, that is a nice idea. Thanks @gengliangwang . I will update the code |
Test build #114558 has finished for PR 26378 at commit
|
core/src/main/scala/org/apache/spark/status/AppHistoryServerPlugin.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/org/apache/spark/status/AppHistoryServerPlugin.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLHistoryServerPlugin.scala
Outdated
Show resolved
Hide resolved
Test build #114569 has finished for PR 26378 at commit
|
retest this please |
Test build #114603 has finished for PR 26378 at commit
|
retest this please |
Test build #114625 has finished for PR 26378 at commit
|
Thanks, merging to master |
Thanks a lot @gengliangwang @juliuszsompolski @AngersZhuuuu for the reviews |
…oryServer WebUI ### What changes were proposed in this pull request? Support JDBC/ODBC tab for HistoryServer WebUI. Currently from Historyserver we can't access the JDBC/ODBC tab for thrift server applications. In this PR, I am doing 2 main changes 1. Refactor existing thrift server listener to support kvstore 2. Add history server plugin for thrift server listener and tab. ### Why are the changes needed? Users can access Thriftserver tab from History server for both running and finished applications, ### Does this PR introduce any user-facing change? Support for JDBC/ODBC tab for the WEBUI from History server ### How was this patch tested? Add UT and Manual tests 1. Start Thriftserver and Historyserver ``` sbin/stop-thriftserver.sh sbin/stop-historyserver.sh sbin/start-thriftserver.sh sbin/start-historyserver.sh ``` 2. Launch beeline `bin/beeline -u jdbc:hive2://localhost:10000` 3. Run queries Go to the JDBC/ODBC page of the WebUI from History server  Closes apache#26378 from shahidki31/ThriftKVStore. Authored-by: shahid <shahidki31@gmail.com> Signed-off-by: Gengliang Wang <gengliang.wang@databricks.com>
What changes were proposed in this pull request?
Support JDBC/ODBC tab for HistoryServer WebUI. Currently from Historyserver we can't access the JDBC/ODBC tab for thrift server applications. In this PR, I am doing 2 main changes
Why are the changes needed?
Users can access Thriftserver tab from History server for both running and finished applications,
Does this PR introduce any user-facing change?
Support for JDBC/ODBC tab for the WEBUI from History server
How was this patch tested?
Add UT and Manual tests
Launch beeline
bin/beeline -u jdbc:hive2://localhost:10000
Run queries
Go to the JDBC/ODBC page of the WebUI from History server