Skip to content
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
16 changes: 16 additions & 0 deletions bigtable-client-core-parent/bigtable-hbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ limitations under the License.
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<trimStackTrace>false</trimStackTrace>
<!-- Drop jspecify from the TEST runtime classpath only (it stays on the
compile classpath, so downstream modules and shaded jars are
unaffected). Since google-cloud-bigtable 2.81.0 (gax 2.83.0) the
veneer API is annotated with @org.jspecify.annotations.NullMarked,
whose @Target references ElementType.MODULE (Java 9+). When
Mockito/byte-buddy mocks an annotated veneer type (e.g. Batcher) on
Java 8, the JDK parses that @Target, cannot find the MODULE constant,
and throws ArrayStoreException: EnumConstantNotPresentExceptionProxy
("Mockito cannot mock this class"). jspecify carries no runtime
behavior, so removing it from the test classpath makes the JVM
silently ignore @NullMarked and the mocks succeed. -->
<classpathDependencyExcludes>
<classpathDependencyExclude>org.jspecify:jspecify</classpathDependencyExclude>
</classpathDependencyExcludes>
<systemProperties>
<property>
<name>java.util.logging.config.file</name>
Expand Down Expand Up @@ -178,6 +192,8 @@ limitations under the License.
</targetDependencies>
<ignoredDependencies>
<!-- forcefully replaced with reload4j -->
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>log4j:log4j</dependency>
</ignoredDependencies>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ public MetricsApiTracerAdapter(
this.rpcMetrics = rpcMetrics;
operationTimer = rpcMetrics.timeOperation();
lastRetryStatus = RetryStatus.PERMANENT_FAILURE;
if (methodName.equals("ReadRows") && operationType == OperationType.ServerStreaming) {
// Track first-response latency for ReadRows. Historically ReadRows was always a
// ServerStreaming operation, but since google-cloud-bigtable 2.81.0 bounded
// single-row reads (e.g. an HBase point-scan) are traced as OperationType.Unary,
// so key off the method name alone rather than the operation type.
if (methodName.equals("ReadRows")) {
this.firstResponseTimer = firstResponseLatencyTimer.time();
}
firstResponseRecorded = new AtomicBoolean(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ public void testDataSettingsBasicKeys() throws IOException {
String appProfileId = "appProfileId";
String userAgent = "test-user-agent";
String fakeTracingCookie = "fake-tracing-cookie";
Credentials credentials = Mockito.mock(Credentials.class);
// withoutAnnotations(): com.google.auth.Credentials carries jspecify TYPE_USE
// nullness annotations. On Java 8, byte-buddy reading them while building the
// mock hits a JDK bug (NPE in sun.reflect.annotation.TypeAnnotationParser), so
// tell Mockito not to copy annotations onto the generated mock.
Credentials credentials =
Mockito.mock(Credentials.class, Mockito.withSettings().withoutAnnotations());

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

configuration.set(BIGTABLE_ADMIN_HOST_KEY, adminHost);
configuration.setInt(BIGTABLE_PORT_KEY, TEST_PORT);
Expand Down
2 changes: 2 additions & 0 deletions bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ limitations under the License.
<targetDependency>org.apache.hbase:hbase-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>log4j:log4j</dependency>
<!-- for some reason hbase-client exposes testing deps as a compile dep, just ignore them -->
<dependency>junit:junit</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ limitations under the License.
<ignoredDependencies>

<!-- hbase-common pulls in test deps via hbase-annotations, exclude them from mirror check -->
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>junit:junit</dependency>
<dependency>org.hamcrest:hamcrest-core</dependency>
</ignoredDependencies>
Expand Down
16 changes: 14 additions & 2 deletions bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ limitations under the License.
<dependency>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk-uber</artifactId>
<version>2.5.2</version>
<version>${conscrypt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk</artifactId>
<version>2.5.2</version>
<version>${conscrypt.version}</version>
<scope>provided</scope>
</dependency>
Comment thread
mutianf marked this conversation as resolved.

Expand Down Expand Up @@ -244,6 +244,16 @@ limitations under the License.
<exclude>META-INF/DEPENDENCIES</exclude>
<exclude>META-INF/versions/9/module-info.class</exclude>
<exclude>META-INF/versions/11/module-info.class</exclude>
<!-- google-cloud-bigtable 2.81.0 pulls in jackson-core 2.18.x (via the
opentelemetry GCP resource detector), which ships multi-release
FastDoubleParser SIMD optimizations under META-INF/versions/{11,17,21,22}.
The com.fasterxml relocation below rewrites the base classes to
com.google.bigtable.repackaged.com.faster.xml, but the multi-release
copies keep their original com/fasterxml path, so Java's MR mechanism can
never match them to the relocated base class - they are dead weight and
also trip verify-shaded-jar-entries as un-relocated com.fasterxml classes.
Drop them; the base classes provide identical functionality. -->
<exclude>META-INF/versions/*/com/fasterxml/**</exclude>
</excludes>
</filter>
</filters>
Expand Down Expand Up @@ -426,6 +436,8 @@ limitations under the License.
<targetDependency>org.apache.hbase:hbase-shaded-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
<ignoredDependency>log4j:log4j</ignoredDependency>
</ignoredDependencies>
</configuration>
Expand Down
2 changes: 2 additions & 0 deletions bigtable-hbase-1.x-parent/bigtable-hbase-1.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ limitations under the License.
</targetDependencies>
<ignoredDependencies>
<!-- forcefully replaced with reload4j -->
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>log4j:log4j</dependency>
</ignoredDependencies>
</configuration>
Expand Down
2 changes: 2 additions & 0 deletions bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ limitations under the License.
<targetDependency>org.apache.hbase:hbase-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>log4j:log4j</dependency>
</ignoredDependencies>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ limitations under the License.
</targetDependencies>
<ignoredDependencies>
<!-- TODO: version mismatches after upgrading hbase client to 2.6.4 -->
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
<ignoredDependency>javax.activation:activation</ignoredDependency>
<ignoredDependency>javax.xml.bind:jaxb-api</ignoredDependency>
<ignoredDependency>javax.xml.stream:stax-api</ignoredDependency>
Expand Down
16 changes: 14 additions & 2 deletions bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ limitations under the License.
<dependency>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk-uber</artifactId>
<version>2.5.2</version>
<version>${conscrypt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk</artifactId>
<version>2.5.2</version>
<version>${conscrypt.version}</version>
<scope>provided</scope>
</dependency>
Comment thread
mutianf marked this conversation as resolved.

Expand Down Expand Up @@ -236,6 +236,16 @@ limitations under the License.
<exclude>META-INF/DEPENDENCIES</exclude>
<exclude>META-INF/versions/9/module-info.class</exclude>
<exclude>META-INF/versions/11/module-info.class</exclude>
<!-- google-cloud-bigtable 2.81.0 pulls in jackson-core 2.18.x (via the
opentelemetry GCP resource detector), which ships multi-release
FastDoubleParser SIMD optimizations under META-INF/versions/{11,17,21,22}.
The com.fasterxml relocation below rewrites the base classes to
com.google.bigtable.repackaged.com.faster.xml, but the multi-release
copies keep their original com/fasterxml path, so Java's MR mechanism can
never match them to the relocated base class - they are dead weight and
also trip verify-shaded-jar-entries as un-relocated com.fasterxml classes.
Drop them; the base classes provide identical functionality. -->
<exclude>META-INF/versions/*/com/fasterxml/**</exclude>
</excludes>
</filter>
</filters>
Expand Down Expand Up @@ -422,6 +432,8 @@ limitations under the License.
<!-- opentelemetry dependency is added to veneer since 2.38.0. We shade veneer so ignoring
opentelemetry when comparing with hbase-shaded-client is fine-->
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>io.opentelemetry:opentelemetry-api</dependency>
<dependency>io.opentelemetry:opentelemetry-context</dependency>
<dependency>io.opentelemetry:opentelemetry-semconv</dependency>
Expand Down
2 changes: 2 additions & 0 deletions bigtable-hbase-2.x-parent/bigtable-hbase-2.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ limitations under the License.
<targetDependency>org.apache.hbase:hbase-shaded-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>io.opentelemetry:opentelemetry-api</dependency>
<dependency>io.opentelemetry:opentelemetry-context</dependency>
<dependency>io.opentelemetry:opentelemetry-semconv</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ limitations under the License.
<targetDependencies>
<targetDependency>org.apache.hbase:hbase-server</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
</ignoredDependencies>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ limitations under the License.
<targetDependency>org.apache.hbase:hbase-shaded-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
<ignoredDependency>log4j:log4j</ignoredDependency>
</ignoredDependencies>
</configuration>
Expand Down Expand Up @@ -223,6 +225,8 @@ limitations under the License.
<targetDependency>org.apache.hbase:hbase-shaded-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
<ignoredDependency>log4j:log4j</ignoredDependency>
</ignoredDependencies>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ limitations under the License.
</targetDependencies>
<ignoredDependencies>
<!-- forcefully replaced with reload4j -->
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>log4j:log4j</dependency>
</ignoredDependencies>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ limitations under the License.
we are using that version -->
<ignoredDependency>commons-logging:commons-logging</ignoredDependency>

<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
<ignoredDependency>log4j:log4j</ignoredDependency>
</ignoredDependencies>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ limitations under the License.
<targetDependencies>
<targetDependency>org.apache.hbase:hbase-shaded-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
</ignoredDependencies>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ limitations under the License.
<targetDependency>org.apache.hbase:hbase-shaded-client</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
</ignoredDependencies>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ limitations under the License.
</targetDependencies>
<ignoredDependencies>
<!-- forcefully replaced with reload4j -->
<!-- veneer requires slf4j-api 2.x while hbase ships 1.7.x -->
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>log4j:log4j</dependency>
</ignoredDependencies>
</configuration>
Expand Down
30 changes: 26 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,17 @@ limitations under the License.
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- core dependency versions -->
<bigtable.version>2.77.0</bigtable.version>
<google-cloud-bigtable-emulator.version>0.214.0</google-cloud-bigtable-emulator.version>
<bigtable.version>2.81.0</bigtable.version>
<google-cloud-bigtable-emulator.version>0.218.0</google-cloud-bigtable-emulator.version>
Comment thread
mutianf marked this conversation as resolved.
<bigtable-metrics-api.version>1.29.2</bigtable-metrics-api.version>
<!-- Optional dep for bigtable-metrics-api used for tests -->
<dropwizard-metrics.version>4.2.22</dropwizard-metrics.version>

<!-- shared library versions pulled in by the bigtable veneer; pinned to satisfy
RequireUpperBoundDeps (slf4j) and to match the google-cloud-bigtable deps-bom (conscrypt) -->
<slf4j.version>2.0.16</slf4j.version>
<conscrypt.version>2.6.0</conscrypt.version>

<!-- keeping at this version to align with hbase-->
<reload4j.version>1.2.24</reload4j.version>

Expand Down Expand Up @@ -93,6 +98,19 @@ limitations under the License.
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>
<!-- google-cloud-bigtable 2.81.0 pulls in slf4j-api 2.0.x, while hbase brings the
older 1.7.x. Pin to the higher version so the inherited RequireUpperBoundDeps
enforcer (from google-cloud-shared-config) is satisfied. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<scm>
<connection>
scm:git:git@github.com:googleapis/java-bigtable-hbase.git
Expand Down Expand Up @@ -173,8 +191,12 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<!-- MSHADE-419: 3.3.0 Shade plugin causes pom to be created without compile dependencies -->
<version>3.2.4</version>
<!-- 3.6.0+ bundles ASM 9, which can process the Java 17 multi-release classes that
google-cloud-bigtable now pulls in transitively (jackson-core 2.18.x). 3.2.4's
older ASM fails on those with "Unsupported class file major version 61". The
MSHADE-419 regression (reduced pom dropping compile deps) seen in 3.3.0 no longer
applies; the generated dependency-reduced-pom is verified to keep compile deps. -->
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Loading