Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5007#discussion_r26383232
  
    --- Diff: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
 ---
    @@ -98,22 +98,20 @@ private[hive] class HiveThriftServer2(hiveContext: 
HiveContext)
         setSuperField(this, "cliService", sparkSqlCliService)
         addService(sparkSqlCliService)
     
    -    if (isHTTPTransportMode(hiveConf)) {
    -      val thriftCliService = new ThriftHttpCLIService(sparkSqlCliService)
    -      setSuperField(this, "thriftCLIService", thriftCliService)
    -      addService(thriftCliService)
    +    val thriftCliService = if (isHTTPTransportMode(hiveConf)){
    +      new ThriftHttpCLIService(sparkSqlCliService)
         } else {
    -      val thriftCliService = new ThriftBinaryCLIService(sparkSqlCliService)
    -      setSuperField(this, "thriftCLIService", thriftCliService)
    -      addService(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)
    -    transportMode.equalsIgnoreCase("http")
    +    transportMode.toLowerCase().equals("http")
    --- End diff --
    
    Seems OK to me but this change is not necessary.


---
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]

Reply via email to