beliefer commented on a change in pull request #24575: [SPARK-27670][SQL]Add HA 
for HiveThriftServer2 based on HiveServer2.
URL: https://github.com/apache/spark/pull/24575#discussion_r284168647
 
 

 ##########
 File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
 ##########
 @@ -107,6 +109,25 @@ object HiveThriftServer2 extends Logging {
       } else {
         None
       }
+
+      // HiveThriftServer2 HA
+      val metaVersion = IsolatedClientLoader.hiveVersion(
+          
SparkSQLEnv.sqlContext.conf.getConf(HiveUtils.HIVE_METASTORE_VERSION))
+      metaVersion match {
+        case hive.v12 | hive.v13 =>
+          logWarning("HiveThriftServer2 HA is compatible with Hive metastore 
version is " +
+              "0.14.0 or higher.")
+        case _ =>
+          if (executionHive.conf.getBoolVar(
+            ConfVars.HIVE_SERVER2_SUPPORT_DYNAMIC_SERVICE_DISCOVERY)) {
+            val method = server.getClass.getSuperclass.getDeclaredMethod(
+                "addServerInstanceToZooKeeper",
 
 Review comment:
   OK. You said is correct based on HiveServer2 that contains by 
`hive-thriftserver` module.
   There exists issue as follows:
   First,why the `hive-thriftserver` module copy the code about `HiveServer2` 
from https://github.com/apache/hive?
   Second, every company uses different Hive version. For example,my company 
uses Hive contains 1.2.1 and 2.X.So we first uses our Hive library instead of 
`hive-thriftserver` module carrying.
   Third,SPARK-15004 looks arbitrary and not enough discussed.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to