juliuszsompolski commented on a change in pull request #25868:
[SPARK-28527][SQL][TEST] Enable ThriftServerQueryTestSuite
URL: https://github.com/apache/spark/pull/25868#discussion_r336547599
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala
##########
@@ -65,10 +67,19 @@ class ThriftServerQueryTestSuite extends SQLQueryTestSuite
{
logInfo("HiveThriftServer2 started successfully")
}
- override def afterEach(): Unit = {
- hiveServer2.stop()
+ override def afterAll(): Unit = {
+ try {
+ hiveServer2.stop()
+ } finally {
+ super.afterAll()
+ }
}
+ override def sparkConf: SparkConf = super.sparkConf
+ // Hive Thrift server should not executes SQL queries in an asynchronous
way
+ // because we may set session configuration.
+ .set(HiveUtils.HIVE_THRIFT_SERVER_ASYNC, false)
Review comment:
With `HiveUtils.HIVE_THRIFT_SERVER_ASYNC` enabled the Thriftserver will
still execute queries one by one. The difference is that it will not block the
request:
- With HIVE_THRIFT_SERVER_ASYNC=false client sends a query in an
TExecuteStatementReq. The query executes, and only after it finishes the server
responds with a TExecuteStatementResp. Then the client calls
TGetOperationStatusReq to see if the result was a success or failure, and then
potentially continues fetching results...
- With HIVE_THRIFT_SERVER_ASYNC=true client sends a query in an
TExecuteStatementReq, and the server starts it in a background thread and
immediately returns a handle in the response. Then the client periodically
polls with TGetOperationStatusReq until the query is finished, an then
potentailly continues fetching results...
In both cases, the Hive JDBC driver executes one query at once and there is
no concurrency.
I think this setting does not need to be set.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]