diff --git hbase-handler/ivy.xml hbase-handler/ivy.xml
index 8d48361..beb7295 100644
--- hbase-handler/ivy.xml
+++ hbase-handler/ivy.xml
@@ -44,6 +44,8 @@
transitive="false"/>
+
+
diff --git hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
index 36ee9a5..e0918b0 100644
--- hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
+++ hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
@@ -37,7 +37,6 @@
import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.mapred.JobConf;
import org.apache.zookeeper.Watcher;
@@ -49,7 +48,6 @@
public class HBaseTestSetup extends TestSetup {
private MiniHBaseCluster hbaseCluster;
- private MiniZooKeeperCluster zooKeeperCluster;
private int zooKeeperPort;
private String hbaseRoot;
@@ -60,32 +58,36 @@ public HBaseTestSetup(Test test) {
}
void preTest(HiveConf conf) throws Exception {
- if (hbaseCluster == null) {
- // We set up fixtures on demand for the first testcase, and leave
- // them allocated for reuse across all others. Then tearDown
- // will get called once at the very end after all testcases have
- // run, giving us a guaranteed opportunity to shut them down.
- setUpFixtures(conf);
- }
+
+ setUpFixtures(conf);
+
conf.set("hbase.rootdir", hbaseRoot);
conf.set("hbase.master", hbaseCluster.getMaster().getServerName().getHostAndPort());
conf.set("hbase.zookeeper.property.clientPort", Integer.toString(zooKeeperPort));
String auxJars = conf.getAuxJars();
- auxJars = ((auxJars == null) ? "" : (auxJars + ",")) + "file://"
+ auxJars = ((auxJars == null) ? "" : (auxJars + ",")) + "file:///"
+ new JobConf(conf, HBaseConfiguration.class).getJar();
- auxJars += ",file://" + new JobConf(conf, HBaseSerDe.class).getJar();
- auxJars += ",file://" + new JobConf(conf, Watcher.class).getJar();
+ auxJars += ",file:///" + new JobConf(conf, HBaseSerDe.class).getJar();
+ auxJars += ",file:///" + new JobConf(conf, Watcher.class).getJar();
conf.setAuxJars(auxJars);
}
private void setUpFixtures(HiveConf conf) throws Exception {
- conf.set("hbase.master", "local");
+ /* We are not starting zookeeper server here because
+ * QTestUtil already starts it.
+ */
+ int zkPort = conf.getInt("hive.zookeeper.client.port", -1);
+ if ((zkPort == zooKeeperPort) && (hbaseCluster != null)) {
+ return;
+ }
+ zooKeeperPort = zkPort;
String tmpdir = System.getProperty("user.dir")+"/../build/ql/tmp";
- hbaseRoot = "file://" + tmpdir + "/hbase";
+ this.tearDown();
+ conf.set("hbase.master", "local");
+
+ hbaseRoot = "file:///" + tmpdir + "/hbase";
conf.set("hbase.rootdir", hbaseRoot);
- zooKeeperCluster = new MiniZooKeeperCluster();
- zooKeeperPort = zooKeeperCluster.startup(
- new File(tmpdir, "zookeeper"));
+
conf.set("hbase.zookeeper.property.clientPort",
Integer.toString(zooKeeperPort));
Configuration hbaseConf = HBaseConfiguration.create(conf);
@@ -155,9 +157,5 @@ protected void tearDown() throws Exception {
hbaseCluster.shutdown();
hbaseCluster = null;
}
- if (zooKeeperCluster != null) {
- zooKeeperCluster.shutdown();
- zooKeeperCluster = null;
- }
}
}
diff --git ivy/libraries.properties ivy/libraries.properties
index 8f4949b..1edabc4 100644
--- ivy/libraries.properties
+++ ivy/libraries.properties
@@ -44,7 +44,7 @@ commons-pool.version=1.5.4
derby.version=10.4.2.0
guava-hadoop20.version=r09
guava-hadoop23.version=11.0.2
-hbase.version=0.92.0
+hbase.version=0.94.2
jackson.version=1.8.8
javaewah.version=0.3.2
jdo-api.version=2.3-ec
@@ -64,6 +64,8 @@ rat.version=0.8
slf4j-api.version=1.6.1
slf4j-log4j12.version=1.6.1
velocity.version=1.5
+protobuf-java.version=2.4.0a
+metrics-core.version=2.1.2
zookeeper.version=3.4.3
javolution.version=5.5.1
stringtemplate.version=3.1-b1