You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/05/27 08:42:52 UTC
[GitHub] [spark] yaooqinn commented on a change in pull request #28651: [SPARK-31833][SQL][test-hive1.2] Set HiveThriftServer2 with actual port while configured 0
yaooqinn commented on a change in pull request #28651:
URL: https://github.com/apache/spark/pull/28651#discussion_r430953790
##########
File path: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SharedThriftServer.scala
##########
@@ -73,11 +68,17 @@ trait SharedThriftServer extends SharedSparkSession {
}
}
- private def startThriftServer(port: Int, attempt: Int): Unit = {
- logInfo(s"Trying to start HiveThriftServer2: port=$port, attempt=$attempt")
+ private def startThriftServer(attempt: Int): Unit = {
+ logInfo(s"Trying to start HiveThriftServer2:, attempt=$attempt")
val sqlContext = spark.newSession().sqlContext
- sqlContext.setConf(ConfVars.HIVE_SERVER2_THRIFT_PORT.varname, port.toString)
+ sqlContext.setConf(ConfVars.HIVE_SERVER2_THRIFT_PORT.varname, 0.toString)
Review comment:
Yes, it's based on `java.net.ServerSocket` to get the listening port. You can also see this behavior in the PR description
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org