Visitar URL original
deps: bump google-cloud-bigtable to 2.81.0 (#4626) · googleapis/java-bigtable-hbase@5ead10a · GitHub
Skip to content

Commit 5ead10a

Browse files
authored
deps: bump google-cloud-bigtable to 2.81.0 (#4626)
- Bump bigtable.version 2.77.0 -> 2.81.0 and emulator 0.214.0 -> 0.218.0 - Pin slf4j-api to 2.0.16 (veneer needs 2.0.x, hbase ships 1.7.x) so RequireUpperBoundDeps is satisfied; add slf4j-api to hbase-targeted verify-mirror-deps ignore lists - Bump maven-shade-plugin to 3.6.0 (ASM 9 handles the Java 17 multi-release classes jackson-core 2.18.x now pulls in transitively) - Exclude dead-weight jackson multi-release FastDoubleParser classes (META-INF/versions/*/com/fasterxml/**) from the 1.x/2.x shaded jars - Bump conscrypt to 2.6.0 in the shaded modules to match the veneer deps-bom
1 parent 287bcc2 commit 5ead10a

19 files changed

Lines changed: 119 additions & 11 deletions

File tree

  • bigtable-client-core-parent/bigtable-hbase
  • bigtable-hbase-1.x-parent
  • bigtable-hbase-2.x-parent
  • hbase-migration-tools
    • bigtable-hbase-replication/bigtable-hbase-1.x-replication
    • mirroring-client
      • bigtable-hbase-mirroring-client-1.x-parent
        • bigtable-hbase-mirroring-client-1.x-shaded
        • bigtable-hbase-mirroring-client-1.x
      • bigtable-hbase-mirroring-client-2.x-parent
        • bigtable-hbase-mirroring-client-2.x-hadoop
        • bigtable-hbase-mirroring-client-2.x-shaded
        • bigtable-hbase-mirroring-client-2.x
      • bigtable-hbase-mirroring-client-core-parent/bigtable-hbase-mirroring-client-core

‎bigtable-client-core-parent/bigtable-hbase/pom.xml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,20 @@ limitations under the License.
137137
<artifactId>maven-surefire-plugin</artifactId>
138138
<configuration>
139139
<trimStackTrace>false</trimStackTrace>
140+
<!-- Drop jspecify from the TEST runtime classpath only (it stays on the
141+
compile classpath, so downstream modules and shaded jars are
142+
unaffected). Since google-cloud-bigtable 2.81.0 (gax 2.83.0) the
143+
veneer API is annotated with @org.jspecify.annotations.NullMarked,
144+
whose @Target references ElementType.MODULE (Java 9+). When
145+
Mockito/byte-buddy mocks an annotated veneer type (e.g. Batcher) on
146+
Java 8, the JDK parses that @Target, cannot find the MODULE constant,
147+
and throws ArrayStoreException: EnumConstantNotPresentExceptionProxy
148+
("Mockito cannot mock this class"). jspecify carries no runtime
149+
behavior, so removing it from the test classpath makes the JVM
150+
silently ignore @NullMarked and the mocks succeed. -->
151+
<classpathDependencyExcludes>
152+
<classpathDependencyExclude>org.jspecify:jspecify</classpathDependencyExclude>
153+
</classpathDependencyExcludes>
140154
<systemProperties>
141155
<property>
142156
<name>java.util.logging.config.file</name>
@@ -178,6 +192,8 @@ limitations under the License.
178192
</targetDependencies>
179193
<ignoredDependencies>
180194
<!-- forcefully replaced with reload4j -->
195+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
196+
<dependency>org.slf4j:slf4j-api</dependency>
181197
<dependency>log4j:log4j</dependency>
182198
</ignoredDependencies>
183199
</configuration>

‎bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/wrappers/veneer/metrics/MetricsApiTracerAdapter.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ public MetricsApiTracerAdapter(
6161
this.rpcMetrics = rpcMetrics;
6262
operationTimer = rpcMetrics.timeOperation();
6363
lastRetryStatus = RetryStatus.PERMANENT_FAILURE;
64-
if (methodName.equals("ReadRows") && operationType == OperationType.ServerStreaming) {
64+
// Track first-response latency for ReadRows. Historically ReadRows was always a
65+
// ServerStreaming operation, but since google-cloud-bigtable 2.81.0 bounded
66+
// single-row reads (e.g. an HBase point-scan) are traced as OperationType.Unary,
67+
// so key off the method name alone rather than the operation type.
68+
if (methodName.equals("ReadRows")) {
6569
this.firstResponseTimer = firstResponseLatencyTimer.time();
6670
}
6771
firstResponseRecorded = new AtomicBoolean(false);

‎bigtable-client-core-parent/bigtable-hbase/src/test/java/com/google/cloud/bigtable/hbase/wrappers/veneer/TestBigtableHBaseVeneerSettings.java‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ public void testDataSettingsBasicKeys() throws IOException {
101101
String appProfileId = "appProfileId";
102102
String userAgent = "test-user-agent";
103103
String fakeTracingCookie = "fake-tracing-cookie";
104-
Credentials credentials = Mockito.mock(Credentials.class);
104+
// withoutAnnotations(): com.google.auth.Credentials carries jspecify TYPE_USE
105+
// nullness annotations. On Java 8, byte-buddy reading them while building the
106+
// mock hits a JDK bug (NPE in sun.reflect.annotation.TypeAnnotationParser), so
107+
// tell Mockito not to copy annotations onto the generated mock.
108+
Credentials credentials =
109+
Mockito.mock(Credentials.class, Mockito.withSettings().withoutAnnotations());
105110

106111
configuration.set(BIGTABLE_PORT_KEY, String.valueOf(TEST_PORT));
107112
configuration.set(APP_PROFILE_ID_KEY, appProfileId);
@@ -162,7 +167,12 @@ public void testAdminSettingsBasicKeys() throws IOException {
162167
String adminHost = "testadmin.example.com";
163168
String userAgent = "test-user-agent";
164169
String fakeTracingCookie = "fake-tracing-cookie";
165-
Credentials credentials = Mockito.mock(Credentials.class);
170+
// withoutAnnotations(): com.google.auth.Credentials carries jspecify TYPE_USE
171+
// nullness annotations. On Java 8, byte-buddy reading them while building the
172+
// mock hits a JDK bug (NPE in sun.reflect.annotation.TypeAnnotationParser), so
173+
// tell Mockito not to copy annotations onto the generated mock.
174+
Credentials credentials =
175+
Mockito.mock(Credentials.class, Mockito.withSettings().withoutAnnotations());
166176

167177
configuration.set(BIGTABLE_ADMIN_HOST_KEY, adminHost);
168178
configuration.setInt(BIGTABLE_PORT_KEY, TEST_PORT);

‎bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ limitations under the License.
209209
<targetDependency>org.apache.hbase:hbase-client</targetDependency>
210210
</targetDependencies>
211211
<ignoredDependencies>
212+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
213+
<dependency>org.slf4j:slf4j-api</dependency>
212214
<dependency>log4j:log4j</dependency>
213215
<!-- for some reason hbase-client exposes testing deps as a compile dep, just ignore them -->
214216
<dependency>junit:junit</dependency>

‎bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/pom.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ limitations under the License.
201201
<ignoredDependencies>
202202

203203
<!-- hbase-common pulls in test deps via hbase-annotations, exclude them from mirror check -->
204+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
205+
<dependency>org.slf4j:slf4j-api</dependency>
204206
<dependency>junit:junit</dependency>
205207
<dependency>org.hamcrest:hamcrest-core</dependency>
206208
</ignoredDependencies>

‎bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ limitations under the License.
5656
<dependency>
5757
<groupId>org.conscrypt</groupId>
5858
<artifactId>conscrypt-openjdk-uber</artifactId>
59-
<version>2.5.2</version>
59+
<version>${conscrypt.version}</version>
6060
<scope>provided</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>org.conscrypt</groupId>
6464
<artifactId>conscrypt-openjdk</artifactId>
65-
<version>2.5.2</version>
65+
<version>${conscrypt.version}</version>
6666
<scope>provided</scope>
6767
</dependency>
6868

@@ -244,6 +244,16 @@ limitations under the License.
244244
<exclude>META-INF/DEPENDENCIES</exclude>
245245
<exclude>META-INF/versions/9/module-info.class</exclude>
246246
<exclude>META-INF/versions/11/module-info.class</exclude>
247+
<!-- google-cloud-bigtable 2.81.0 pulls in jackson-core 2.18.x (via the
248+
opentelemetry GCP resource detector), which ships multi-release
249+
FastDoubleParser SIMD optimizations under META-INF/versions/{11,17,21,22}.
250+
The com.fasterxml relocation below rewrites the base classes to
251+
com.google.bigtable.repackaged.com.faster.xml, but the multi-release
252+
copies keep their original com/fasterxml path, so Java's MR mechanism can
253+
never match them to the relocated base class - they are dead weight and
254+
also trip verify-shaded-jar-entries as un-relocated com.fasterxml classes.
255+
Drop them; the base classes provide identical functionality. -->
256+
<exclude>META-INF/versions/*/com/fasterxml/**</exclude>
247257
</excludes>
248258
</filter>
249259
</filters>
@@ -426,6 +436,8 @@ limitations under the License.
426436
<targetDependency>org.apache.hbase:hbase-shaded-client</targetDependency>
427437
</targetDependencies>
428438
<ignoredDependencies>
439+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
440+
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
429441
<ignoredDependency>log4j:log4j</ignoredDependency>
430442
</ignoredDependencies>
431443
</configuration>

‎bigtable-hbase-1.x-parent/bigtable-hbase-1.x/pom.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ limitations under the License.
160160
</targetDependencies>
161161
<ignoredDependencies>
162162
<!-- forcefully replaced with reload4j -->
163+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
164+
<dependency>org.slf4j:slf4j-api</dependency>
163165
<dependency>log4j:log4j</dependency>
164166
</ignoredDependencies>
165167
</configuration>

‎bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ limitations under the License.
193193
<targetDependency>org.apache.hbase:hbase-client</targetDependency>
194194
</targetDependencies>
195195
<ignoredDependencies>
196+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
197+
<dependency>org.slf4j:slf4j-api</dependency>
196198
<dependency>log4j:log4j</dependency>
197199
</ignoredDependencies>
198200
</configuration>

‎bigtable-hbase-2.x-parent/bigtable-hbase-2.x-mapreduce/pom.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ limitations under the License.
190190
</targetDependencies>
191191
<ignoredDependencies>
192192
<!-- TODO: version mismatches after upgrading hbase client to 2.6.4 -->
193+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
194+
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
193195
<ignoredDependency>javax.activation:activation</ignoredDependency>
194196
<ignoredDependency>javax.xml.bind:jaxb-api</ignoredDependency>
195197
<ignoredDependency>javax.xml.stream:stax-api</ignoredDependency>

‎bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ limitations under the License.
5656
<dependency>
5757
<groupId>org.conscrypt</groupId>
5858
<artifactId>conscrypt-openjdk-uber</artifactId>
59-
<version>2.5.2</version>
59+
<version>${conscrypt.version}</version>
6060
<scope>provided</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>org.conscrypt</groupId>
6464
<artifactId>conscrypt-openjdk</artifactId>
65-
<version>2.5.2</version>
65+
<version>${conscrypt.version}</version>
6666
<scope>provided</scope>
6767
</dependency>
6868

@@ -236,6 +236,16 @@ limitations under the License.
236236
<exclude>META-INF/DEPENDENCIES</exclude>
237237
<exclude>META-INF/versions/9/module-info.class</exclude>
238238
<exclude>META-INF/versions/11/module-info.class</exclude>
239+
<!-- google-cloud-bigtable 2.81.0 pulls in jackson-core 2.18.x (via the
240+
opentelemetry GCP resource detector), which ships multi-release
241+
FastDoubleParser SIMD optimizations under META-INF/versions/{11,17,21,22}.
242+
The com.fasterxml relocation below rewrites the base classes to
243+
com.google.bigtable.repackaged.com.faster.xml, but the multi-release
244+
copies keep their original com/fasterxml path, so Java's MR mechanism can
245+
never match them to the relocated base class - they are dead weight and
246+
also trip verify-shaded-jar-entries as un-relocated com.fasterxml classes.
247+
Drop them; the base classes provide identical functionality. -->
248+
<exclude>META-INF/versions/*/com/fasterxml/**</exclude>
239249
</excludes>
240250
</filter>
241251
</filters>
@@ -422,6 +432,8 @@ limitations under the License.
422432
<!-- opentelemetry dependency is added to veneer since 2.38.0. We shade veneer so ignoring
423433
opentelemetry when comparing with hbase-shaded-client is fine-->
424434
<ignoredDependencies>
435+
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
436+
<dependency>org.slf4j:slf4j-api</dependency>
425437
<dependency>io.opentelemetry:opentelemetry-api</dependency>
426438
<dependency>io.opentelemetry:opentelemetry-context</dependency>
427439
<dependency>io.opentelemetry:opentelemetry-semconv</dependency>

0 commit comments

Comments
 (0)