cxzl25 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_r284113955
 
 

 ##########
 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:
   HiveThriftServer2 inherits HiveServer2, and HiveServer2 does not currently 
have the addServerInstanceToZooKeeper method.
   Call getDeclaredMethod("addServerInstanceToZooKeeper") directly, will not 
throw NoSuchMethodException now?

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