Skip to content

Commit

Permalink
deps: upgrade bigtable.version to 2.11.1 (#3761)
Browse files Browse the repository at this point in the history
* deps: update bigtable.version to 2.11.0

* deps fixes

* upgrade veneer to 2.11.1

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix tests

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
kolea2 and gcf-owl-bot[bot] authored Aug 29, 2022
1 parent 48dffaf commit f40496c
Show file tree
Hide file tree
Showing 15 changed files with 143 additions and 41 deletions.
6 changes: 6 additions & 0 deletions bigtable-dataflow-parent/bigtable-beam-import/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ limitations under the License.
<artifactId>hbase-shaded-client</artifactId>
</exclusion>

<!-- google-cloud-bigtable pulls in a newer version of this, but we want to match beam's version-->
<exclusion>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk-uber</artifactId>
</exclusion>

<!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
pom.xml files when invoking the build from a parent project. So we have to manually exclude
the dependencies. Note that this works in conjunction with the manually promoted dependencies
Expand Down
7 changes: 7 additions & 0 deletions bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ limitations under the License.
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>

<!-- google-cloud-bigtable pulls in a newer version of this, but we want to match beam's version-->
<exclusion>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk-uber</artifactId>
</exclusion>

<!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
pom.xml files when invoking the build from a parent project. So we have to manually exclude
the dependencies. Note that this works in conjunction with the manually promoted dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ limitations under the License.

<properties>
<mrunit.version>1.1.0</mrunit.version>
<google-cloud-bigtable-emulator.version>0.144.0</google-cloud-bigtable-emulator.version>
<google-cloud-bigtable-emulator.version>0.148.0</google-cloud-bigtable-emulator.version>
</properties>

<!-- NOTE: this artifact is designed to be used alongside hbase-server via
Expand Down Expand Up @@ -100,7 +100,7 @@ limitations under the License.
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator</artifactId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>${google-cloud-bigtable-emulator.version}</version>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.bigtable.mapreduce;

import com.google.cloud.bigtable.emulator.core.EmulatorController;
import org.junit.rules.ExternalResource;

public class BigtableEmulatorRule extends ExternalResource {
private EmulatorController emulatorController;

@Override
protected void before() throws Throwable {
emulatorController = EmulatorController.createBundled();
emulatorController.start();
}

@Override
protected void after() {
emulatorController.stop();
}

public int getPort() {
return emulatorController.getPort();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package com.google.cloud.bigtable.mapreduce.hbasesnapshots;

import com.google.cloud.bigtable.emulator.v2.BigtableEmulatorRule;
import com.google.cloud.bigtable.hbase.BigtableConfiguration;
import com.google.cloud.bigtable.hbase.BigtableOptionsFactory;
import com.google.cloud.bigtable.mapreduce.BigtableEmulatorRule;
import com.google.common.collect.Sets;
import java.io.IOException;
import java.util.Arrays;
Expand Down Expand Up @@ -60,7 +60,7 @@ public class EndToEndIT {

private static final HBaseTestingUtility HB_TEST_UTIL = new HBaseTestingUtility();

@Rule public final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule.create();
@Rule public final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule();

// Clients that will be connected to the emulator
private Connection bigtableConn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import static org.junit.Assert.assertEquals;

import com.google.cloud.bigtable.emulator.v2.BigtableEmulatorRule;
import com.google.cloud.bigtable.hbase.BigtableConfiguration;
import com.google.cloud.bigtable.hbase.BigtableOptionsFactory;
import com.google.cloud.bigtable.mapreduce.BigtableEmulatorRule;
import java.io.IOException;
import java.util.Arrays;
import org.apache.commons.lang.ArrayUtils;
Expand Down Expand Up @@ -58,8 +58,7 @@ public class TestValidationEndToEndIT {

private static final HBaseTestingUtility HB_TEST_UTIL = new HBaseTestingUtility();

@ClassRule
public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule.create();
@ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule();

// Clients that will be connected to the emulator
private static Connection bigtableConn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,9 @@ limitations under the License.
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator</artifactId>
<version>0.144.0</version>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.148.0</version>
<scope>test</scope>
<exclusions>
<!-- We do not use channel creating helpers, so don't need any
dependencies from the emulator-->
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.bigtable.hbase1_x.replication;

import com.google.cloud.bigtable.emulator.core.EmulatorController;
import org.junit.rules.ExternalResource;

public class BigtableEmulatorRule extends ExternalResource {
private EmulatorController emulatorController;

@Override
protected void before() throws Throwable {
emulatorController = EmulatorController.createBundled();
emulatorController.start();
}

@Override
protected void after() {
emulatorController.stop();
}

public int getPort() {
return emulatorController.getPort();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static org.junit.Assert.assertFalse;

import com.google.cloud.bigtable.emulator.v2.BigtableEmulatorRule;
import com.google.cloud.bigtable.hbase.BigtableConfiguration;
import com.google.cloud.bigtable.hbase.replication.configuration.HBaseToCloudBigtableReplicationConfiguration;
import com.google.cloud.bigtable.hbase.replication.utils.TestUtils;
Expand Down Expand Up @@ -57,8 +56,7 @@ public class HbaseToCloudBigtableReplicationEndpointDryRunTest {
private static HBaseTestingUtility hbaseTestingUtil = new HBaseTestingUtility();
private static ReplicationAdmin replicationAdmin;

@ClassRule
public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule.create();
@ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule();

private static Connection cbtConnection;
private static Connection hbaseConnection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static com.google.cloud.bigtable.hbase.replication.utils.TestUtils.ROW_KEY;
import static com.google.cloud.bigtable.hbase.replication.utils.TestUtils.assertEquals;

import com.google.cloud.bigtable.emulator.v2.BigtableEmulatorRule;
import com.google.cloud.bigtable.hbase.BigtableConfiguration;
import com.google.cloud.bigtable.hbase.replication.utils.TestUtils;
import java.io.IOException;
Expand Down Expand Up @@ -111,8 +110,7 @@ public Entry filter(Entry entry) {
private static HBaseTestingUtility hbaseTestingUtil = new HBaseTestingUtility();
private static ReplicationAdmin replicationAdmin;

@ClassRule
public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule.create();
@ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule();

private static Connection cbtConnection;
private static Connection hbaseConnection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,9 @@ limitations under the License.
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator</artifactId>
<version>0.144.0</version>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.148.0</version>
<scope>test</scope>
<exclusions>
<!-- We do not use channel creating helpers, so don't need any
dependencies from the emulator-->
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Test dependencies-->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.bigtable.hbase2_x.replication;

import com.google.cloud.bigtable.emulator.core.EmulatorController;
import org.junit.rules.ExternalResource;

public class BigtableEmulatorRule extends ExternalResource {
private EmulatorController emulatorController;

@Override
protected void before() throws Throwable {
emulatorController = EmulatorController.createBundled();
emulatorController.start();
}

@Override
protected void after() {
emulatorController.stop();
}

public int getPort() {
return emulatorController.getPort();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.cloud.bigtable.hbase.replication.configuration.HBaseToCloudBigtableReplicationConfiguration.ENABLE_DRY_RUN_MODE_KEY;
import static org.junit.Assert.assertFalse;

import com.google.cloud.bigtable.emulator.v2.BigtableEmulatorRule;
import com.google.cloud.bigtable.hbase.BigtableConfiguration;
import com.google.cloud.bigtable.hbase.replication.utils.TestUtils;
import java.io.IOException;
Expand Down Expand Up @@ -57,8 +56,7 @@ public class HbaseToCloudBigtableReplicationEndpointDryRunTest {
private static HBaseTestingUtility hbaseTestingUtil = new HBaseTestingUtility();
private static ReplicationAdmin replicationAdmin;

@ClassRule
public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule.create();
@ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule();

private static Connection cbtConnection;
private static Connection hbaseConnection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static com.google.cloud.bigtable.hbase.replication.utils.TestUtils.FILTERED_ROW_KEY;
import static com.google.cloud.bigtable.hbase.replication.utils.TestUtils.ROW_KEY;

import com.google.cloud.bigtable.emulator.v2.BigtableEmulatorRule;
import com.google.cloud.bigtable.hbase.BigtableConfiguration;
import com.google.cloud.bigtable.hbase.replication.utils.TestUtils;
import java.io.IOException;
Expand Down Expand Up @@ -111,8 +110,7 @@ public Entry filter(Entry entry) {
private static HBaseTestingUtility hbaseTestingUtil = new HBaseTestingUtility();
private static ReplicationAdmin replicationAdmin;

@ClassRule
public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule.create();
@ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule();

private static Connection cbtConnection;
private static Connection hbaseConnection;
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ limitations under the License.
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- core dependency versions -->
<bigtable.version>2.9.0</bigtable.version>
<bigtable.version>2.11.1</bigtable.version>
<bigtable-client-core.version>1.27.1</bigtable-client-core.version>
<grpc-conscrypt.version>2.5.1</grpc-conscrypt.version>
<grpc-conscrypt.version>2.5.2</grpc-conscrypt.version>
<!-- keeping at this version to align with hbase-->
<slf4j.version>1.7.25</slf4j.version>
<commons-logging.version>1.2</commons-logging.version>
Expand Down

0 comments on commit f40496c

Please sign in to comment.