From 6ee434853bc8cbdfc5c3df4d31e311ffc60ca83e Mon Sep 17 00:00:00 2001 From: Meeral Date: Fri, 15 Sep 2023 13:12:34 +0000 Subject: [PATCH 1/3] Add new test profile to pick up test endpoints. --- google-cloud-bigtable-stats/pom.xml | 8 ++++++++ .../bigtable/stats/BigtableStackdriverStatsExporter.java | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index 02b425fa7d..5a1734fb2a 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -254,4 +254,12 @@ + + + test + + + + + diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java index f6c80fdf88..4122b1b2f6 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java @@ -24,6 +24,7 @@ import com.google.cloud.monitoring.v3.MetricServiceSettings; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; +import com.google.common.base.MoreObjects; import io.opencensus.common.Duration; import io.opencensus.exporter.metrics.util.IntervalMetricReader; import io.opencensus.exporter.metrics.util.MetricReader; @@ -44,6 +45,10 @@ public class BigtableStackdriverStatsExporter { private static final Duration EXPORT_INTERVAL = Duration.create(60, 0); private static final String RESOURCE_TYPE = "bigtable_client_raw"; + private static final String MONITORING_ENDPOINT = + MoreObjects.firstNonNull(System.getProperty("bigtable.test-monitoring-endpoint"), + MetricServiceSettings.getDefaultEndpoint()); + private final IntervalMetricReader intervalMetricReader; private BigtableStackdriverStatsExporter( @@ -84,7 +89,7 @@ static MetricServiceClient createMetricServiceClient(Credentials credentials, Du MetricServiceSettings.newBuilder() .setTransportChannelProvider(InstantiatingGrpcChannelProvider.newBuilder().build()); settingsBuilder.setCredentialsProvider(FixedCredentialsProvider.create(credentials)); - + settingsBuilder.setEndpoint(MONITORING_ENDPOINT); org.threeten.bp.Duration timeout = org.threeten.bp.Duration.ofMillis(deadline.toMillis()); settingsBuilder.createServiceTimeSeriesSettings().setSimpleTimeoutNoRetries(timeout); return MetricServiceClient.create(settingsBuilder.build()); From c4eee423be0790e6aca73b2692ca611af56aeb68 Mon Sep 17 00:00:00 2001 From: Meeral Date: Tue, 10 Oct 2023 18:42:38 +0000 Subject: [PATCH 2/3] fixed formatting --- .../bigtable/stats/BigtableStackdriverStatsExporter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java index 4122b1b2f6..76a36215c6 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java @@ -23,8 +23,8 @@ import com.google.cloud.monitoring.v3.MetricServiceClient; import com.google.cloud.monitoring.v3.MetricServiceSettings; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Preconditions; import com.google.common.base.MoreObjects; +import com.google.common.base.Preconditions; import io.opencensus.common.Duration; import io.opencensus.exporter.metrics.util.IntervalMetricReader; import io.opencensus.exporter.metrics.util.MetricReader; @@ -46,7 +46,8 @@ public class BigtableStackdriverStatsExporter { private static final String RESOURCE_TYPE = "bigtable_client_raw"; private static final String MONITORING_ENDPOINT = - MoreObjects.firstNonNull(System.getProperty("bigtable.test-monitoring-endpoint"), + MoreObjects.firstNonNull( + System.getProperty("bigtable.test-monitoring-endpoint"), MetricServiceSettings.getDefaultEndpoint()); private final IntervalMetricReader intervalMetricReader; From 0f6d9c41998b7d80a5bc564ae95202ba53b25bee Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 11 Oct 2023 15:27:22 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d992db5c8d..8b6246e79e 100644 --- a/README.md +++ b/README.md @@ -50,20 +50,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.23.0') +implementation platform('com.google.cloud:libraries-bom:26.24.0') 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.27.2' +implementation 'com.google.cloud:google-cloud-bigtable:2.27.4' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.27.2" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.27.4" ``` @@ -609,7 +609,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.27.2 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.27.4 [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