hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject hive git commit: HIVE-11743: HBase Port conflict for MiniHBaseCluster
Date Sat, 05 Sep 2015 18:12:46 GMT
Repository: hive
Updated Branches:
  refs/heads/hbase-metastore 757553e64 -> 76828e0ad


HIVE-11743: HBase Port conflict for MiniHBaseCluster


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/76828e0a
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/76828e0a
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/76828e0a

Branch: refs/heads/hbase-metastore
Commit: 76828e0ade2e55d30b0680c7312737a8212a158f
Parents: 757553e
Author: Daniel Dai <daijy@hortonworks.com>
Authored: Sat Sep 5 11:12:21 2015 -0700
Committer: Daniel Dai <daijy@hortonworks.com>
Committed: Sat Sep 5 11:12:21 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hive/metastore/hbase/HBaseIntegrationTests.java   | 8 +++++++-
 .../src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java   | 6 +++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/76828e0a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/hbase/HBaseIntegrationTests.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/hbase/HBaseIntegrationTests.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/hbase/HBaseIntegrationTests.java
index 02e481a..5b82579 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/hbase/HBaseIntegrationTests.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/hbase/HBaseIntegrationTests.java
@@ -19,8 +19,11 @@
 package org.apache.hadoop.hive.metastore.hbase;
 
 import co.cask.tephra.hbase10.coprocessor.TransactionProcessor;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
@@ -32,6 +35,7 @@ import org.apache.hadoop.hive.ql.Driver;
 import org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator;
 import org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest;
 import org.apache.hadoop.hive.ql.session.SessionState;
+
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.List;
@@ -60,7 +64,9 @@ public class HBaseIntegrationTests {
     if (testingTephra) {
       LOG.info("Testing with Tephra");
     }
-    utility = new HBaseTestingUtility();
+    Configuration hbaseConf = HBaseConfiguration.create();
+    hbaseConf.setInt("hbase.master.info.port", -1);
+    utility = new HBaseTestingUtility(hbaseConf);
     utility.startMiniCluster();
     conf = new HiveConf(utility.getConfiguration(), HBaseIntegrationTests.class);
     admin = utility.getHBaseAdmin();

http://git-wip-us.apache.org/repos/asf/hive/blob/76828e0a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
----------------------------------------------------------------------
diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
index 24a85cf..16e73c9 100644
--- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
+++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
@@ -62,9 +62,11 @@ import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
@@ -348,7 +350,9 @@ public class QTestUtil {
   }
 
   private void startMiniHBaseCluster() throws Exception {
-    utility = new HBaseTestingUtility();
+    Configuration hbaseConf = HBaseConfiguration.create();
+    hbaseConf.setInt("hbase.master.info.port", -1);
+    utility = new HBaseTestingUtility(hbaseConf);
     utility.startMiniCluster();
     conf = new HiveConf(utility.getConfiguration(), Driver.class);
     HBaseAdmin admin = utility.getHBaseAdmin();


Mime
View raw message