Skip to content

Commit

Permalink
Merge branch 'main' into introduce-java-time
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomarquezp authored Dec 13, 2024
2 parents 5994e4f + f98dca1 commit 7ce813f
Show file tree
Hide file tree
Showing 21 changed files with 102 additions and 66 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.50.0](https://github.com/googleapis/java-bigtable/compare/v2.49.0...v2.50.0) (2024-12-06)


### Features

* Add support for Row Affinity app profiles ([#2341](https://github.com/googleapis/java-bigtable/issues/2341)) ([cb4d60e](https://github.com/googleapis/java-bigtable/commit/cb4d60e8ce2079a270739ad91efb05cbb1ff74f8))

## [2.49.0](https://github.com/googleapis/java-bigtable/compare/v2.48.0...v2.49.0) (2024-12-03)


Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-bigtable'
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-bigtable:2.49.0'
implementation 'com.google.cloud:google-cloud-bigtable:2.50.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.49.0"
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.50.0"
```

## Authentication
Expand Down Expand Up @@ -543,7 +543,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.49.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.50.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
16 changes: 8 additions & 8 deletions google-cloud-bigtable-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<packaging>pom</packaging>
<parent>
<groupId>com.google.cloud</groupId>
Expand Down Expand Up @@ -63,37 +63,37 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator</artifactId>
<version>0.186.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.187.0</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.186.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.187.0</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-bigtable-admin-v2</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
<version>2.50.0</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-bigtable-v2</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
<version>2.50.0</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-bigtable-admin-v2</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-admin-v2:current} -->
<version>2.50.0</version><!-- {x-version-update:proto-google-cloud-bigtable-admin-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-bigtable-v2</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-v2:current} -->
<version>2.50.0</version><!-- {x-version-update:proto-google-cloud-bigtable-v2:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-bigtable-deps-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->

<packaging>pom</packaging>
<description>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-bigtable-emulator-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<artifactId>google-cloud-bigtable-parent</artifactId>
<groupId>com.google.cloud</groupId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>

<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.186.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.187.0</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->

<description>
A Java wrapper for the Cloud Bigtable emulator.
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-bigtable-emulator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>google-cloud-bigtable-emulator</artifactId>
<version>0.186.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.187.0</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<name>Google Cloud Java - Bigtable Emulator</name>
<url>https://github.com/googleapis/java-bigtable</url>
<description>
Expand All @@ -14,7 +14,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-parent</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>
<scm>
<connection>scm:git:[email protected]:googleapis/java-bigtable.git</connection>
Expand Down Expand Up @@ -81,14 +81,14 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -99,7 +99,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>0.186.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
<version>0.187.0</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
</dependency>

<dependency>
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-bigtable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>google-cloud-bigtable</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<packaging>jar</packaging>
<name>Google Cloud Bigtable</name>
<url>https://github.com/googleapis/java-bigtable</url>
Expand All @@ -12,11 +12,11 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-parent</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>
<properties>
<!-- The version that will be embedded in the published jar via maven-resources-plugin -->
<java-bigtable.version>2.49.1-SNAPSHOT</java-bigtable.version><!-- {x-version-update:google-cloud-bigtable:current} -->
<java-bigtable.version>2.50.0</java-bigtable.version><!-- {x-version-update:google-cloud-bigtable:current} -->

<site.installationModule>google-cloud-bigtable</site.installationModule>

Expand Down Expand Up @@ -52,14 +52,14 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
@InternalApi("For internal use only")
public final class Version {
// {x-version-update-start:google-cloud-bigtable:current}
public static String VERSION = "2.49.1-SNAPSHOT";
public static String VERSION = "2.50.0";
// {x-version-update-end}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
/**
* A util class to register built-in metrics on a custom OpenTelemetry instance. This is for
* advanced usage, and is only necessary when wanting to write built-in metrics to cloud monitoring
* and custom sinks. Please refer to {@link CustomOpenTelemetryMetricsProvider} for example usage.
* and custom sinks.
*
* @deprecated Use methods in {@link CustomOpenTelemetryMetricsProvider} instead.
*/
@Deprecated
public class BuiltinMetricsView {

private BuiltinMetricsView() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
*/
package com.google.cloud.bigtable.data.v2.stub.metrics;

import com.google.auth.Credentials;
import com.google.common.base.MoreObjects;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder;
import java.io.IOException;

/**
* Set a custom OpenTelemetry instance.
Expand All @@ -26,8 +29,8 @@
* <pre>{@code
* SdkMeterProviderBuilder sdkMeterProvider = SdkMeterProvider.builder();
*
* // register Builtin metrics on your meter provider with default credentials
* BuiltinMetricsView.registerBuiltinMetrics(sdkMeterProvider);
* // Set up SdkMeterProvider for client side metrics
* CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(sdkMeterProvider);
*
* // register other metrics reader and views
* sdkMeterProvider.registerMetricReader(..);
Expand Down Expand Up @@ -63,6 +66,32 @@ public OpenTelemetry getOpenTelemetry() {
return otel;
}

/**
* Convenient method to set up SdkMeterProviderBuilder with the default credential and endpoint.
*/
public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder) throws IOException {
setupSdkMeterProvider(builder, null, null);
}

/** Convenient method to set up SdkMeterProviderBuilder with a custom credential. */
public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder, Credentials credentials)
throws IOException {
setupSdkMeterProvider(builder, credentials, null);
}

/** Convenient method to set up SdkMeterProviderBuilder with a custom endpoint. */
public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder, String endpoint)
throws IOException {
setupSdkMeterProvider(builder, null, endpoint);
}

/** Convenient method to set up SdkMeterProviderBuilder with a custom credentials and endpoint. */
public static void setupSdkMeterProvider(
SdkMeterProviderBuilder builder, Credentials credentials, String endpoint)
throws IOException {
BuiltinMetricsView.registerBuiltinMetrics(credentials, builder, endpoint);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("openTelemetry", otel).toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import com.google.cloud.bigtable.data.v2.models.Row;
import com.google.cloud.bigtable.data.v2.models.RowMutation;
import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants;
import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsView;
import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider;
import com.google.cloud.bigtable.test_helpers.env.CloudEnv;
import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator;
Expand Down Expand Up @@ -135,7 +134,7 @@ public void setup() throws IOException {

SdkMeterProviderBuilder meterProvider =
SdkMeterProvider.builder().registerMetricReader(metricReader);
BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider);
CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(meterProvider);
OpenTelemetry openTelemetry =
OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.google.cloud.bigtable.data.v2.models.Query;
import com.google.cloud.bigtable.data.v2.models.Row;
import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants;
import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsView;
import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider;
import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv;
import com.google.cloud.bigtable.test_helpers.env.TestEnvRule;
Expand Down Expand Up @@ -72,7 +71,7 @@ public void setup() throws IOException {

SdkMeterProviderBuilder meterProvider =
SdkMeterProvider.builder().registerMetricReader(metricReader);
BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider);
CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(meterProvider);
OpenTelemetry openTelemetry =
OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.google.cloud.bigtable.data.v2.BigtableDataSettings;
import com.google.cloud.bigtable.data.v2.models.RowMutation;
import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants;
import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsView;
import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider;
import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv;
import com.google.cloud.bigtable.test_helpers.env.TestEnvRule;
Expand Down Expand Up @@ -71,7 +70,7 @@ public void setup() throws IOException {

SdkMeterProviderBuilder meterProvider =
SdkMeterProvider.builder().registerMetricReader(metricReader);
BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider);
CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(meterProvider);
OpenTelemetry openTelemetry =
OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build();

Expand Down
8 changes: 4 additions & 4 deletions grpc-google-cloud-bigtable-admin-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-bigtable-admin-v2</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
<version>2.50.0</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
<name>grpc-google-cloud-bigtable-admin-v2</name>
<description>GRPC library for grpc-google-cloud-bigtable-admin-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-parent</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
8 changes: 4 additions & 4 deletions grpc-google-cloud-bigtable-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-bigtable-v2</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
<version>2.50.0</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
<name>grpc-google-cloud-bigtable-v2</name>
<description>GRPC library for grpc-google-cloud-bigtable-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-parent</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
</parent>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-bom</artifactId>
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<version>2.50.0</version><!-- {x-version-update:google-cloud-bigtable:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Loading

0 comments on commit 7ce813f

Please sign in to comment.