This is an automated email from the ASF dual-hosted git repository.

ngangam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new c660cba  HIVE-22205: Upgrade Zookeeper and Curator libraries in Hive. 
(Naveen Gangam, reviewed by Sam An)
c660cba is described below

commit c660cba003f9b7fff29db2202b375982a8c03450
Author: Naveen Gangam <[email protected]>
AuthorDate: Wed Sep 25 21:34:19 2019 -0400

    HIVE-22205: Upgrade Zookeeper and Curator libraries in Hive. (Naveen 
Gangam, reviewed by Sam An)
---
 accumulo-handler/pom.xml                           |  7 ++
 itests/hcatalog-unit/pom.xml                       |  7 ++
 .../hive/hcatalog/hbase/ManyMiniCluster.java       |  2 +-
 .../security/TestZooKeeperTokenStore.java          |  2 +-
 .../server/TestInformationSchemaWithPrivilege.java |  2 +-
 itests/qtest-accumulo/pom.xml                      | 87 +++++++++++++++++-----
 itests/qtest/pom.xml                               |  7 ++
 .../hadoop/hive/accumulo/AccumuloTestSetup.java    | 30 ++++++++
 .../org/apache/hadoop/hive/llap/LlapItUtils.java   |  2 +-
 .../apache/hadoop/hive/ql/QTestMiniClusters.java   |  2 +-
 kafka-handler/pom.xml                              |  4 +-
 .../impl/TestLlapZookeeperRegistryImpl.java        |  1 +
 llap-server/pom.xml                                |  7 ++
 .../hadoop/hive/llap/daemon/MiniLlapCluster.java   |  2 +-
 pom.xml                                            | 46 +++++++++++-
 .../apache/hadoop/hive/ql/exec/tez/TestUtils.java  |  4 +-
 .../hive/testutils/MiniZooKeeperCluster.java       |  6 +-
 standalone-metastore/metastore-common/pom.xml      | 41 ++++++++++
 standalone-metastore/metastore-server/pom.xml      |  4 +
 .../metastore-tools/metastore-benchmarks/pom.xml   | 28 +++++++
 standalone-metastore/metastore-tools/pom.xml       | 28 +++++++
 standalone-metastore/pom.xml                       | 25 ++++++-
 storage-api/pom.xml                                | 16 ++++
 upgrade-acid/pre-upgrade/pom.xml                   | 42 +++++++++++
 24 files changed, 367 insertions(+), 35 deletions(-)

diff --git a/accumulo-handler/pom.xml b/accumulo-handler/pom.xml
index 1c18daf..79fc809 100644
--- a/accumulo-handler/pom.xml
+++ b/accumulo-handler/pom.xml
@@ -145,6 +145,13 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/itests/hcatalog-unit/pom.xml b/itests/hcatalog-unit/pom.xml
index 28c9b6d..ad59ebb 100644
--- a/itests/hcatalog-unit/pom.xml
+++ b/itests/hcatalog-unit/pom.xml
@@ -331,6 +331,13 @@
       <version>2.2</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git 
a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java
 
b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java
index 0a90bc4..fc3d500 100644
--- 
a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java
+++ 
b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java
@@ -29,12 +29,12 @@ import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.client.Table;
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.MiniMRCluster;
+import org.apache.hive.testutils.MiniZooKeeperCluster;
 
 import java.io.File;
 import java.io.IOException;
diff --git 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/security/TestZooKeeperTokenStore.java
 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/security/TestZooKeeperTokenStore.java
index 0b4f2bc..603155b 100644
--- 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/security/TestZooKeeperTokenStore.java
+++ 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/security/TestZooKeeperTokenStore.java
@@ -28,12 +28,12 @@ import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.ExponentialBackoffRetry;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
 import 
org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge.Server.ServerMode;
 import org.apache.hadoop.hive.metastore.security.ZooKeeperTokenStore;
 import org.apache.hadoop.io.Text;
 import 
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation;
 import org.apache.hadoop.security.token.delegation.HiveDelegationTokenSupport;
+import org.apache.hive.testutils.MiniZooKeeperCluster;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.data.ACL;
 import org.junit.Assert;
diff --git 
a/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
 
b/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
index 18b0b13..de2e493 100644
--- 
a/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
+++ 
b/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
@@ -25,7 +25,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
+import org.apache.hive.testutils.MiniZooKeeperCluster;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
diff --git a/itests/qtest-accumulo/pom.xml b/itests/qtest-accumulo/pom.xml
index abfb5cb..49ae58b 100644
--- a/itests/qtest-accumulo/pom.xml
+++ b/itests/qtest-accumulo/pom.xml
@@ -133,6 +133,13 @@
       <scope>test</scope>
       <classifier>tests</classifier>
     </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
     <!-- inter-project -->
     <dependency>
       <groupId>junit</groupId>
