Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump hbase client to 2.x #27746

Merged
merged 2 commits into from
Jul 29, 2023
Merged
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
5 changes: 3 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
* Support for X source added (Java/Python) ([#X](https://github.com/apache/beam/issues/X)).
* Python GCSIO is now implemented with GCP GCS Client instead of apitools ([#25676](https://github.com/apache/beam/issues/25676))
* Java KafkaIO now supports picking up topics via topicPattern ([#26948](https://github.com/apache/beam/pull/26948))
* Support for read from Cosmos DB Core SQL API [#23604](https://github.com/apache/beam/issues/23604)
* Support for read from Cosmos DB Core SQL API ([#23604](https://github.com/apache/beam/issues/23604))
* Upgraded to HBase 2.5.5 for HBaseIO. (Java) ([#27711](https://github.com/apache/beam/issues/19554))

## New Features / Improvements

Expand All @@ -89,7 +90,7 @@
* ([#X](https://github.com/apache/beam/issues/X)).


# [2.49.0] - Unreleased
# [2.49.0] - 2023-07-17


## I/Os
Expand Down
14 changes: 2 additions & 12 deletions sdks/java/io/hbase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test {
jvmArgs "-Dtest.build.data.basedirectory=build/test-data"
}

def hbase_version = "1.2.6"
def hbase_version = "2.5.5"

dependencies {
implementation library.java.vendored_guava_26_0_jre
Expand All @@ -49,17 +49,7 @@ dependencies {
testImplementation library.java.hadoop_minicluster
testImplementation library.java.hadoop_hdfs
testImplementation library.java.hadoop_common
testImplementation "org.apache.hbase:hbase-shaded-server:$hbase_version"
testImplementation("org.apache.hbase:hbase-server:$hbase_version:tests") {
// We prevent bringing in unshaded dependencies to not conflict
// with hbase-shaded-server and hbase-shaded-client
transitive = false
}
testImplementation("org.apache.hbase:hbase-common:$hbase_version:tests") {
// We prevent bringing in unshaded dependencies to not conflict
// with hbase-shaded-server and hbase-shaded-client
transitive = false
}
testImplementation("org.apache.hbase:hbase-shaded-testing-util:$hbase_version")
testImplementation "org.apache.hbase:hbase-hadoop-compat:$hbase_version:tests"
testImplementation "org.apache.hbase:hbase-hadoop2-compat:$hbase_version:tests"
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.apache.hadoop.hbase.StartMiniClusterOption;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.BufferedMutator;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
Expand Down Expand Up @@ -85,7 +86,7 @@ public class HBaseIOTest {
@Rule public TemporaryHBaseTable tmpTable = new TemporaryHBaseTable();

private static HBaseTestingUtility htu;
private static HBaseAdmin admin;
private static Admin admin;

private static final Configuration conf = HBaseConfiguration.create();
private static final byte[] COLUMN_FAMILY = Bytes.toBytes("info");
Expand All @@ -103,10 +104,12 @@ public static void beforeClass() throws Exception {

// We don't use the full htu.startMiniCluster() to avoid starting unneeded HDFS/MR daemons
htu.startMiniZKCluster();
MiniHBaseCluster hbm = htu.startMiniHBaseCluster(1, 4);
StartMiniClusterOption option =
StartMiniClusterOption.builder().numMasters(1).numRegionServers(4).build();
MiniHBaseCluster hbm = htu.startMiniHBaseCluster(option);
hbm.waitForActiveAndReadyMaster();

admin = htu.getHBaseAdmin();
admin = htu.getAdmin();
}

@AfterClass
Expand Down
Loading