File tree Expand file tree Collapse file tree 15 files changed +143
-41
lines changed
bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce
src/test/java/com/google/cloud/bigtable/mapreduce
hbase-migration-tools/bigtable-hbase-replication
bigtable-hbase-1.x-replication
src/test/java/com/google/cloud/bigtable/hbase1_x/replication
bigtable-hbase-2.x-replication
src/test/java/com/google/cloud/bigtable/hbase2_x/replication Expand file tree Collapse file tree 15 files changed +143
-41
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,12 @@ limitations under the License.
161161 <artifactId >hbase-shaded-client</artifactId >
162162 </exclusion >
163163
164+ <!-- google-cloud-bigtable pulls in a newer version of this, but we want to match beam's version-->
165+ <exclusion >
166+ <groupId >org.conscrypt</groupId >
167+ <artifactId >conscrypt-openjdk-uber</artifactId >
168+ </exclusion >
169+
164170 <!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
165171 pom.xml files when invoking the build from a parent project. So we have to manually exclude
166172 the dependencies. Note that this works in conjunction with the manually promoted dependencies
Original file line number Diff line number Diff line change @@ -88,6 +88,13 @@ limitations under the License.
8888 <groupId >org.slf4j</groupId >
8989 <artifactId >slf4j-log4j12</artifactId >
9090 </exclusion >
91+
92+ <!-- google-cloud-bigtable pulls in a newer version of this, but we want to match beam's version-->
93+ <exclusion >
94+ <groupId >org.conscrypt</groupId >
95+ <artifactId >conscrypt-openjdk-uber</artifactId >
96+ </exclusion >
97+
9198 <!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
9299 pom.xml files when invoking the build from a parent project. So we have to manually exclude
93100 the dependencies. Note that this works in conjunction with the manually promoted dependencies
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ limitations under the License.
3636
3737 <properties >
3838 <mrunit .version>1.1.0</mrunit .version>
39- <google-cloud-bigtable-emulator .version>0.144 .0</google-cloud-bigtable-emulator .version>
39+ <google-cloud-bigtable-emulator .version>0.148 .0</google-cloud-bigtable-emulator .version>
4040 </properties >
4141
4242 <!-- NOTE: this artifact is designed to be used alongside hbase-server via
@@ -100,7 +100,7 @@ limitations under the License.
100100 </dependency >
101101 <dependency >
102102 <groupId >com.google.cloud</groupId >
103- <artifactId >google-cloud-bigtable-emulator</artifactId >
103+ <artifactId >google-cloud-bigtable-emulator-core </artifactId >
104104 <version >${google-cloud-bigtable-emulator.version} </version >
105105 <scope >test</scope >
106106 </dependency >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2022 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package com .google .cloud .bigtable .mapreduce ;
17+
18+ import com .google .cloud .bigtable .emulator .core .EmulatorController ;
19+ import org .junit .rules .ExternalResource ;
20+
21+ public class BigtableEmulatorRule extends ExternalResource {
22+ private EmulatorController emulatorController ;
23+
24+ @ Override
25+ protected void before () throws Throwable {
26+ emulatorController = EmulatorController .createBundled ();
27+ emulatorController .start ();
28+ }
29+
30+ @ Override
31+ protected void after () {
32+ emulatorController .stop ();
33+ }
34+
35+ public int getPort () {
36+ return emulatorController .getPort ();
37+ }
38+ }
Original file line number Diff line number Diff line change 1515 */
1616package com .google .cloud .bigtable .mapreduce .hbasesnapshots ;
1717
18- import com .google .cloud .bigtable .emulator .v2 .BigtableEmulatorRule ;
1918import com .google .cloud .bigtable .hbase .BigtableConfiguration ;
2019import com .google .cloud .bigtable .hbase .BigtableOptionsFactory ;
20+ import com .google .cloud .bigtable .mapreduce .BigtableEmulatorRule ;
2121import com .google .common .collect .Sets ;
2222import java .io .IOException ;
2323import java .util .Arrays ;
@@ -60,7 +60,7 @@ public class EndToEndIT {
6060
6161 private static final HBaseTestingUtility HB_TEST_UTIL = new HBaseTestingUtility ();
6262
63- @ Rule public final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule . create ();
63+ @ Rule public final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule ();
6464
6565 // Clients that will be connected to the emulator
6666 private Connection bigtableConn ;
Original file line number Diff line number Diff line change 1717
1818import static org .junit .Assert .assertEquals ;
1919
20- import com .google .cloud .bigtable .emulator .v2 .BigtableEmulatorRule ;
2120import com .google .cloud .bigtable .hbase .BigtableConfiguration ;
2221import com .google .cloud .bigtable .hbase .BigtableOptionsFactory ;
22+ import com .google .cloud .bigtable .mapreduce .BigtableEmulatorRule ;
2323import java .io .IOException ;
2424import java .util .Arrays ;
2525import org .apache .commons .lang .ArrayUtils ;
@@ -58,8 +58,7 @@ public class TestValidationEndToEndIT {
5858
5959 private static final HBaseTestingUtility HB_TEST_UTIL = new HBaseTestingUtility ();
6060
61- @ ClassRule
62- public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule .create ();
61+ @ ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule ();
6362
6463 // Clients that will be connected to the emulator
6564 private static Connection bigtableConn ;
Original file line number Diff line number Diff line change @@ -176,17 +176,9 @@ limitations under the License.
176176 </dependency >
177177 <dependency >
178178 <groupId >com.google.cloud</groupId >
179- <artifactId >google-cloud-bigtable-emulator</artifactId >
180- <version >0.144 .0</version >
179+ <artifactId >google-cloud-bigtable-emulator-core </artifactId >
180+ <version >0.148 .0</version >
181181 <scope >test</scope >
182- <exclusions >
183- <!-- We do not use channel creating helpers, so don't need any
184- dependencies from the emulator-->
185- <exclusion >
186- <groupId >*</groupId >
187- <artifactId >*</artifactId >
188- </exclusion >
189- </exclusions >
190182 </dependency >
191183 <dependency >
192184 <groupId >org.mockito</groupId >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2022 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package com .google .cloud .bigtable .hbase1_x .replication ;
17+
18+ import com .google .cloud .bigtable .emulator .core .EmulatorController ;
19+ import org .junit .rules .ExternalResource ;
20+
21+ public class BigtableEmulatorRule extends ExternalResource {
22+ private EmulatorController emulatorController ;
23+
24+ @ Override
25+ protected void before () throws Throwable {
26+ emulatorController = EmulatorController .createBundled ();
27+ emulatorController .start ();
28+ }
29+
30+ @ Override
31+ protected void after () {
32+ emulatorController .stop ();
33+ }
34+
35+ public int getPort () {
36+ return emulatorController .getPort ();
37+ }
38+ }
Original file line number Diff line number Diff line change 1818
1919import static org .junit .Assert .assertFalse ;
2020
21- import com .google .cloud .bigtable .emulator .v2 .BigtableEmulatorRule ;
2221import com .google .cloud .bigtable .hbase .BigtableConfiguration ;
2322import com .google .cloud .bigtable .hbase .replication .configuration .HBaseToCloudBigtableReplicationConfiguration ;
2423import com .google .cloud .bigtable .hbase .replication .utils .TestUtils ;
@@ -57,8 +56,7 @@ public class HbaseToCloudBigtableReplicationEndpointDryRunTest {
5756 private static HBaseTestingUtility hbaseTestingUtil = new HBaseTestingUtility ();
5857 private static ReplicationAdmin replicationAdmin ;
5958
60- @ ClassRule
61- public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule .create ();
59+ @ ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule ();
6260
6361 private static Connection cbtConnection ;
6462 private static Connection hbaseConnection ;
Original file line number Diff line number Diff line change 2121import static com .google .cloud .bigtable .hbase .replication .utils .TestUtils .ROW_KEY ;
2222import static com .google .cloud .bigtable .hbase .replication .utils .TestUtils .assertEquals ;
2323
24- import com .google .cloud .bigtable .emulator .v2 .BigtableEmulatorRule ;
2524import com .google .cloud .bigtable .hbase .BigtableConfiguration ;
2625import com .google .cloud .bigtable .hbase .replication .utils .TestUtils ;
2726import java .io .IOException ;
@@ -111,8 +110,7 @@ public Entry filter(Entry entry) {
111110 private static HBaseTestingUtility hbaseTestingUtil = new HBaseTestingUtility ();
112111 private static ReplicationAdmin replicationAdmin ;
113112
114- @ ClassRule
115- public static final BigtableEmulatorRule bigtableEmulator = BigtableEmulatorRule .create ();
113+ @ ClassRule public static final BigtableEmulatorRule bigtableEmulator = new BigtableEmulatorRule ();
116114
117115 private static Connection cbtConnection ;
118116 private static Connection hbaseConnection ;
You can’t perform that action at this time.
0 commit comments