File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1 Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 2121
2222import com .google .api .MonitoredResourceDescriptor ;
2323import com .google .api .gax .batching .BatchingSettings ;
24+ import com .google .api .gax .batching .PartitionKey ;
2425import com .google .api .gax .batching .RequestBuilder ;
2526import com .google .api .gax .core .FlowControlSettings ;
2627import com .google .api .gax .core .FlowController .LimitExceededBehavior ;
@@ -399,13 +400,9 @@ public ListLogsPagedResponse createPagedListResponse(
399400 WRITE_LOG_ENTRIES_BATCHING_DESC =
400401 new BatchingDescriptor <WriteLogEntriesRequest , WriteLogEntriesResponse >() {
401402 @ Override
402- public String getBatchPartitionKey (WriteLogEntriesRequest request ) {
403- return request .getLogName ()
404- + "|"
405- + request .getResource ()
406- + "|"
407- + request .getLabels ()
408- + "|" ;
403+ public PartitionKey getBatchPartitionKey (WriteLogEntriesRequest request ) {
404+ return new PartitionKey (
405+ request .getLogName (), request .getResource (), request .getLabels ());
409406 }
410407
411408 @ Override
Original file line number Diff line number Diff line change 1919import static com .google .cloud .pubsub .spi .v1 .PagedResponseWrappers .ListTopicsPagedResponse ;
2020
2121import com .google .api .gax .batching .BatchingSettings ;
22+ import com .google .api .gax .batching .PartitionKey ;
2223import com .google .api .gax .batching .RequestBuilder ;
2324import com .google .api .gax .core .FlowControlSettings ;
2425import com .google .api .gax .core .FlowController .LimitExceededBehavior ;
@@ -371,8 +372,8 @@ public ListTopicSubscriptionsPagedResponse createPagedListResponse(
371372 private static final BatchingDescriptor <PublishRequest , PublishResponse > PUBLISH_BATCHING_DESC =
372373 new BatchingDescriptor <PublishRequest , PublishResponse >() {
373374 @ Override
374- public String getBatchPartitionKey (PublishRequest request ) {
375- return request .getTopic () + "|" ;
375+ public PartitionKey getBatchPartitionKey (PublishRequest request ) {
376+ return new PartitionKey ( request .getTopic ()) ;
376377 }
377378
378379 @ Override
Original file line number Diff line number Diff line change 9292 <github .global.server>github</github .global.server>
9393 <google .auth.version>0.6.0</google .auth.version>
9494 <grpc .version>1.0.3</grpc .version>
95- <gax .version>0.7 .0</gax .version>
95+ <gax .version>0.8 .0</gax .version>
9696 <generatedProto .version>0.1.5</generatedProto .version>
9797 <core .version>0.10.1-alpha-SNAPSHOT</core .version>
9898 <beta .version>0.10.1-beta-SNAPSHOT</beta .version>
You can’t perform that action at this time.
0 commit comments