yaooqinn commented on a change in pull request #28651:
URL: https://github.com/apache/spark/pull/28651#discussion_r435919651
##########
File path:
sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
##########
@@ -144,6 +144,9 @@ public void run() {
// TODO: check defaults: maxTimeout, keepalive, maxBodySize,
bodyRecieveDuration, etc.
// Finally, start the server
httpServer.start();
+ // In case HIVE_SERVER2_THRIFT_HTTP_PORT or
hive.server2.thrift.http.port is configured with
+ // 0 which represents any free port, we should set it to the actual one
+ portNum = connector.getLocalPort();
Review comment:
```
kentyao@hulk ~/Downloads/spark/spark-3.1.0-SNAPSHOT-bin-20200601
sbin/start-thriftserver.sh --conf spark.hadoop.hive.server2.thrift.http.port=0
--conf spark.hadoop.hive.server2.transport.mode=http
starting org.apache.spark.sql.hive.thriftserver.HiveThriftServer2, logging
to
/Users/kentyao/Downloads/spark/spark-3.1.0-SNAPSHOT-bin-20200601/logs/spark-kentyao-org.apache.spark.sql.hive.thriftserver.HiveThriftServer2-1-hulk.local.out
kentyao@hulk ~/Downloads/spark/spark-3.1.0-SNAPSHOT-bin-20200601 tail -f
-2
/Users/kentyao/Downloads/spark/spark-3.1.0-SNAPSHOT-bin-20200601/logs/spark-kentyao-org.apache.spark.sql.hive.thriftserver.HiveThriftServer2-1-hulk.local.out
20/06/05 21:26:20 INFO HiveThriftServer2: HiveThriftServer2 started
20/06/05 21:26:20 INFO ThriftCLIService: Started ThriftHttpCLIService in
http mode on port 54379 path=/cliservice/* with 5...500 worker threads
```
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]