Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/3672#discussion_r21662905
--- Diff:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
---
@@ -85,10 +86,22 @@ private[hive] class HiveThriftServer2(hiveContext:
HiveContext)
setSuperField(this, "cliService", sparkSqlCliService)
addService(sparkSqlCliService)
- val thriftCliService = new ThriftBinaryCLIService(sparkSqlCliService)
- setSuperField(this, "thriftCLIService", thriftCliService)
- addService(thriftCliService)
+ if (isHTTPTransportMode(hiveConf)){
+ val thriftCliService = new ThriftHttpCLIService(sparkSqlCliService)
+ setSuperField(this, "thriftCLIService", thriftCliService)
+ addService(thriftCliService)
+ } else {
+ val thriftCliService = new ThriftBinaryCLIService(sparkSqlCliService)
+ setSuperField(this, "thriftCLIService", thriftCliService)
+ addService(thriftCliService)
+ }
initCompositeService(hiveConf)
}
+
+ private def isHTTPTransportMode(hiveConf: HiveConf): Boolean = {
+ val transportMode: String =
hiveConf.getVar(ConfVars.HIVE_SERVER2_TRANSPORT_MODE)
+ return transportMode.equalsIgnoreCase("http")
--- End diff --
In Scala we don't need `return` here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]