Skip to content

Commit 7d073cd

Browse files
deps: update dependency com.google.cloud:google-cloud-pubsublite to v0.18.0 (#221)
1 parent 372589a commit 7d073cd

6 files changed

Lines changed: 15 additions & 14 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<dependency>
4444
<groupId>com.google.cloud</groupId>
4545
<artifactId>google-cloud-pubsublite</artifactId>
46-
<version>0.16.1</version>
46+
<version>0.18.0</version>
4747
</dependency>
4848
<dependency>
4949
<groupId>com.google.api.grpc</groupId>

samples/snapshot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<dependency>
4545
<groupId>com.google.cloud</groupId>
4646
<artifactId>google-cloud-pubsublite</artifactId>
47-
<version>0.16.1</version>
47+
<version>0.18.0</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>junit</groupId>

samples/snippets/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<dependency>
4545
<groupId>com.google.cloud</groupId>
4646
<artifactId>google-cloud-pubsublite</artifactId>
47-
<version>0.16.1</version>
47+
<version>0.18.0</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>junit</groupId>

samples/snippets/src/main/java/pubsublite/spark/AdminUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import com.google.cloud.pubsub.v1.AckReplyConsumer;
2424
import com.google.cloud.pubsub.v1.MessageReceiver;
2525
import com.google.cloud.pubsublite.AdminClient;
26-
import com.google.cloud.pubsublite.AdminClient.BacklogLocation;
2726
import com.google.cloud.pubsublite.AdminClientSettings;
27+
import com.google.cloud.pubsublite.BacklogLocation;
2828
import com.google.cloud.pubsublite.CloudRegion;
2929
import com.google.cloud.pubsublite.CloudZone;
3030
import com.google.cloud.pubsublite.MessageMetadata;

src/main/java/com/google/cloud/pubsublite/spark/PslReadDataSourceOptions.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ PartitionSubscriberFactory getSubscriberFactory() {
148148
try {
149149
SubscriberServiceClient serviceClient =
150150
SubscriberServiceClient.create(
151-
addDefaultSettings(this.subscriptionPath().location().region(), settingsBuilder));
151+
addDefaultSettings(
152+
this.subscriptionPath().location().extractRegion(), settingsBuilder));
152153
return SubscriberBuilder.newBuilder()
153154
.setSubscriptionPath(this.subscriptionPath())
154155
.setPartition(partition)
@@ -170,7 +171,7 @@ private CursorServiceClient newCursorServiceClient() {
170171
try {
171172
return CursorServiceClient.create(
172173
addDefaultSettings(
173-
this.subscriptionPath().location().region(),
174+
this.subscriptionPath().location().extractRegion(),
174175
CursorServiceSettings.newBuilder()
175176
.setCredentialsProvider(new PslCredentialsProvider(credentialsKey()))));
176177
} catch (IOException e) {
@@ -181,7 +182,7 @@ private CursorServiceClient newCursorServiceClient() {
181182
CursorClient newCursorClient() {
182183
return CursorClient.create(
183184
CursorClientSettings.newBuilder()
184-
.setRegion(this.subscriptionPath().location().region())
185+
.setRegion(this.subscriptionPath().location().extractRegion())
185186
.setServiceClient(newCursorServiceClient())
186187
.build());
187188
}
@@ -190,7 +191,7 @@ private AdminServiceClient newAdminServiceClient() {
190191
try {
191192
return AdminServiceClient.create(
192193
addDefaultSettings(
193-
this.subscriptionPath().location().region(),
194+
this.subscriptionPath().location().extractRegion(),
194195
AdminServiceSettings.newBuilder()
195196
.setCredentialsProvider(new PslCredentialsProvider(credentialsKey()))));
196197
} catch (IOException e) {
@@ -201,7 +202,7 @@ private AdminServiceClient newAdminServiceClient() {
201202
AdminClient newAdminClient() {
202203
return AdminClient.create(
203204
AdminClientSettings.newBuilder()
204-
.setRegion(this.subscriptionPath().location().region())
205+
.setRegion(this.subscriptionPath().location().extractRegion())
205206
.setServiceClient(newAdminServiceClient())
206207
.build());
207208
}
@@ -210,7 +211,7 @@ private TopicStatsServiceClient newTopicStatsServiceClient() {
210211
try {
211212
return TopicStatsServiceClient.create(
212213
addDefaultSettings(
213-
this.subscriptionPath().location().region(),
214+
this.subscriptionPath().location().extractRegion(),
214215
TopicStatsServiceSettings.newBuilder()
215216
.setCredentialsProvider(new PslCredentialsProvider(credentialsKey()))));
216217
} catch (IOException e) {
@@ -221,7 +222,7 @@ private TopicStatsServiceClient newTopicStatsServiceClient() {
221222
TopicStatsClient newTopicStatsClient() {
222223
return TopicStatsClient.create(
223224
TopicStatsClientSettings.newBuilder()
224-
.setRegion(this.subscriptionPath().location().region())
225+
.setRegion(this.subscriptionPath().location().extractRegion())
225226
.setServiceClient(newTopicStatsServiceClient())
226227
.build());
227228
}

src/main/java/com/google/cloud/pubsublite/spark/PslWriteDataSourceOptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private PublisherServiceClient newServiceClient(Partition partition) throws ApiE
110110
settingsBuilder);
111111
try {
112112
return PublisherServiceClient.create(
113-
addDefaultSettings(topicPath().location().region(), settingsBuilder));
113+
addDefaultSettings(topicPath().location().extractRegion(), settingsBuilder));
114114
} catch (Throwable t) {
115115
throw toCanonical(t).underlying;
116116
}
@@ -123,10 +123,10 @@ private AdminClient getAdminClient() throws ApiException {
123123
.setServiceClient(
124124
AdminServiceClient.create(
125125
addDefaultSettings(
126-
topicPath().location().region(),
126+
topicPath().location().extractRegion(),
127127
AdminServiceSettings.newBuilder()
128128
.setCredentialsProvider(getCredentialProvider()))))
129-
.setRegion(topicPath().location().region())
129+
.setRegion(topicPath().location().extractRegion())
130130
.build());
131131
} catch (Throwable t) {
132132
throw toCanonical(t).underlying;

0 commit comments

Comments
 (0)