hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1471696 - in /hive/branches/branch-0.11: hbase-handler/ivy.xml hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java ivy/libraries.properties
Date Wed, 24 Apr 2013 21:34:40 GMT
Author: hashutosh
Date: Wed Apr 24 21:34:39 2013
New Revision: 1471696

URL: http://svn.apache.org/r1471696
Log:
HIVE-3861 : Upgrade hbase dependency to 0.94 (Gunther Hagleitner via Ashutosh Chauhan)

Modified:
    hive/branches/branch-0.11/hbase-handler/ivy.xml
    hive/branches/branch-0.11/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
    hive/branches/branch-0.11/ivy/libraries.properties

Modified: hive/branches/branch-0.11/hbase-handler/ivy.xml
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.11/hbase-handler/ivy.xml?rev=1471696&r1=1471695&r2=1471696&view=diff
==============================================================================
--- hive/branches/branch-0.11/hbase-handler/ivy.xml (original)
+++ hive/branches/branch-0.11/hbase-handler/ivy.xml Wed Apr 24 21:34:39 2013
@@ -36,6 +36,9 @@
     </dependency>
     <dependency org="com.github.stephenc.high-scale-lib" name="high-scale-lib" rev="1.1.1"
                 transitive="false"/>
+    <dependency org="com.yammer.metrics" name="metrics-core" rev="${metrics-core.version}">
+      <exclude org="org.slf4j" module="slf4j-api"/><!--causes a dual slf4j presence
otherwise-->
+    </dependency>
     <dependency org="org.codehaus.jackson" name="jackson-jaxrs" rev="${jackson.version}"/>
     <dependency org="org.codehaus.jackson" name="jackson-xc" rev="${jackson.version}"/>
   </dependencies>

Modified: hive/branches/branch-0.11/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.11/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java?rev=1471696&r1=1471695&r2=1471696&view=diff
==============================================================================
--- hive/branches/branch-0.11/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
(original)
+++ hive/branches/branch-0.11/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
Wed Apr 24 21:34:39 2013
@@ -37,7 +37,6 @@ import org.apache.hadoop.hbase.client.HT
 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 @@ import org.apache.zookeeper.Watcher;
 public class HBaseTestSetup extends TestSetup {
 
   private MiniHBaseCluster hbaseCluster;
-  private MiniZooKeeperCluster zooKeeperCluster;
   private int zooKeeperPort;
   private String hbaseRoot;
 
@@ -60,32 +58,36 @@ public class HBaseTestSetup extends 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 @@ public class HBaseTestSetup extends Test
       hbaseCluster.shutdown();
       hbaseCluster = null;
     }
-    if (zooKeeperCluster != null) {
-      zooKeeperCluster.shutdown();
-      zooKeeperCluster = null;
-    }
   }
 }

Modified: hive/branches/branch-0.11/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.11/ivy/libraries.properties?rev=1471696&r1=1471695&r2=1471696&view=diff
==============================================================================
--- hive/branches/branch-0.11/ivy/libraries.properties (original)
+++ hive/branches/branch-0.11/ivy/libraries.properties Wed Apr 24 21:34:39 2013
@@ -44,7 +44,7 @@ commons-logging-api.version=1.0.4
 commons-pool.version=1.5.4
 derby.version=10.4.2.0
 guava.version=11.0.2
-hbase.version=0.92.0
+hbase.version=0.94.6.1
 jackson.version=1.8.8
 javaewah.version=0.3.2
 jdo-api.version=2.3-ec
@@ -66,5 +66,6 @@ ST4.version=4.0.4
 tempus-fugit.version=1.1
 snappy.version=0.2
 velocity.version=1.5
+metrics-core.version=2.1.2
 zookeeper.version=3.4.3
 javolution.version=5.5.1



Mime
View raw message