Skip to content

Commit acbd523

Browse files
Merge branch 'protobuf-4.x-rc' into protobuf-4.x-deps-upgrade
2 parents cd14f7e + 90e1a02 commit acbd523

18 files changed

Lines changed: 114 additions & 100 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.70.0"
2+
".": "2.70.1"
33
}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-bigtable'
5656
If you are using Gradle without BOM, add this to your dependencies:
5757

5858
```Groovy
59-
implementation 'com.google.cloud:google-cloud-bigtable:2.70.0'
59+
implementation 'com.google.cloud:google-cloud-bigtable:2.70.1'
6060
```
6161

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

6464
```Scala
65-
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.70.0"
65+
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.70.1"
6666
```
6767

6868
## Authentication
@@ -471,7 +471,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
471471
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java11.html
472472
[stability-image]: https://img.shields.io/badge/stability-stable-green
473473
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable.svg
474-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.70.0
474+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.70.1
475475
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
476476
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
477477
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

google-cloud-bigtable-bom/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>
55
<artifactId>google-cloud-bigtable-bom</artifactId>
6-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
6+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
77
<packaging>pom</packaging>
88
<parent>
99
<groupId>com.google.cloud</groupId>
@@ -63,37 +63,37 @@
6363
<dependency>
6464
<groupId>com.google.cloud</groupId>
6565
<artifactId>google-cloud-bigtable</artifactId>
66-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
66+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
6767
</dependency>
6868
<dependency>
6969
<groupId>com.google.cloud</groupId>
7070
<artifactId>google-cloud-bigtable-emulator</artifactId>
71-
<version>0.207.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
71+
<version>0.207.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
7272
</dependency>
7373
<dependency>
7474
<groupId>com.google.cloud</groupId>
7575
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
76-
<version>0.207.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
76+
<version>0.207.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
7777
</dependency>
7878
<dependency>
7979
<groupId>com.google.api.grpc</groupId>
8080
<artifactId>grpc-google-cloud-bigtable-admin-v2</artifactId>
81-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
81+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-admin-v2:current} -->
8282
</dependency>
8383
<dependency>
8484
<groupId>com.google.api.grpc</groupId>
8585
<artifactId>grpc-google-cloud-bigtable-v2</artifactId>
86-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
86+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-bigtable-v2:current} -->
8787
</dependency>
8888
<dependency>
8989
<groupId>com.google.api.grpc</groupId>
9090
<artifactId>proto-google-cloud-bigtable-admin-v2</artifactId>
91-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-admin-v2:current} -->
91+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-admin-v2:current} -->
9292
</dependency>
9393
<dependency>
9494
<groupId>com.google.api.grpc</groupId>
9595
<artifactId>proto-google-cloud-bigtable-v2</artifactId>
96-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-v2:current} -->
96+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-bigtable-v2:current} -->
9797
</dependency>
9898
</dependencies>
9999
</dependencyManagement>

google-cloud-bigtable-deps-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<groupId>com.google.cloud</groupId>
1515
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
16-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
16+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
1717

1818
<packaging>pom</packaging>
1919
<name>Google Cloud Bigtable Dependency BOM</name>

google-cloud-bigtable-emulator-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<parent>
88
<artifactId>google-cloud-bigtable-parent</artifactId>
99
<groupId>com.google.cloud</groupId>
10-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
10+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
1111
</parent>
1212
<name>Google Cloud Java - Bigtable Emulator Core</name>
1313

1414
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
15-
<version>0.207.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
15+
<version>0.207.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
1616

1717
<description>
1818
A Java wrapper for the Cloud Bigtable emulator.

google-cloud-bigtable-emulator/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<artifactId>google-cloud-bigtable-emulator</artifactId>
8-
<version>0.207.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
8+
<version>0.207.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
99
<name>Google Cloud Java - Bigtable Emulator</name>
1010
<url>https://github.com/googleapis/java-bigtable</url>
1111
<description>
@@ -14,7 +14,7 @@
1414
<parent>
1515
<groupId>com.google.cloud</groupId>
1616
<artifactId>google-cloud-bigtable-parent</artifactId>
17-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
17+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
1818
</parent>
1919
<scm>
2020
<connection>scm:git:git@github.com:googleapis/java-bigtable.git</connection>
@@ -81,14 +81,14 @@
8181
<dependency>
8282
<groupId>com.google.cloud</groupId>
8383
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
84-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
84+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
8585
<type>pom</type>
8686
<scope>import</scope>
8787
</dependency>
8888
<dependency>
8989
<groupId>com.google.cloud</groupId>
9090
<artifactId>google-cloud-bigtable-bom</artifactId>
91-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
91+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
9292
<type>pom</type>
9393
<scope>import</scope>
9494
</dependency>
@@ -99,7 +99,7 @@
9999
<dependency>
100100
<groupId>com.google.cloud</groupId>
101101
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
102-
<version>0.207.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
102+
<version>0.207.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
103103
</dependency>
104104

105105
<dependency>

google-cloud-bigtable/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-bigtable</artifactId>
5-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
5+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
66
<packaging>jar</packaging>
77
<name>Google Cloud Bigtable</name>
88
<url>https://github.com/googleapis/java-bigtable</url>
@@ -12,11 +12,11 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-bigtable-parent</artifactId>
15-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
15+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
1616
</parent>
1717
<properties>
1818
<!-- The version that will be embedded in the published jar via maven-resources-plugin -->
19-
<java-bigtable.version>2.70.1-rc1-SNAPSHOT</java-bigtable.version><!-- {x-version-update:google-cloud-bigtable:current} -->
19+
<java-bigtable.version>2.70.2-SNAPSHOT</java-bigtable.version><!-- {x-version-update:google-cloud-bigtable:current} -->
2020

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

