aboutsummaryrefslogtreecommitdiff
path: root/sql/hive-thriftserver/src
diff options
context:
space:
mode:
authorArcherShao <ArcherShao@users.noreply.github.com>2015-03-14 08:27:18 +0000
committerSean Owen <sowen@cloudera.com>2015-03-14 08:28:54 +0000
commitee15404a2b0009fc70119ac7af69137b54890d48 (patch)
tree484f0a5757c0e5c40f59568f035084e0c5def4e5 /sql/hive-thriftserver/src
parentb38e073fee794188d5267f1812b095e51874839e (diff)
downloadspark-ee15404a2b0009fc70119ac7af69137b54890d48.tar.gz
spark-ee15404a2b0009fc70119ac7af69137b54890d48.tar.bz2
spark-ee15404a2b0009fc70119ac7af69137b54890d48.zip
[SQL]Delete some dupliate code in HiveThriftServer2
Author: ArcherShao <ArcherShao@users.noreply.github.com> Author: ArcherShao <shaochuan@huawei.com> Closes #5007 from ArcherShao/20150313 and squashes the following commits: ae422ae [ArcherShao] Updated 459efbd [ArcherShao] [SQL]Delete some dupliate code in HiveThriftServer2
Diffstat (limited to 'sql/hive-thriftserver/src')
-rw-r--r--sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala12
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
index 6e07df18b0..c3a3f8c0f4 100644
--- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
+++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
@@ -98,16 +98,14 @@ 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)
}