@@ -177,34 +184,74 @@
       <artifactId>hadoop-common</artifactId>
       <version>${hadoop.version}</version>
       <scope>test</scope>
-        <exclusions>
-             <exclusion>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-          </exclusion>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.zookeeper</groupId>
+          <artifactId>zookeeper</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-test</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-client</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-recipes</artifactId>
+        </exclusion>
       </exclusions>
-   </dependency>
+    </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-common</artifactId>
       <version>${hadoop.version}</version>
       <classifier>tests</classifier>
       <scope>test</scope>
-         <exclusions>
-             <exclusion>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-          </exclusion>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.zookeeper</groupId>
+          <artifactId>zookeeper</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-test</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-client</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-recipes</artifactId>
+        </exclusion>
       </exclusions>
-  </dependency>
+    </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-hdfs</artifactId>
diff --git a/itests/qtest/pom.xml b/itests/qtest/pom.xml
index e19a1b2..07660d4 100644
--- a/itests/qtest/pom.xml
+++ b/itests/qtest/pom.xml
@@ -157,6 +157,13 @@
 
     <!-- test inter-project -->
     <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>${junit.version}</version>
diff --git 
a/itests/util/src/main/java/org/apache/hadoop/hive/accumulo/AccumuloTestSetup.java
 
b/itests/util/src/main/java/org/apache/hadoop/hive/accumulo/AccumuloTestSetup.java
index 4e24e15..343eb42 100644
--- 
a/itests/util/src/main/java/org/apache/hadoop/hive/accumulo/AccumuloTestSetup.java
+++ 
b/itests/util/src/main/java/org/apache/hadoop/hive/accumulo/AccumuloTestSetup.java
@@ -16,7 +16,12 @@
  */
 package org.apache.hadoop.hive.accumulo;
 
+import java.io.BufferedWriter;
 import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.List;
 import java.sql.Date;
 import java.sql.Timestamp;
 