@@ -54,14 +54,14 @@
5454
<dependency>
5555
<groupId>com.google.cloud</groupId>
5656
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
57-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
57+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
5858
<type>pom</type>
5959
<scope>import</scope>
6060
</dependency>
6161
<dependency>
6262
<groupId>com.google.cloud</groupId>
6363
<artifactId>google-cloud-bigtable-bom</artifactId>
64-
<version>2.70.1-rc1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
64+
<version>2.70.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
6565
<type>pom</type>
6666
<scope>import</scope>
6767
</dependency>

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
@InternalApi("For internal use only")
2121
public final class Version {
2222
// {x-version-update-start:google-cloud-bigtable:current}
23-
public static String VERSION = "2.70.1-rc1-SNAPSHOT";
23+
public static String VERSION = "2.70.2-SNAPSHOT";
2424
// {x-version-update-end}
2525
}

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import com.google.monitoring.v3.TimeInterval;
5555
import com.google.monitoring.v3.TimeSeries;
5656
import com.google.monitoring.v3.TypedValue;
57+
import com.google.protobuf.Timestamp;
5758
import com.google.protobuf.util.Timestamps;
5859
import io.opentelemetry.api.common.AttributeKey;
5960
import io.opentelemetry.api.common.Attributes;
@@ -281,11 +282,19 @@ private static TimeSeries convertPointToBigtableTimeSeries(
281282
metricBuilder.putLabels(CLIENT_UID_KEY.getKey(), taskId);
282283
builder.setMetric(metricBuilder.build());
283284

285+
MetricKind kind = convertMetricKind(metricData);
286+
287+
Timestamp endTimestamp = Timestamps.fromNanos(pointData.getEpochNanos());
288+
Timestamp startTimestamp;
289+
290+
if (kind == GAUGE) {
291+
// GAUGE metrics must have start_time equal to end_time.
292+
startTimestamp = endTimestamp;
293+
} else {
294+
startTimestamp = Timestamps.fromNanos(pointData.getStartEpochNanos());
295+
}
284296
TimeInterval timeInterval =
285-
TimeInterval.newBuilder()
286-
.setStartTime(Timestamps.fromNanos(pointData.getStartEpochNanos()))
287-
.setEndTime(Timestamps.fromNanos(pointData.getEpochNanos()))
288-
.build();
297+
TimeInterval.newBuilder().setStartTime(startTimestamp).setEndTime(endTimestamp).build();
289298

290299
builder.addPoints(createPoint(metricData.getType(), pointData, timeInterval));
291300

@@ -294,9 +303,10 @@ private static TimeSeries convertPointToBigtableTimeSeries(
294303

295304
private static Optional<TimeSeries> createInternalMetricsTimeSeries(
296305
MetricData metricData, PointData pointData, MonitoredResource applicationResource) {
306+
MetricKind kind = convertMetricKind(metricData);
297307
TimeSeries.Builder builder =
298308
TimeSeries.newBuilder()
299-
.setMetricKind(convertMetricKind(metricData))
309+
.setMetricKind(kind)
300310
.setValueType(convertValueType(metricData.getType()))
301311
.setResource(applicationResource);
302312

@@ -318,11 +328,15 @@ private static Optional<TimeSeries> createInternalMetricsTimeSeries(
318328

319329
builder.setMetric(metricBuilder.build());
320330

331+
Timestamp endTimestamp = Timestamps.fromNanos(pointData.getEpochNanos());
332+
Timestamp startTimestamp;
333+
if (kind == GAUGE) {
334+
startTimestamp = endTimestamp;
335+
} else {
336+
startTimestamp = Timestamps.fromNanos(pointData.getStartEpochNanos());
337+
}
321338
TimeInterval timeInterval =
322-
TimeInterval.newBuilder()
323-
.setStartTime(Timestamps.fromNanos(pointData.getStartEpochNanos()))
324-
.setEndTime(Timestamps.fromNanos(pointData.getEpochNanos()))
325-
.build();
339+
TimeInterval.newBuilder().setStartTime(startTimestamp).setEndTime(endTimestamp).build();
326340

327341
builder.addPoints(createPoint(metricData.getType(), pointData, timeInterval));
328342
return Optional.of(builder.build());
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
/*
2-
* Copyright 2021 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-
* https://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;
17-
18-
import static com.google.common.truth.Truth.assertThat;
19-
20-
import org.junit.Test;
21-
import org.junit.runner.RunWith;
22-
import org.junit.runners.JUnit4;
23-
24-
/** Smoke test to ensure that release tooling doesn't accidentally corrupt the version */
25-
@RunWith(JUnit4.class)
26-
public class VersionTest {
27-
@Test
28-
public void testVersion() {
29-
assertThat(Version.VERSION).matches("\\d+\\.\\d+\\.\\d(?:-SNAPSHOT)?");
30-
31-
assertThat(Version.VERSION).isGreaterThan("1.22.0");
32-
}
33-
}
1+
/*
2+
* Copyright 2021 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+
* https://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;
17+
18+
import static com.google.common.truth.Truth.assertThat;
19+
20+
import org.junit.Test;
21+
import org.junit.runner.RunWith;
22+
import org.junit.runners.JUnit4;
23+
24+
/** Smoke test to ensure that release tooling doesn't accidentally corrupt the version */
25+
@RunWith(JUnit4.class)
26+
public class VersionTest {
27+
@Test
28+
public void testVersion() {
29+
assertThat(Version.VERSION).matches("\\d+\\.\\d+\\.\\d(?:-rc\\d)?(?:-SNAPSHOT)?");
30+
31+
assertThat(Version.VERSION).isGreaterThan("1.22.0");
32+
}
33+
}

0 commit comments

Comments
 (0)