Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion hbase-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
</properties>
<dependencies>
<!-- dependencies are always listed in sorted order by groupId, artifactId -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<!-- intra-project -->
<dependency>
<groupId>org.apache.hive</groupId>
Expand Down Expand Up @@ -76,9 +80,29 @@
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<artifactId>hbase-shaded-client-byo-hadoop</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-testing-util</artifactId>
<version>${hbase.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>
<exclusion>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.mapred.TableSnapshotInputFormat;
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
import org.apache.hadoop.mapred.FileInputFormat;
import org.apache.hadoop.mapred.InputFormat;
import org.apache.hadoop.mapred.InputSplit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.KeyValueUtil;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MutationProto.MutationType;
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType;
import org.apache.hadoop.io.Writable;

public class PutWritable implements Writable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.KeyValueUtil;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
import org.apache.hadoop.io.Writable;

public class ResultWritable implements Writable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.apache.hadoop.hbase.StartMiniClusterOption;
import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.DriverFactory;
Expand All @@ -45,6 +46,8 @@ public class TestHBaseQueries {
private final HiveConf baseConf;
private IDriver driver;

private static HBaseTestingUtility util;

/**
* Test class for running queries using HBase tables. Creates a mini ZK and an HBase test cluster.
* Each test method must instantiate a driver object first, using either the baseConf or a modified version of that.
Expand All @@ -64,9 +67,11 @@ public TestHBaseQueries() throws Exception {

// set up HBase
baseConf.setBoolean("hbase.netty.nativetransport", false);
HBaseTestingUtility util = new HBaseTestingUtility(baseConf);
util = new HBaseTestingUtility(baseConf);
util.setZkCluster(zooKeeperCluster);
miniHBaseCluster = util.startMiniHBaseCluster(1, 1);
miniHBaseCluster = util.startMiniHBaseCluster( StartMiniClusterOption.builder()
.numMasters(1).numRegionServers(1)
.build());

// set up HMS backend DB
TestTxnDbUtil.setConfValues(baseConf);
Expand All @@ -77,7 +82,7 @@ public TestHBaseQueries() throws Exception {
@AfterClass
public static void tearDown() throws IOException {
if (miniHBaseCluster != null) {
miniHBaseCluster.shutdown();
util.shutdownMiniHBaseCluster();
}
if (zooKeeperCluster != null) {
zooKeeperCluster.shutdown();
Expand Down
6 changes: 6 additions & 0 deletions itests/hcatalog-unit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-zookeeper</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.pig</groupId>
<artifactId>pig</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion itests/hive-blobstore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<active.hadoop.version>${hadoop.version}</active.hadoop.version>
<test.dfs.mkdir>-mkdir -p</test.dfs.mkdir>
<!-- Required by Calcite Avatica -->
<protobuf.version>3.3.0</protobuf.version>
<protobuf.version>3.21.1</protobuf.version>
</properties>
<dependencies>
<!-- dependencies are always listed in sorted order by groupId, artifactId -->
Expand Down
2 changes: 1 addition & 1 deletion itests/hive-minikdc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<hive.path.to.root>../..</hive.path.to.root>
<exclude.tests>None</exclude.tests>
<!-- Required by Calcite Avatica -->
<protobuf.version>3.3.0</protobuf.version>
<protobuf.version>3.21.0</protobuf.version>
</properties>
<dependencies>
<!-- dependencies are always listed in sorted order by groupId, artifactId -->
Expand Down
4 changes: 4 additions & 0 deletions itests/qtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
</properties>
<dependencies>
<!-- dependencies are always listed in sorted order by groupId, artifactId -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<!-- test intra-project -->
<dependency>
<groupId>org.apache.hive</groupId>
Expand Down
5 changes: 5 additions & 0 deletions itests/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-mapreduce</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-zookeeper</artifactId>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.kudu</groupId>
<artifactId>kudu-test-utils</artifactId>
Expand Down
Loading