@@ -43,6 +48,10 @@ public class AccumuloTestSetup extends 
QTestMiniClusters.QTestSetup {
 
   public static final String PASSWORD = "password";
   public static final String TABLE_NAME = "accumuloHiveTable";
+  public static final List<String> EXTRA_ZOOKEEPER_CONFIG = Arrays.asList(
+    "4lw.commands.whitelist=*",
+    "admin.enableServer=false"
+  );
 
   private MiniAccumuloCluster miniCluster;
 
@@ -68,6 +77,7 @@ public class AccumuloTestSetup extends 
QTestMiniClusters.QTestSetup {
       cfg.setNumTservers(1);
 
       miniCluster = new MiniAccumuloCluster(cfg);
+      appendZooKeeperConf(EXTRA_ZOOKEEPER_CONFIG, tmpDir);
       miniCluster.start();
 
       createAccumuloTable(miniCluster.getConnector("root", PASSWORD));
@@ -77,6 +87,26 @@ public class AccumuloTestSetup extends 
QTestMiniClusters.QTestSetup {
   }
 
   /**
+   * Update ZooKeeper config file with the provided lines
+   *
+   * (unfortunately Accumulo Mini Cluster does not allow to customize the 
ZooKeeper config
+   * or to add additional system properties for the JVM of ZooKeeper, so we 
have to append the
+   * ZooKeeper config file directly)
+   */
+  private void appendZooKeeperConf(List<String> newLines, File tmpDir) throws 
Exception {
+    try (FileWriter f = new 
FileWriter(tmpDir.getAbsolutePath()+"/conf/zoo.cfg", true);
+         BufferedWriter b = new BufferedWriter(f);
+         PrintWriter p = new PrintWriter(b);) {
+
+      p.println("");
+      for(String line : newLines) {
+        p.println(line);
+
+      }
+    }
+  }
+
+  /**
    * Update hiveConf with the Accumulo specific parameters
    * @param conf The hiveconf to update
    */
diff --git 
a/itests/util/src/main/java/org/apache/hadoop/hive/llap/LlapItUtils.java 
b/itests/util/src/main/java/org/apache/hadoop/hive/llap/LlapItUtils.java
index 9d0ffd8..3f8b766 100644
--- a/itests/util/src/main/java/org/apache/hadoop/hive/llap/LlapItUtils.java
+++ b/itests/util/src/main/java/org/apache/hadoop/hive/llap/LlapItUtils.java
@@ -25,7 +25,7 @@ import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
+import org.apache.hive.testutils.MiniZooKeeperCluster;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.llap.configuration.LlapDaemonConfiguration;
 import org.apache.hadoop.hive.llap.daemon.MiniLlapCluster;
diff --git 
a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMiniClusters.java 
b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMiniClusters.java
index f8b7e29..997b35e 100644
--- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMiniClusters.java
+++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMiniClusters.java
@@ -41,7 +41,6 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
 import org.apache.hadoop.hive.cli.CliSessionState;
 import org.apache.hadoop.hive.cli.control.AbstractCliConfig;
 import org.apache.hadoop.hive.conf.HiveConf;
@@ -62,6 +61,7 @@ import 
org.apache.hadoop.hive.shims.HadoopShims.HdfsErasureCodingShim;
 import org.apache.hive.druid.MiniDruidCluster;
 import org.apache.hive.kafka.SingleNodeKafkaCluster;
 import org.apache.hive.kafka.Wikipedia;
+import org.apache.hive.testutils.MiniZooKeeperCluster;
 import org.apache.logging.log4j.util.Strings;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
diff --git a/kafka-handler/pom.xml b/kafka-handler/pom.xml
index 02f5a27..6c82f82 100644
--- a/kafka-handler/pom.xml
+++ b/kafka-handler/pom.xml
@@ -110,7 +110,7 @@
     <dependency>
       <groupId>org.apache.zookeeper</groupId>
       <artifactId>zookeeper</artifactId>
-      <version>3.4.7</version>
+      <version>3.5.5</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -192,4 +192,4 @@
       </plugin>
     </plugins>
   </build>
-</project>
\ No newline at end of file
+</project>
diff --git 
a/llap-client/src/test/org/apache/hadoop/hive/llap/registry/impl/TestLlapZookeeperRegistryImpl.java
 
b/llap-client/src/test/org/apache/hadoop/hive/llap/registry/impl/TestLlapZookeeperRegistryImpl.java
index ef62b26..7e3c208 100644
--- 
a/llap-client/src/test/org/apache/hadoop/hive/llap/registry/impl/TestLlapZookeeperRegistryImpl.java
+++ 
b/llap-client/src/test/org/apache/hadoop/hive/llap/registry/impl/TestLlapZookeeperRegistryImpl.java
@@ -50,6 +50,7 @@ public class TestLlapZookeeperRegistryImpl {
 
   @Before
   public void setUp() throws Exception {
+    hiveConf.set(HiveConf.ConfVars.HIVE_ZOOKEEPER_QUORUM.varname, "localhost");
     registry = new LlapZookeeperRegistryImpl("TestLlapZookeeperRegistryImpl", 
hiveConf);
 
     server = new TestingServer();
diff --git a/llap-server/pom.xml b/llap-server/pom.xml
index 2a9a9f1..231aa2d 100644
--- a/llap-server/pom.xml
+++ b/llap-server/pom.xml
@@ -242,6 +242,13 @@
     </dependency>
     <dependency>
       <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
       <artifactId>hive-standalone-metastore-common</artifactId>
       <version>${project.version}</version>
       <type>test-jar</type>
diff --git 
a/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/MiniLlapCluster.java 
b/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/MiniLlapCluster.java
index 6af230e..be51bf8 100644
--- 
a/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/MiniLlapCluster.java
+++ 
b/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/MiniLlapCluster.java
@@ -19,7 +19,6 @@ import javax.annotation.Nullable;
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -34,6 +33,7 @@ import org.apache.hadoop.service.AbstractService;
 import org.apache.hadoop.service.Service;
 import org.apache.hadoop.util.Shell;
 import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
+import org.apache.hive.testutils.MiniZooKeeperCluster;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 
 import com.google.common.base.Preconditions;
diff --git a/pom.xml b/pom.xml
index e061f64..351df44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -213,10 +213,10 @@
     <wadl-resourcedoc-doclet.version>1.4</wadl-resourcedoc-doclet.version>
     <velocity.version>1.5</velocity.version>
     <xerces.version>2.9.1</xerces.version>
-    <zookeeper.version>3.4.6</zookeeper.version>
+    <zookeeper.version>3.5.5</zookeeper.version>
     <jpam.version>1.1</jpam.version>
     <felix.version>2.4.0</felix.version>
-    <curator.version>2.12.0</curator.version>
+    <curator.version>4.2.0</curator.version>
     <jsr305.version>3.0.0</jsr305.version>
     <tephra.version>0.6.0</tephra.version>
     <gson.version>2.2.4</gson.version>
@@ -509,6 +509,20 @@
         <groupId>org.apache.hive</groupId>
         <artifactId>hive-storage-api</artifactId>
         <version>${storage-api.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-client</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-recipes</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.apache.pig</groupId>
@@ -703,6 +717,18 @@
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+          </exclusion>
          </exclusions>
       </dependency>
       <dependency>
@@ -726,6 +752,22 @@
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-client</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-recipes</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/tez/TestUtils.java 
b/ql/src/test/org/apache/hadoop/hive/ql/exec/tez/TestUtils.java
index b001d02..d0425e5 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/exec/tez/TestUtils.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/tez/TestUtils.java
@@ -86,7 +86,9 @@ public class TestUtils {
     LlapServiceInstance inactive = new InactiveServiceInstance(INACTIVE);
     instances.add(inactive);
 
-    LlapZookeeperRegistryImpl dynRegistry = new 
LlapZookeeperRegistryImpl("dyn", new HiveConf());
+    HiveConf conf = new HiveConf();
+    conf.set(HiveConf.ConfVars.HIVE_ZOOKEEPER_QUORUM.varname, "localhost");
+    LlapZookeeperRegistryImpl dynRegistry = new 
LlapZookeeperRegistryImpl("dyn", conf);
     Endpoint rpcEndpoint = RegistryTypeUtils.ipcEndpoint("llap", new 
InetSocketAddress(ACTIVE, 4000));
     Endpoint shuffle = RegistryTypeUtils.ipcEndpoint("shuffle", new 
InetSocketAddress(ACTIVE, 4000));
     Endpoint mng = RegistryTypeUtils.ipcEndpoint("llapmng", new 
InetSocketAddress(ACTIVE, 4000));
diff --git a/ql/src/test/org/apache/hive/testutils/MiniZooKeeperCluster.java 
b/ql/src/test/org/apache/hive/testutils/MiniZooKeeperCluster.java
index 646c1c1..eec6282 100644
--- a/ql/src/test/org/apache/hive/testutils/MiniZooKeeperCluster.java
+++ b/ql/src/test/org/apache/hive/testutils/MiniZooKeeperCluster.java
@@ -49,7 +49,7 @@ import com.google.common.annotations.VisibleForTesting;
  *
  *XXX: copied from the only used class by qtestutil from hbase-tests
  */
-class MiniZooKeeperCluster {
+public class MiniZooKeeperCluster {
   private static final Logger LOG = 
LoggerFactory.getLogger(MiniZooKeeperCluster.class);
 
   private static final int TICK_TIME = 2000;
@@ -384,7 +384,7 @@ class MiniZooKeeperCluster {
   }
 
   // XXX: From o.a.zk.t.ClientBase
-  private static boolean waitForServerDown(int port, long timeout) throws 
IOException {
+  public static boolean waitForServerDown(int port, long timeout) throws 
IOException {
     long start = System.currentTimeMillis();
     while (true) {
       try {
@@ -413,7 +413,7 @@ class MiniZooKeeperCluster {
   }
 
   // XXX: From o.a.zk.t.ClientBase
-  private static boolean waitForServerUp(int port, long timeout) throws 
IOException {
+  public static boolean waitForServerUp(int port, long timeout) throws 
IOException {
     long start = System.currentTimeMillis();
     while (true) {
       try {
diff --git a/standalone-metastore/metastore-common/pom.xml 
b/standalone-metastore/metastore-common/pom.xml
index 6679053..95e53b9 100644
--- a/standalone-metastore/metastore-common/pom.xml
+++ b/standalone-metastore/metastore-common/pom.xml
@@ -113,6 +113,10 @@
           <groupId>commons-logging</groupId>
           <artifactId>commons-logging</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-framework</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
@@ -194,6 +198,43 @@
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.zookeeper</groupId>
+      <artifactId>zookeeper</artifactId>
+      <version>${zookeeper.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpcore</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpclient</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.curator</groupId>
+      <artifactId>curator-recipes</artifactId>
+      <version>${curator.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.curator</groupId>
+      <artifactId>curator-framework</artifactId>
+      <version>${curator.version}</version>
+    </dependency>
     <!-- test scope dependencies -->
 
     <dependency>
diff --git a/standalone-metastore/metastore-server/pom.xml 
b/standalone-metastore/metastore-server/pom.xml
index b8e3f31..0ff1b32 100644
--- a/standalone-metastore/metastore-server/pom.xml
+++ b/standalone-metastore/metastore-server/pom.xml
@@ -119,6 +119,10 @@
           <groupId>commons-logging</groupId>
           <artifactId>commons-logging</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-framework</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
diff --git a/standalone-metastore/metastore-tools/metastore-benchmarks/pom.xml 
b/standalone-metastore/metastore-tools/metastore-benchmarks/pom.xml
index f54b161..59b61e1 100644
--- a/standalone-metastore/metastore-tools/metastore-benchmarks/pom.xml
+++ b/standalone-metastore/metastore-tools/metastore-benchmarks/pom.xml
@@ -37,10 +37,38 @@
       <artifactId>metastore-tools-common</artifactId>
       <version>${hive.version}</version>
       <scope>compile</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.zookeeper</groupId>
+          <artifactId>zookeeper</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-client</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.hive.hcatalog</groupId>
       <artifactId>hive-hcatalog-server-extensions</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.zookeeper</groupId>
+          <artifactId>zookeeper</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-client</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-recipes</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
     <dependency>
diff --git a/standalone-metastore/metastore-tools/pom.xml 
b/standalone-metastore/metastore-tools/pom.xml
index fd24987..63f2369 100644
--- a/standalone-metastore/metastore-tools/pom.xml
+++ b/standalone-metastore/metastore-tools/pom.xml
@@ -54,11 +54,39 @@
         <groupId>org.apache.hive.hcatalog</groupId>
         <artifactId>hive-hcatalog-server-extensions</artifactId>
         <version>${hive.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-client</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-recipes</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.apache.hive</groupId>
         <artifactId>hive-common</artifactId>
         <version>${hive.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-client</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.apache.hive</groupId>
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index c0c1536..3de774a 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -94,7 +94,8 @@
     <sqlline.version>1.3.0</sqlline.version>
     <storage-api.version>2.7.0-SNAPSHOT</storage-api.version>
     <hamcrest.version>1.3</hamcrest.version>
-    <curator.version>2.12.0</curator.version>
+    <curator.version>4.2.0</curator.version>
+    <zookeeper.version>3.5.5</zookeeper.version>
 
     <!-- Thrift properties -->
     <thrift.home>you-must-set-this-to-run-thrift</thrift.home>
@@ -186,6 +187,28 @@
         <groupId>org.apache.hadoop</groupId>
         <artifactId>hadoop-common</artifactId>
         <version>${hadoop.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-client</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-recipes</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.apache.hadoop</groupId>
diff --git a/storage-api/pom.xml b/storage-api/pom.xml
index 2f180a4..bb1ec1f 100644
--- a/storage-api/pom.xml
+++ b/storage-api/pom.xml
@@ -89,6 +89,22 @@
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-log4j12</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>org.apache.zookeeper</groupId>
+          <artifactId>zookeeper</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-client</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.curator</groupId>
+          <artifactId>curator-recipes</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
diff --git a/upgrade-acid/pre-upgrade/pom.xml b/upgrade-acid/pre-upgrade/pom.xml
index 818487a..3abe596 100644
--- a/upgrade-acid/pre-upgrade/pom.xml
+++ b/upgrade-acid/pre-upgrade/pom.xml
@@ -71,6 +71,14 @@
                 <groupId>tomcat</groupId>
                 <artifactId>jasper-runtime</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>org.apache.zookeeper</groupId>
+                <artifactId>zookeeper</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.curator</groupId>
+                <artifactId>curator-framework</artifactId>
+              </exclusion>
             </exclusions>
         </dependency>
         <dependency>
@@ -78,12 +86,40 @@
             <artifactId>hive-exec</artifactId>
             <version>${hdp.hive.version}</version>
             <scope>provided</scope>
+            <exclusions>
+              <exclusion>
+                <groupId>org.apache.zookeeper</groupId>
+                <artifactId>zookeeper</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.curator</groupId>
+                <artifactId>curator-framework</artifactId>
+              </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-common</artifactId>
             <version>${hdp.hadoop.version}</version>
             <scope>provided</scope>
+            <exclusions>
+              <exclusion>
+                <groupId>org.apache.zookeeper</groupId>
+                <artifactId>zookeeper</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.curator</groupId>
+                <artifactId>curator-client</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.curator</groupId>
+                <artifactId>curator-recipes</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.curator</groupId>
+                <artifactId>curator-framework</artifactId>
+              </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <!-- w/o this we get this, even though 
mapreduce.framework.name=mapred.job.tracker=local
@@ -111,6 +147,12 @@ java.io.IOException: Cannot initialize Cluster. Please 
check your configuration
             <artifactId>hadoop-mapreduce-client-common</artifactId>
             <version>2.7.2</version>
             <scope>provided</scope>
+            <exclusions>
+              <exclusion>
+                <groupId>org.apache.zookeeper</groupId>
+                <artifactId>zookeeper</artifactId>
+              </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.orc</groupId>

Reply via email to