diff options
author | ArcherShao <ArcherShao@users.noreply.github.com> | 2015-03-14 08:27:18 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-03-14 08:28:54 +0000 |
commit | ee15404a2b0009fc70119ac7af69137b54890d48 (patch) | |
tree | 484f0a5757c0e5c40f59568f035084e0c5def4e5 /sql/hive-thriftserver/src | |
parent | b38e073fee794188d5267f1812b095e51874839e (diff) | |
download | spark-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.scala | 12 |
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) } |