You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/15 06:52:35 UTC

[GitHub] [spark] beliefer commented on a change in pull request #24575: [SPARK-27670][SQL]Add HA for HiveThriftServer2 based on HiveServer2.

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_r284108565
 
 

 ##########
 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:
   Because HiveThriftServer2 not support HA based on Hive, so SPARK-11100 occurs.
   I have investigated the `addServerInstanceToZooKeeper` method in Hive,it was supported from version 0.14.0 to version 3.1.1

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org