google-cloud-bigtable-v2 0.3.0 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/bigtable/v2/bigtable_pb.rb +2 -2
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +1 -1
- data/lib/google/cloud/bigtable/v2/bigtable/client.rb +183 -85
- data/lib/google/cloud/bigtable/v2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d02a55f4a8c7dc19a84811f41a05e2a66bbeb490b62dd9b711003d3813d134c
|
4
|
+
data.tar.gz: 62165b5d0ee69e9f71d7234500eba881b7cd88f5bbfa491fdaab423fa9372110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 296322f7b4ee38842ca54883e40912df7afdc53df74ef2a9b758a2850cc8dcf16641fd09210fc8a55df7a937b3ff149476bf160f1458269ab1243a068b388063
|
7
|
+
data.tar.gz: d27e93ce14e0e39ec5c5fe99f8259737a91cadbcccb796665ac5c36b8debdf828763f172a9b6c6de4584e82f026ebdf74d649844811faa2ee2c527fe44f2376c
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-bigtable-v2
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Bigtable::V2::Bigtable::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `BIGTABLE_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `BIGTABLE_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/bigtable/v2"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/bigtable/v2"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/bigtable/v2"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/bigtable/v2"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Bigtable::V2::ReadRowsRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.read_rows request
|
38
38
|
```
|
39
39
|
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/bigtable/v2/bigtable.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
|
|
10
8
|
require 'google/bigtable/v2/data_pb'
|
11
9
|
require 'google/protobuf/wrappers_pb'
|
12
10
|
require 'google/rpc/status_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/bigtable/v2/bigtable.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.bigtable.v2.ReadRowsRequest" do
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Bigtable::V2::Bigtable::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all Bigtable clients
|
47
|
+
# ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -67,50 +66,32 @@ module Google
|
|
67
66
|
|
68
67
|
default_config.rpcs.read_rows.timeout = 43_200.0
|
69
68
|
default_config.rpcs.read_rows.retry_policy = {
|
70
|
-
initial_delay: 0.01,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 2,
|
73
|
-
retry_codes: []
|
69
|
+
initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
|
74
70
|
}
|
75
71
|
|
76
72
|
default_config.rpcs.sample_row_keys.timeout = 60.0
|
77
73
|
default_config.rpcs.sample_row_keys.retry_policy = {
|
78
|
-
initial_delay: 0.01,
|
79
|
-
max_delay: 60.0,
|
80
|
-
multiplier: 2,
|
81
|
-
retry_codes: []
|
74
|
+
initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
|
82
75
|
}
|
83
76
|
|
84
77
|
default_config.rpcs.mutate_row.timeout = 60.0
|
85
78
|
default_config.rpcs.mutate_row.retry_policy = {
|
86
|
-
initial_delay: 0.01,
|
87
|
-
max_delay: 60.0,
|
88
|
-
multiplier: 2,
|
89
|
-
retry_codes: [14, 4]
|
79
|
+
initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
|
90
80
|
}
|
91
81
|
|
92
82
|
default_config.rpcs.mutate_rows.timeout = 600.0
|
93
83
|
default_config.rpcs.mutate_rows.retry_policy = {
|
94
|
-
initial_delay: 0.01,
|
95
|
-
max_delay: 60.0,
|
96
|
-
multiplier: 2,
|
97
|
-
retry_codes: []
|
84
|
+
initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
|
98
85
|
}
|
99
86
|
|
100
87
|
default_config.rpcs.check_and_mutate_row.timeout = 20.0
|
101
88
|
default_config.rpcs.check_and_mutate_row.retry_policy = {
|
102
|
-
initial_delay: 0.01,
|
103
|
-
max_delay: 60.0,
|
104
|
-
multiplier: 2,
|
105
|
-
retry_codes: []
|
89
|
+
initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
|
106
90
|
}
|
107
91
|
|
108
92
|
default_config.rpcs.read_modify_write_row.timeout = 20.0
|
109
93
|
default_config.rpcs.read_modify_write_row.retry_policy = {
|
110
|
-
initial_delay: 0.01,
|
111
|
-
max_delay: 60.0,
|
112
|
-
multiplier: 2,
|
113
|
-
retry_codes: []
|
94
|
+
initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
|
114
95
|
}
|
115
96
|
|
116
97
|
default_config
|
@@ -142,19 +123,15 @@ module Google
|
|
142
123
|
##
|
143
124
|
# Create a new Bigtable client object.
|
144
125
|
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
# To create a new Bigtable client with the default
|
148
|
-
# configuration:
|
126
|
+
# @example
|
149
127
|
#
|
150
|
-
#
|
128
|
+
# # Create a client using the default configuration
|
129
|
+
# client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
151
130
|
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
# config.timeout = 10.0
|
157
|
-
# end
|
131
|
+
# # Create a client using a custom configuration
|
132
|
+
# client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
|
133
|
+
# config.timeout = 10.0
|
134
|
+
# end
|
158
135
|
#
|
159
136
|
# @yield [config] Configure the Bigtable client.
|
160
137
|
# @yieldparam config [Client::Configuration]
|
@@ -174,14 +151,13 @@ module Google
|
|
174
151
|
|
175
152
|
# Create credentials
|
176
153
|
credentials = @config.credentials
|
177
|
-
# Use self-signed JWT if the
|
154
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
178
155
|
# but only if the default endpoint does not have a region prefix.
|
179
|
-
enable_self_signed_jwt = @config.
|
180
|
-
@config.endpoint == Client.configure.endpoint &&
|
156
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
181
157
|
!@config.endpoint.split(".").first.include?("-")
|
182
158
|
credentials ||= Credentials.default scope: @config.scope,
|
183
159
|
enable_self_signed_jwt: enable_self_signed_jwt
|
184
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
160
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
185
161
|
credentials = Credentials.new credentials, scope: @config.scope
|
186
162
|
end
|
187
163
|
@quota_project_id = @config.quota_project
|
@@ -244,6 +220,24 @@ module Google
|
|
244
220
|
#
|
245
221
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
246
222
|
#
|
223
|
+
# @example Basic example
|
224
|
+
# require "google/cloud/bigtable/v2"
|
225
|
+
#
|
226
|
+
# # Create a client object. The client can be reused for multiple calls.
|
227
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
228
|
+
#
|
229
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
230
|
+
# request = Google::Cloud::Bigtable::V2::ReadRowsRequest.new
|
231
|
+
#
|
232
|
+
# # Call the read_rows method.
|
233
|
+
# result = client.read_rows request
|
234
|
+
#
|
235
|
+
# # The returned object is a streamed enumerable yielding elements of
|
236
|
+
# # type ::Google::Cloud::Bigtable::V2::ReadRowsResponse.
|
237
|
+
# result.each do |response|
|
238
|
+
# p response
|
239
|
+
# end
|
240
|
+
#
|
247
241
|
def read_rows request, options = nil
|
248
242
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
249
243
|
|
@@ -261,16 +255,20 @@ module Google
|
|
261
255
|
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
262
256
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
263
257
|
|
264
|
-
header_params = {
|
265
|
-
|
266
|
-
|
258
|
+
header_params = {}
|
259
|
+
if request.table_name
|
260
|
+
header_params["table_name"] = request.table_name
|
261
|
+
end
|
262
|
+
|
267
263
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
268
264
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
269
265
|
|
270
266
|
options.apply_defaults timeout: @config.rpcs.read_rows.timeout,
|
271
267
|
metadata: metadata,
|
272
268
|
retry_policy: @config.rpcs.read_rows.retry_policy
|
273
|
-
|
269
|
+
|
270
|
+
options.apply_defaults timeout: @config.timeout,
|
271
|
+
metadata: @config.metadata,
|
274
272
|
retry_policy: @config.retry_policy
|
275
273
|
|
276
274
|
@bigtable_stub.call_rpc :read_rows, request, options: options do |response, operation|
|
@@ -318,6 +316,24 @@ module Google
|
|
318
316
|
#
|
319
317
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
320
318
|
#
|
319
|
+
# @example Basic example
|
320
|
+
# require "google/cloud/bigtable/v2"
|
321
|
+
#
|
322
|
+
# # Create a client object. The client can be reused for multiple calls.
|
323
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
324
|
+
#
|
325
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
326
|
+
# request = Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new
|
327
|
+
#
|
328
|
+
# # Call the sample_row_keys method.
|
329
|
+
# result = client.sample_row_keys request
|
330
|
+
#
|
331
|
+
# # The returned object is a streamed enumerable yielding elements of
|
332
|
+
# # type ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse.
|
333
|
+
# result.each do |response|
|
334
|
+
# p response
|
335
|
+
# end
|
336
|
+
#
|
321
337
|
def sample_row_keys request, options = nil
|
322
338
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
323
339
|
|
@@ -335,16 +351,20 @@ module Google
|
|
335
351
|
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
336
352
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
337
353
|
|
338
|
-
header_params = {
|
339
|
-
|
340
|
-
|
354
|
+
header_params = {}
|
355
|
+
if request.table_name
|
356
|
+
header_params["table_name"] = request.table_name
|
357
|
+
end
|
358
|
+
|
341
359
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
342
360
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
343
361
|
|
344
362
|
options.apply_defaults timeout: @config.rpcs.sample_row_keys.timeout,
|
345
363
|
metadata: metadata,
|
346
364
|
retry_policy: @config.rpcs.sample_row_keys.retry_policy
|
347
|
-
|
365
|
+
|
366
|
+
options.apply_defaults timeout: @config.timeout,
|
367
|
+
metadata: @config.metadata,
|
348
368
|
retry_policy: @config.retry_policy
|
349
369
|
|
350
370
|
@bigtable_stub.call_rpc :sample_row_keys, request, options: options do |response, operation|
|
@@ -396,6 +416,21 @@ module Google
|
|
396
416
|
#
|
397
417
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
398
418
|
#
|
419
|
+
# @example Basic example
|
420
|
+
# require "google/cloud/bigtable/v2"
|
421
|
+
#
|
422
|
+
# # Create a client object. The client can be reused for multiple calls.
|
423
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
424
|
+
#
|
425
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
426
|
+
# request = Google::Cloud::Bigtable::V2::MutateRowRequest.new
|
427
|
+
#
|
428
|
+
# # Call the mutate_row method.
|
429
|
+
# result = client.mutate_row request
|
430
|
+
#
|
431
|
+
# # The returned object is of type Google::Cloud::Bigtable::V2::MutateRowResponse.
|
432
|
+
# p result
|
433
|
+
#
|
399
434
|
def mutate_row request, options = nil
|
400
435
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
401
436
|
|
@@ -413,16 +448,20 @@ module Google
|
|
413
448
|
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
414
449
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
415
450
|
|
416
|
-
header_params = {
|
417
|
-
|
418
|
-
|
451
|
+
header_params = {}
|
452
|
+
if request.table_name
|
453
|
+
header_params["table_name"] = request.table_name
|
454
|
+
end
|
455
|
+
|
419
456
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
420
457
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
421
458
|
|
422
459
|
options.apply_defaults timeout: @config.rpcs.mutate_row.timeout,
|
423
460
|
metadata: metadata,
|
424
461
|
retry_policy: @config.rpcs.mutate_row.retry_policy
|
425
|
-
|
462
|
+
|
463
|
+
options.apply_defaults timeout: @config.timeout,
|
464
|
+
metadata: @config.metadata,
|
426
465
|
retry_policy: @config.retry_policy
|
427
466
|
|
428
467
|
@bigtable_stub.call_rpc :mutate_row, request, options: options do |response, operation|
|
@@ -473,6 +512,24 @@ module Google
|
|
473
512
|
#
|
474
513
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
475
514
|
#
|
515
|
+
# @example Basic example
|
516
|
+
# require "google/cloud/bigtable/v2"
|
517
|
+
#
|
518
|
+
# # Create a client object. The client can be reused for multiple calls.
|
519
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
520
|
+
#
|
521
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
522
|
+
# request = Google::Cloud::Bigtable::V2::MutateRowsRequest.new
|
523
|
+
#
|
524
|
+
# # Call the mutate_rows method.
|
525
|
+
# result = client.mutate_rows request
|
526
|
+
#
|
527
|
+
# # The returned object is a streamed enumerable yielding elements of
|
528
|
+
# # type ::Google::Cloud::Bigtable::V2::MutateRowsResponse.
|
529
|
+
# result.each do |response|
|
530
|
+
# p response
|
531
|
+
# end
|
532
|
+
#
|
476
533
|
def mutate_rows request, options = nil
|
477
534
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
478
535
|
|
@@ -490,16 +547,20 @@ module Google
|
|
490
547
|
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
491
548
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
492
549
|
|
493
|
-
header_params = {
|
494
|
-
|
495
|
-
|
550
|
+
header_params = {}
|
551
|
+
if request.table_name
|
552
|
+
header_params["table_name"] = request.table_name
|
553
|
+
end
|
554
|
+
|
496
555
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
497
556
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
498
557
|
|
499
558
|
options.apply_defaults timeout: @config.rpcs.mutate_rows.timeout,
|
500
559
|
metadata: metadata,
|
501
560
|
retry_policy: @config.rpcs.mutate_rows.retry_policy
|
502
|
-
|
561
|
+
|
562
|
+
options.apply_defaults timeout: @config.timeout,
|
563
|
+
metadata: @config.metadata,
|
503
564
|
retry_policy: @config.retry_policy
|
504
565
|
|
505
566
|
@bigtable_stub.call_rpc :mutate_rows, request, options: options do |response, operation|
|
@@ -564,6 +625,21 @@ module Google
|
|
564
625
|
#
|
565
626
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
566
627
|
#
|
628
|
+
# @example Basic example
|
629
|
+
# require "google/cloud/bigtable/v2"
|
630
|
+
#
|
631
|
+
# # Create a client object. The client can be reused for multiple calls.
|
632
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
633
|
+
#
|
634
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
635
|
+
# request = Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new
|
636
|
+
#
|
637
|
+
# # Call the check_and_mutate_row method.
|
638
|
+
# result = client.check_and_mutate_row request
|
639
|
+
#
|
640
|
+
# # The returned object is of type Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse.
|
641
|
+
# p result
|
642
|
+
#
|
567
643
|
def check_and_mutate_row request, options = nil
|
568
644
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
569
645
|
|
@@ -581,16 +657,20 @@ module Google
|
|
581
657
|
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
582
658
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
583
659
|
|
584
|
-
header_params = {
|
585
|
-
|
586
|
-
|
660
|
+
header_params = {}
|
661
|
+
if request.table_name
|
662
|
+
header_params["table_name"] = request.table_name
|
663
|
+
end
|
664
|
+
|
587
665
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
588
666
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
589
667
|
|
590
668
|
options.apply_defaults timeout: @config.rpcs.check_and_mutate_row.timeout,
|
591
669
|
metadata: metadata,
|
592
670
|
retry_policy: @config.rpcs.check_and_mutate_row.retry_policy
|
593
|
-
|
671
|
+
|
672
|
+
options.apply_defaults timeout: @config.timeout,
|
673
|
+
metadata: @config.metadata,
|
594
674
|
retry_policy: @config.retry_policy
|
595
675
|
|
596
676
|
@bigtable_stub.call_rpc :check_and_mutate_row, request, options: options do |response, operation|
|
@@ -646,6 +726,21 @@ module Google
|
|
646
726
|
#
|
647
727
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
648
728
|
#
|
729
|
+
# @example Basic example
|
730
|
+
# require "google/cloud/bigtable/v2"
|
731
|
+
#
|
732
|
+
# # Create a client object. The client can be reused for multiple calls.
|
733
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
734
|
+
#
|
735
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
736
|
+
# request = Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new
|
737
|
+
#
|
738
|
+
# # Call the read_modify_write_row method.
|
739
|
+
# result = client.read_modify_write_row request
|
740
|
+
#
|
741
|
+
# # The returned object is of type Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse.
|
742
|
+
# p result
|
743
|
+
#
|
649
744
|
def read_modify_write_row request, options = nil
|
650
745
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
651
746
|
|
@@ -663,16 +758,20 @@ module Google
|
|
663
758
|
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
664
759
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
665
760
|
|
666
|
-
header_params = {
|
667
|
-
|
668
|
-
|
761
|
+
header_params = {}
|
762
|
+
if request.table_name
|
763
|
+
header_params["table_name"] = request.table_name
|
764
|
+
end
|
765
|
+
|
669
766
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
670
767
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
671
768
|
|
672
769
|
options.apply_defaults timeout: @config.rpcs.read_modify_write_row.timeout,
|
673
770
|
metadata: metadata,
|
674
771
|
retry_policy: @config.rpcs.read_modify_write_row.retry_policy
|
675
|
-
|
772
|
+
|
773
|
+
options.apply_defaults timeout: @config.timeout,
|
774
|
+
metadata: @config.metadata,
|
676
775
|
retry_policy: @config.retry_policy
|
677
776
|
|
678
777
|
@bigtable_stub.call_rpc :read_modify_write_row, request, options: options do |response, operation|
|
@@ -696,22 +795,21 @@ module Google
|
|
696
795
|
# Configuration can be applied globally to all clients, or to a single client
|
697
796
|
# on construction.
|
698
797
|
#
|
699
|
-
#
|
700
|
-
#
|
701
|
-
#
|
702
|
-
# to 20 seconds,
|
703
|
-
#
|
704
|
-
#
|
705
|
-
#
|
706
|
-
#
|
707
|
-
#
|
708
|
-
#
|
709
|
-
#
|
710
|
-
#
|
711
|
-
#
|
712
|
-
#
|
713
|
-
#
|
714
|
-
# end
|
798
|
+
# @example
|
799
|
+
#
|
800
|
+
# # Modify the global config, setting the timeout for
|
801
|
+
# # read_rows to 20 seconds,
|
802
|
+
# # and all remaining timeouts to 10 seconds.
|
803
|
+
# ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config|
|
804
|
+
# config.timeout = 10.0
|
805
|
+
# config.rpcs.read_rows.timeout = 20.0
|
806
|
+
# end
|
807
|
+
#
|
808
|
+
# # Apply the above configuration only to a new client.
|
809
|
+
# client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
|
810
|
+
# config.timeout = 10.0
|
811
|
+
# config.rpcs.read_rows.timeout = 20.0
|
812
|
+
# end
|
715
813
|
#
|
716
814
|
# @!attribute [rw] endpoint
|
717
815
|
# The hostname or hostname:port of the service endpoint.
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigtable-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.7'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -201,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
207
|
- !ruby/object:Gem::Version
|
202
208
|
version: '0'
|
203
209
|
requirements: []
|
204
|
-
rubygems_version: 3.2.
|
210
|
+
rubygems_version: 3.2.17
|
205
211
|
signing_key:
|
206
212
|
specification_version: 4
|
207
213
|
summary: API Client library for the Cloud Bigtable V2 API
|