google-cloud-bigtable 2.13.1 → 2.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/google/cloud/bigtable/app_profile.rb +8 -0
- data/lib/google/cloud/bigtable/backup.rb +10 -0
- data/lib/google/cloud/bigtable/cluster.rb +8 -0
- data/lib/google/cloud/bigtable/column_family.rb +1 -0
- data/lib/google/cloud/bigtable/column_family_map.rb +4 -0
- data/lib/google/cloud/bigtable/gc_rule.rb +5 -0
- data/lib/google/cloud/bigtable/instance.rb +18 -0
- data/lib/google/cloud/bigtable/policy.rb +1 -0
- data/lib/google/cloud/bigtable/project.rb +8 -0
- data/lib/google/cloud/bigtable/routing_policy.rb +3 -0
- data/lib/google/cloud/bigtable/rows_mutator.rb +22 -1
- data/lib/google/cloud/bigtable/table/cluster_state.rb +1 -0
- data/lib/google/cloud/bigtable/table.rb +16 -0
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a4102f79234bab4f47e817381d67ae11eccb9e92d0e283152ec1ffcce56e2ec7
|
|
4
|
+
data.tar.gz: 8d2b1d369d3c3d2b52748bf3345a7000fca49a9b80884842d7d36387534e04f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c993080b912b360f96a5a50ec4a09fc7395c3aba0d032f4cc5edcb12bb14cc257f7b896b7f828a5d12c26ad4a8e86c4e5d5ec3f509160735d29956f2e91b5dd
|
|
7
|
+
data.tar.gz: 85b9b3a6dcd477a5c44f7e5fe31df4eab9ead85c77209b35fb37ac15eae619fc138af9b7762679c2999eed80d75fa0557b3ca17385c044c9172a914f088a09ae
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### 2.13.2 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
#### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* fix multiple conformance tests ([#36699](https://github.com/googleapis/google-cloud-ruby/issues/36699))
|
|
8
|
+
#### Documentation
|
|
9
|
+
|
|
10
|
+
* mark legacy handwritten instance admin classes and me… ([#36696](https://github.com/googleapis/google-cloud-ruby/issues/36696))
|
|
11
|
+
* mark legacy handwritten table admin classes and methods as deprecated ([#36701](https://github.com/googleapis/google-cloud-ruby/issues/36701))
|
|
12
|
+
|
|
3
13
|
### 2.13.1 (2026-10-29)
|
|
4
14
|
|
|
5
15
|
#### Documentation
|
|
@@ -45,6 +45,7 @@ module Google
|
|
|
45
45
|
#
|
|
46
46
|
# # Delete
|
|
47
47
|
# app_profile.delete
|
|
48
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
48
49
|
#
|
|
49
50
|
class AppProfile
|
|
50
51
|
# @private
|
|
@@ -119,6 +120,7 @@ module Google
|
|
|
119
120
|
# Sets the description of the app profile.
|
|
120
121
|
#
|
|
121
122
|
# @param text [String] Description text
|
|
123
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
122
124
|
#
|
|
123
125
|
def description= text
|
|
124
126
|
@grpc.description = text
|
|
@@ -190,6 +192,7 @@ module Google
|
|
|
190
192
|
# allow_transactional_writes: true
|
|
191
193
|
# )
|
|
192
194
|
# app_profile.routing_policy = routing_policy
|
|
195
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
193
196
|
#
|
|
194
197
|
def routing_policy= policy
|
|
195
198
|
routing_policy_grpc = policy.to_grpc
|
|
@@ -261,6 +264,7 @@ module Google
|
|
|
261
264
|
#
|
|
262
265
|
# # OR : Not ignoring warnings
|
|
263
266
|
# app_profile.delete
|
|
267
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
264
268
|
#
|
|
265
269
|
def delete ignore_warnings: false
|
|
266
270
|
ensure_service!
|
|
@@ -324,6 +328,7 @@ module Google
|
|
|
324
328
|
# app_profile = job.app_profile
|
|
325
329
|
# puts app_profile.name
|
|
326
330
|
# end
|
|
331
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
327
332
|
#
|
|
328
333
|
def save ignore_warnings: false
|
|
329
334
|
ensure_service!
|
|
@@ -338,6 +343,7 @@ module Google
|
|
|
338
343
|
# Reloads the app profile data.
|
|
339
344
|
#
|
|
340
345
|
# @return [Google::Cloud::Bigtable::AppProfile]
|
|
346
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
341
347
|
#
|
|
342
348
|
def reload!
|
|
343
349
|
@grpc = service.get_app_profile instance_id, name
|
|
@@ -369,6 +375,7 @@ module Google
|
|
|
369
375
|
# description: "App profile for user data instance"
|
|
370
376
|
# )
|
|
371
377
|
# puts app_profile.routing_policy
|
|
378
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
372
379
|
#
|
|
373
380
|
def self.multi_cluster_routing
|
|
374
381
|
Google::Cloud::Bigtable::MultiClusterRoutingUseAny.new
|
|
@@ -408,6 +415,7 @@ module Google
|
|
|
408
415
|
# description: "App profile for user data instance"
|
|
409
416
|
# )
|
|
410
417
|
# puts app_profile.routing_policy
|
|
418
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
411
419
|
#
|
|
412
420
|
def self.single_cluster_routing cluster_id, allow_transactional_writes: false
|
|
413
421
|
Google::Cloud::Bigtable::SingleClusterRouting.new cluster_id, allow_transactional_writes
|
|
@@ -45,6 +45,7 @@ module Google
|
|
|
45
45
|
#
|
|
46
46
|
# # Delete
|
|
47
47
|
# backup.delete
|
|
48
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
48
49
|
#
|
|
49
50
|
class Backup
|
|
50
51
|
# @private
|
|
@@ -159,6 +160,7 @@ module Google
|
|
|
159
160
|
# delete the backup and free the resources used by the backup.
|
|
160
161
|
#
|
|
161
162
|
# @param [Time] new_expire_time The new expiration time of the backup.
|
|
163
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
162
164
|
#
|
|
163
165
|
def expire_time= new_expire_time
|
|
164
166
|
@grpc.expire_time = Convert.time_to_timestamp new_expire_time
|
|
@@ -278,6 +280,7 @@ module Google
|
|
|
278
280
|
# backup.policy do |p|
|
|
279
281
|
# p.add "roles/owner", "user:owner@example.com"
|
|
280
282
|
# end # 2 API calls
|
|
283
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
281
284
|
#
|
|
282
285
|
def policy
|
|
283
286
|
ensure_service!
|
|
@@ -316,6 +319,7 @@ module Google
|
|
|
316
319
|
# updated_policy = backup.update_policy policy
|
|
317
320
|
#
|
|
318
321
|
# puts updated_policy.roles
|
|
322
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
319
323
|
#
|
|
320
324
|
def update_policy new_policy
|
|
321
325
|
ensure_service!
|
|
@@ -353,6 +357,7 @@ module Google
|
|
|
353
357
|
# )
|
|
354
358
|
# permissions.include? "bigtable.backups.delete" #=> false
|
|
355
359
|
# permissions.include? "bigtable.backups.get" #=> true
|
|
360
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
356
361
|
#
|
|
357
362
|
def test_iam_permissions *permissions
|
|
358
363
|
ensure_service!
|
|
@@ -413,6 +418,7 @@ module Google
|
|
|
413
418
|
# table = job.table
|
|
414
419
|
# optimized = job.optimize_table_operation_name
|
|
415
420
|
# end
|
|
421
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
416
422
|
#
|
|
417
423
|
def restore table_id, instance: nil
|
|
418
424
|
table_instance_id = instance.respond_to?(:instance_id) ? instance.instance_id : instance
|
|
@@ -468,6 +474,7 @@ module Google
|
|
|
468
474
|
# else
|
|
469
475
|
# backup = job.backup
|
|
470
476
|
# end
|
|
477
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
471
478
|
#
|
|
472
479
|
def copy dest_project_id:, dest_instance_id:, dest_cluster_id:, new_backup_id:, expire_time:
|
|
473
480
|
grpc = service.copy_backup project_id: dest_project_id,
|
|
@@ -498,6 +505,7 @@ module Google
|
|
|
498
505
|
# # Update
|
|
499
506
|
# backup.expire_time = Time.now + 60 * 60 * 7
|
|
500
507
|
# backup.save
|
|
508
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
501
509
|
#
|
|
502
510
|
def save
|
|
503
511
|
ensure_service!
|
|
@@ -510,6 +518,7 @@ module Google
|
|
|
510
518
|
# Reloads backup data.
|
|
511
519
|
#
|
|
512
520
|
# @return [Google::Cloud::Bigtable::Backup]
|
|
521
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
513
522
|
#
|
|
514
523
|
def reload!
|
|
515
524
|
@grpc = service.get_backup instance_id, cluster_id, backup_id
|
|
@@ -531,6 +540,7 @@ module Google
|
|
|
531
540
|
# backup = cluster.backup "my-backup"
|
|
532
541
|
#
|
|
533
542
|
# backup.delete
|
|
543
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
534
544
|
#
|
|
535
545
|
def delete
|
|
536
546
|
ensure_service!
|
|
@@ -42,6 +42,7 @@ module Google
|
|
|
42
42
|
#
|
|
43
43
|
# # Delete
|
|
44
44
|
# cluster.delete
|
|
45
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
45
46
|
#
|
|
46
47
|
class Cluster
|
|
47
48
|
# @private
|
|
@@ -160,6 +161,7 @@ module Google
|
|
|
160
161
|
# throughput and more consistent performance.
|
|
161
162
|
#
|
|
162
163
|
# @param serve_nodes [Integer] Number of nodes
|
|
164
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
163
165
|
#
|
|
164
166
|
def nodes= serve_nodes
|
|
165
167
|
@grpc.serve_nodes = serve_nodes
|
|
@@ -254,6 +256,7 @@ module Google
|
|
|
254
256
|
# else
|
|
255
257
|
# backup = job.backup
|
|
256
258
|
# end
|
|
259
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
257
260
|
#
|
|
258
261
|
def create_backup source_table, backup_id, expire_time
|
|
259
262
|
source_table_id = source_table.respond_to?(:name) ? source_table.name : source_table
|
|
@@ -285,6 +288,7 @@ module Google
|
|
|
285
288
|
# if backup
|
|
286
289
|
# puts backup.backup_id
|
|
287
290
|
# end
|
|
291
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
288
292
|
#
|
|
289
293
|
def backup backup_id
|
|
290
294
|
grpc = service.get_backup instance_id, cluster_id, backup_id
|
|
@@ -309,6 +313,7 @@ module Google
|
|
|
309
313
|
# cluster.backups.all do |backup|
|
|
310
314
|
# puts backup.backup_id
|
|
311
315
|
# end
|
|
316
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
312
317
|
#
|
|
313
318
|
def backups
|
|
314
319
|
grpc = service.list_backups instance_id, cluster_id
|
|
@@ -345,6 +350,7 @@ module Google
|
|
|
345
350
|
# else
|
|
346
351
|
# cluster = job.cluster
|
|
347
352
|
# end
|
|
353
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
348
354
|
#
|
|
349
355
|
def save
|
|
350
356
|
ensure_service!
|
|
@@ -357,6 +363,7 @@ module Google
|
|
|
357
363
|
# Reloads cluster data.
|
|
358
364
|
#
|
|
359
365
|
# @return [Google::Cloud::Bigtable::Cluster]
|
|
366
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
360
367
|
#
|
|
361
368
|
def reload!
|
|
362
369
|
@grpc = service.get_cluster instance_id, cluster_id
|
|
@@ -376,6 +383,7 @@ module Google
|
|
|
376
383
|
# instance = bigtable.instance "my-instance"
|
|
377
384
|
# cluster = instance.cluster "my-cluster"
|
|
378
385
|
# cluster.delete
|
|
386
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
379
387
|
#
|
|
380
388
|
def delete
|
|
381
389
|
ensure_service!
|
|
@@ -74,6 +74,7 @@ module Google
|
|
|
74
74
|
# end
|
|
75
75
|
#
|
|
76
76
|
# puts table.column_families["cf3"] #=> nil
|
|
77
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
77
78
|
#
|
|
78
79
|
class ColumnFamilyMap
|
|
79
80
|
include Enumerable
|
|
@@ -202,6 +203,7 @@ module Google
|
|
|
202
203
|
# column_families.add "cf4", gc_rule: Google::Cloud::Bigtable::GcRule.max_age(600)
|
|
203
204
|
# column_families.add "cf5", gc_rule: Google::Cloud::Bigtable::GcRule.max_versions(5)
|
|
204
205
|
# end
|
|
206
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
205
207
|
#
|
|
206
208
|
def add name, positional_gc_rule = nil, gc_rule: nil
|
|
207
209
|
raise ArgumentError, "column family #{name.inspect} already exists" if @column_families.has_key? name
|
|
@@ -246,6 +248,7 @@ module Google
|
|
|
246
248
|
#
|
|
247
249
|
# column_families.update "cf2", gc_rule: rule_union
|
|
248
250
|
# end
|
|
251
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
249
252
|
#
|
|
250
253
|
def update name, gc_rule: nil
|
|
251
254
|
raise ArgumentError, "column family #{name.inspect} does not exist" unless @column_families.has_key? name
|
|
@@ -275,6 +278,7 @@ module Google
|
|
|
275
278
|
# table.column_families do |column_families|
|
|
276
279
|
# column_families.delete "cf3"
|
|
277
280
|
# end
|
|
281
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
278
282
|
#
|
|
279
283
|
def delete name
|
|
280
284
|
raise ArgumentError, "column family #{name.inspect} does not exist" unless @column_families.has_key? name
|
|
@@ -63,6 +63,7 @@ module Google
|
|
|
63
63
|
# puts table.column_families["cf1"].gc_rule.max_versions
|
|
64
64
|
# puts table.column_families["cf2"].gc_rule.max_age
|
|
65
65
|
# puts table.column_families["cf3"].gc_rule.union
|
|
66
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
66
67
|
#
|
|
67
68
|
class GcRule
|
|
68
69
|
# @private
|
|
@@ -234,6 +235,7 @@ module Google
|
|
|
234
235
|
# table = bigtable.create_table "my-instance", "my-table" do |cfm|
|
|
235
236
|
# cfm.add "cf1", gc_rule: Google::Cloud::Bigtable::GcRule.max_versions(5)
|
|
236
237
|
# end
|
|
238
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
237
239
|
#
|
|
238
240
|
def self.max_versions versions
|
|
239
241
|
new.tap do |gc_rule|
|
|
@@ -255,6 +257,7 @@ module Google
|
|
|
255
257
|
# table = bigtable.create_table "my-instance", "my-table" do |cfm|
|
|
256
258
|
# cfm.add "cf1", gc_rule: Google::Cloud::Bigtable::GcRule.max_age(600)
|
|
257
259
|
# end
|
|
260
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
258
261
|
#
|
|
259
262
|
def self.max_age age
|
|
260
263
|
new.tap do |gc_rule|
|
|
@@ -281,6 +284,7 @@ module Google
|
|
|
281
284
|
# )
|
|
282
285
|
# cfm.add "cf1", gc_rule: gc_rule
|
|
283
286
|
# end
|
|
287
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
284
288
|
#
|
|
285
289
|
def self.union *rules
|
|
286
290
|
new.tap do |gc_rule|
|
|
@@ -307,6 +311,7 @@ module Google
|
|
|
307
311
|
# )
|
|
308
312
|
# cfm.add "cf1", gc_rule: gc_rule
|
|
309
313
|
# end
|
|
314
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
310
315
|
#
|
|
311
316
|
def self.intersection *rules
|
|
312
317
|
new.tap do |gc_rule|
|
|
@@ -60,6 +60,7 @@ module Google
|
|
|
60
60
|
# else
|
|
61
61
|
# instance = job.instance
|
|
62
62
|
# end
|
|
63
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
63
64
|
#
|
|
64
65
|
class Instance
|
|
65
66
|
# @private
|
|
@@ -108,6 +109,7 @@ module Google
|
|
|
108
109
|
# to avoid confusion.
|
|
109
110
|
#
|
|
110
111
|
# @param value [String] The descriptive name for the instance.
|
|
112
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
111
113
|
#
|
|
112
114
|
def display_name= value
|
|
113
115
|
@grpc.display_name = value
|
|
@@ -209,6 +211,7 @@ module Google
|
|
|
209
211
|
# instance.type = :PRODUCTION
|
|
210
212
|
# instance.development? # false
|
|
211
213
|
# instance.production? # true
|
|
214
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
212
215
|
#
|
|
213
216
|
def type= instance_type
|
|
214
217
|
@grpc.type = instance_type
|
|
@@ -240,6 +243,7 @@ module Google
|
|
|
240
243
|
# Sets the Cloud Labels for the instance.
|
|
241
244
|
#
|
|
242
245
|
# @param labels [Hash{String=>String}] The Cloud Labels.
|
|
246
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
243
247
|
#
|
|
244
248
|
def labels= labels
|
|
245
249
|
labels ||= {}
|
|
@@ -285,6 +289,7 @@ module Google
|
|
|
285
289
|
# puts instance.name
|
|
286
290
|
# puts instance.labels
|
|
287
291
|
# end
|
|
292
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
288
293
|
#
|
|
289
294
|
def save
|
|
290
295
|
ensure_service!
|
|
@@ -298,6 +303,7 @@ module Google
|
|
|
298
303
|
# Reloads instance data.
|
|
299
304
|
#
|
|
300
305
|
# @return [Google::Cloud::Bigtable::Instance]
|
|
306
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
301
307
|
#
|
|
302
308
|
def reload!
|
|
303
309
|
@grpc = service.get_instance instance_id
|
|
@@ -316,6 +322,7 @@ module Google
|
|
|
316
322
|
#
|
|
317
323
|
# instance = bigtable.instance "my-instance"
|
|
318
324
|
# instance.delete
|
|
325
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
319
326
|
#
|
|
320
327
|
def delete
|
|
321
328
|
ensure_service!
|
|
@@ -345,6 +352,7 @@ module Google
|
|
|
345
352
|
# instance.clusters.all do |cluster|
|
|
346
353
|
# puts cluster.cluster_id
|
|
347
354
|
# end
|
|
355
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
348
356
|
#
|
|
349
357
|
def clusters token: nil
|
|
350
358
|
ensure_service!
|
|
@@ -370,6 +378,7 @@ module Google
|
|
|
370
378
|
#
|
|
371
379
|
# cluster = instance.cluster "my-cluster"
|
|
372
380
|
# puts cluster.cluster_id
|
|
381
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
373
382
|
#
|
|
374
383
|
def cluster cluster_id
|
|
375
384
|
ensure_service!
|
|
@@ -422,6 +431,7 @@ module Google
|
|
|
422
431
|
# else
|
|
423
432
|
# cluster = job.cluster
|
|
424
433
|
# end
|
|
434
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
425
435
|
#
|
|
426
436
|
def create_cluster cluster_id, location, nodes: nil, storage_type: nil
|
|
427
437
|
ensure_service!
|
|
@@ -456,6 +466,7 @@ module Google
|
|
|
456
466
|
# instance.tables.all do |table|
|
|
457
467
|
# puts table.name
|
|
458
468
|
# end
|
|
469
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
459
470
|
#
|
|
460
471
|
def tables
|
|
461
472
|
ensure_service!
|
|
@@ -603,6 +614,7 @@ module Google
|
|
|
603
614
|
# end
|
|
604
615
|
#
|
|
605
616
|
# puts table
|
|
617
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
606
618
|
#
|
|
607
619
|
def create_table name, column_families: nil, granularity: nil, initial_splits: nil, &block
|
|
608
620
|
ensure_service!
|
|
@@ -703,6 +715,7 @@ module Google
|
|
|
703
715
|
# ignore_warnings: true
|
|
704
716
|
# )
|
|
705
717
|
# puts app_profile.name
|
|
718
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
706
719
|
#
|
|
707
720
|
def create_app_profile name, routing_policy, description: nil, etag: nil, ignore_warnings: false
|
|
708
721
|
ensure_service!
|
|
@@ -750,6 +763,7 @@ module Google
|
|
|
750
763
|
# if app_profile
|
|
751
764
|
# puts app_profile.name
|
|
752
765
|
# end
|
|
766
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
753
767
|
#
|
|
754
768
|
def app_profile app_profile_id
|
|
755
769
|
ensure_service!
|
|
@@ -778,6 +792,7 @@ module Google
|
|
|
778
792
|
# instance.app_profiles.all do |app_profile|
|
|
779
793
|
# puts app_profile.name
|
|
780
794
|
# end
|
|
795
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
781
796
|
#
|
|
782
797
|
def app_profiles
|
|
783
798
|
ensure_service!
|
|
@@ -817,6 +832,7 @@ module Google
|
|
|
817
832
|
# instance.policy do |p|
|
|
818
833
|
# p.add "roles/owner", "user:owner@example.com"
|
|
819
834
|
# end # 2 API calls
|
|
835
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
820
836
|
#
|
|
821
837
|
def policy
|
|
822
838
|
ensure_service!
|
|
@@ -853,6 +869,7 @@ module Google
|
|
|
853
869
|
# updated_policy = instance.update_policy policy
|
|
854
870
|
#
|
|
855
871
|
# puts updated_policy.roles
|
|
872
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
856
873
|
#
|
|
857
874
|
def update_policy new_policy
|
|
858
875
|
ensure_service!
|
|
@@ -897,6 +914,7 @@ module Google
|
|
|
897
914
|
# )
|
|
898
915
|
# permissions.include? "bigtable.instances.get" #=> true
|
|
899
916
|
# permissions.include? "bigtable.instances.update" #=> false
|
|
917
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
900
918
|
#
|
|
901
919
|
def test_iam_permissions *permissions
|
|
902
920
|
ensure_service!
|
|
@@ -52,6 +52,7 @@ module Google
|
|
|
52
52
|
# policy.remove "roles/owner", "user:owner@example.com"
|
|
53
53
|
# policy.add "roles/owner", "user:newowner@example.com"
|
|
54
54
|
# policy.roles["roles/viewer"] = ["allUsers"]
|
|
55
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} or {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
55
56
|
#
|
|
56
57
|
class Policy
|
|
57
58
|
attr_reader :etag
|
|
@@ -134,6 +134,7 @@ module Google
|
|
|
134
134
|
# instances.all do |instance|
|
|
135
135
|
# puts instance.instance_id
|
|
136
136
|
# end
|
|
137
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
137
138
|
#
|
|
138
139
|
def instances token: nil
|
|
139
140
|
ensure_service!
|
|
@@ -157,6 +158,7 @@ module Google
|
|
|
157
158
|
# if instance
|
|
158
159
|
# puts instance.instance_id
|
|
159
160
|
# end
|
|
161
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
160
162
|
#
|
|
161
163
|
def instance instance_id
|
|
162
164
|
ensure_service!
|
|
@@ -257,6 +259,7 @@ module Google
|
|
|
257
259
|
# else
|
|
258
260
|
# instance = job.instance
|
|
259
261
|
# end
|
|
262
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
260
263
|
#
|
|
261
264
|
def create_instance instance_id, display_name: nil, type: nil, labels: nil, clusters: nil
|
|
262
265
|
labels = labels.to_h { |k, v| [String(k), String(v)] } if labels
|
|
@@ -291,6 +294,7 @@ module Google
|
|
|
291
294
|
# puts cluster.cluster_id
|
|
292
295
|
# puts cluster.ready?
|
|
293
296
|
# end
|
|
297
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
294
298
|
#
|
|
295
299
|
def clusters token: nil
|
|
296
300
|
ensure_service!
|
|
@@ -314,6 +318,7 @@ module Google
|
|
|
314
318
|
# puts table.name
|
|
315
319
|
# puts table.column_families
|
|
316
320
|
# end
|
|
321
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
317
322
|
#
|
|
318
323
|
def tables instance_id
|
|
319
324
|
ensure_service!
|
|
@@ -455,6 +460,7 @@ module Google
|
|
|
455
460
|
# end
|
|
456
461
|
#
|
|
457
462
|
# puts table
|
|
463
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
458
464
|
#
|
|
459
465
|
def create_table instance_id, table_id, column_families: nil, granularity: nil, initial_splits: nil, &block
|
|
460
466
|
ensure_service!
|
|
@@ -483,6 +489,7 @@ module Google
|
|
|
483
489
|
# bigtable = Google::Cloud::Bigtable.new
|
|
484
490
|
#
|
|
485
491
|
# bigtable.delete_table "my-instance", "my-table"
|
|
492
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
486
493
|
#
|
|
487
494
|
def delete_table instance_id, table_id
|
|
488
495
|
service.delete_table instance_id, table_id
|
|
@@ -535,6 +542,7 @@ module Google
|
|
|
535
542
|
# else
|
|
536
543
|
# backup = job.backup
|
|
537
544
|
# end
|
|
545
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
538
546
|
#
|
|
539
547
|
def copy_backup dest_project_id:, dest_instance_id:, dest_cluster_id:, new_backup_id:,
|
|
540
548
|
source_instance_id:, source_cluster_id:, source_backup_id:, expire_time:
|
|
@@ -67,6 +67,7 @@ module Google
|
|
|
67
67
|
# description: "App profile for user data instance"
|
|
68
68
|
# )
|
|
69
69
|
# puts app_profile.routing_policy
|
|
70
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
70
71
|
#
|
|
71
72
|
class RoutingPolicy
|
|
72
73
|
end
|
|
@@ -95,6 +96,7 @@ module Google
|
|
|
95
96
|
# description: "App profile for user data instance"
|
|
96
97
|
# )
|
|
97
98
|
# puts app_profile.routing_policy
|
|
99
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
98
100
|
#
|
|
99
101
|
class MultiClusterRoutingUseAny < RoutingPolicy
|
|
100
102
|
# @private
|
|
@@ -139,6 +141,7 @@ module Google
|
|
|
139
141
|
# allowed by this app profile. It is unsafe to send these requests to
|
|
140
142
|
# the same table/row/column in multiple clusters.
|
|
141
143
|
# Default value is false.
|
|
144
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
|
|
142
145
|
#
|
|
143
146
|
class SingleClusterRouting < RoutingPolicy
|
|
144
147
|
attr_reader :cluster_id
|
|
@@ -98,7 +98,7 @@ module Google
|
|
|
98
98
|
app_profile_id: @table.app_profile_id,
|
|
99
99
|
call_options: call_options
|
|
100
100
|
)
|
|
101
|
-
[response.
|
|
101
|
+
[normalize_entries(response, entries.length), nil, cookies]
|
|
102
102
|
rescue GRPC::BadStatus => e
|
|
103
103
|
info = e.status_details.find { |d| d.is_a? Google::Rpc::RetryInfo }
|
|
104
104
|
delay = if info&.retry_delay
|
|
@@ -117,6 +117,27 @@ module Google
|
|
|
117
117
|
[statuses, delay, cookies]
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
+
def normalize_entries response, count
|
|
121
|
+
by_index = {}
|
|
122
|
+
response.each do |res|
|
|
123
|
+
res.entries.each { |e| by_index[e.index] = e if e.status }
|
|
124
|
+
end
|
|
125
|
+
Array.new count do |i|
|
|
126
|
+
by_index[i] || missing_entry(i)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def missing_entry index
|
|
131
|
+
status = Google::Rpc::Status.new(
|
|
132
|
+
code: Google::Rpc::Code::INTERNAL,
|
|
133
|
+
message: "Missing entry result in MutateRows response"
|
|
134
|
+
)
|
|
135
|
+
Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry.new(
|
|
136
|
+
index: index,
|
|
137
|
+
status: status
|
|
138
|
+
)
|
|
139
|
+
end
|
|
140
|
+
|
|
120
141
|
##
|
|
121
142
|
# Collects failed entries, retries mutation, and updates status.
|
|
122
143
|
#
|
|
@@ -133,6 +133,7 @@ module Google
|
|
|
133
133
|
# * `:FULL` - Populates all fields.
|
|
134
134
|
#
|
|
135
135
|
# @return [Google::Cloud::Bigtable::Table]
|
|
136
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
136
137
|
#
|
|
137
138
|
def reload! view: nil
|
|
138
139
|
view ||= :SCHEMA_VIEW
|
|
@@ -167,6 +168,7 @@ module Google
|
|
|
167
168
|
# puts cs.replication_state
|
|
168
169
|
# puts cs.encryption_infos.first.encryption_type
|
|
169
170
|
# end
|
|
171
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
170
172
|
#
|
|
171
173
|
def cluster_states
|
|
172
174
|
check_view_and_load :FULL, skip_if: [:ENCRYPTION_VIEW, :REPLICATION_VIEW]
|
|
@@ -239,6 +241,7 @@ module Google
|
|
|
239
241
|
# end
|
|
240
242
|
#
|
|
241
243
|
# puts table.column_families["cf3"] #=> nil
|
|
244
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
242
245
|
#
|
|
243
246
|
def column_families
|
|
244
247
|
check_view_and_load :SCHEMA_VIEW
|
|
@@ -263,6 +266,7 @@ module Google
|
|
|
263
266
|
# or `FULL`. Previously loaded data is retained.
|
|
264
267
|
#
|
|
265
268
|
# @return [Symbol]
|
|
269
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
266
270
|
#
|
|
267
271
|
def granularity
|
|
268
272
|
check_view_and_load :SCHEMA_VIEW
|
|
@@ -273,6 +277,7 @@ module Google
|
|
|
273
277
|
# The table keeps data versioned at a granularity of 1 ms.
|
|
274
278
|
#
|
|
275
279
|
# @return [Boolean]
|
|
280
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
276
281
|
#
|
|
277
282
|
def granularity_millis?
|
|
278
283
|
granularity == :MILLIS
|
|
@@ -311,6 +316,7 @@ module Google
|
|
|
311
316
|
# table.policy do |p|
|
|
312
317
|
# p.add "roles/owner", "user:owner@example.com"
|
|
313
318
|
# end # 2 API calls
|
|
319
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
314
320
|
#
|
|
315
321
|
def policy
|
|
316
322
|
ensure_service!
|
|
@@ -347,6 +353,7 @@ module Google
|
|
|
347
353
|
# updated_policy = table.update_policy policy
|
|
348
354
|
#
|
|
349
355
|
# puts updated_policy.roles
|
|
356
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
350
357
|
#
|
|
351
358
|
def update_policy new_policy
|
|
352
359
|
ensure_service!
|
|
@@ -382,6 +389,7 @@ module Google
|
|
|
382
389
|
# )
|
|
383
390
|
# permissions.include? "bigtable.tables.delete" #=> false
|
|
384
391
|
# permissions.include? "bigtable.tables.get" #=> true
|
|
392
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
385
393
|
#
|
|
386
394
|
def test_iam_permissions *permissions
|
|
387
395
|
ensure_service!
|
|
@@ -401,6 +409,7 @@ module Google
|
|
|
401
409
|
#
|
|
402
410
|
# table = bigtable.table "my-instance", "my-table"
|
|
403
411
|
# table.delete
|
|
412
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
404
413
|
#
|
|
405
414
|
def delete
|
|
406
415
|
ensure_service!
|
|
@@ -439,6 +448,7 @@ module Google
|
|
|
439
448
|
# else
|
|
440
449
|
# p "Table does not exist"
|
|
441
450
|
# end
|
|
451
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
442
452
|
#
|
|
443
453
|
def exists?
|
|
444
454
|
!service.get_table(instance_id, name, view: :NAME_ONLY).nil?
|
|
@@ -495,6 +505,7 @@ module Google
|
|
|
495
505
|
# table = instance.table "my-table"
|
|
496
506
|
#
|
|
497
507
|
# table.generate_consistency_token # "l947XelENinaxJQP0nnrZJjHnAF7YrwW8HCJLotwrF"
|
|
508
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
498
509
|
#
|
|
499
510
|
def generate_consistency_token
|
|
500
511
|
ensure_service!
|
|
@@ -522,6 +533,7 @@ module Google
|
|
|
522
533
|
# if table.check_consistency token
|
|
523
534
|
# puts "Replication is consistent"
|
|
524
535
|
# end
|
|
536
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
525
537
|
#
|
|
526
538
|
def check_consistency token
|
|
527
539
|
ensure_service!
|
|
@@ -558,6 +570,7 @@ module Google
|
|
|
558
570
|
# if table.wait_for_replication timeout: 300, check_interval: 10
|
|
559
571
|
# puts "Replication done"
|
|
560
572
|
# end
|
|
573
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
561
574
|
#
|
|
562
575
|
def wait_for_replication timeout: 600, check_interval: 5
|
|
563
576
|
raise InvalidArgumentError, "'check_interval' cannot be greater than timeout" if check_interval > timeout
|
|
@@ -593,6 +606,7 @@ module Google
|
|
|
593
606
|
#
|
|
594
607
|
# # With timeout
|
|
595
608
|
# table.delete_all_rows timeout: 120 # 120 seconds.
|
|
609
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
596
610
|
#
|
|
597
611
|
def delete_all_rows timeout: nil
|
|
598
612
|
drop_row_range delete_all_data: true, timeout: timeout
|
|
@@ -615,6 +629,7 @@ module Google
|
|
|
615
629
|
#
|
|
616
630
|
# # With timeout
|
|
617
631
|
# table.delete_rows_by_prefix "user-1", timeout: 120 # 120 seconds.
|
|
632
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
618
633
|
#
|
|
619
634
|
def delete_rows_by_prefix prefix, timeout: nil
|
|
620
635
|
drop_row_range row_key_prefix: prefix, timeout: timeout
|
|
@@ -640,6 +655,7 @@ module Google
|
|
|
640
655
|
#
|
|
641
656
|
# # Delete all data With timeout
|
|
642
657
|
# table.drop_row_range delete_all_data: true, timeout: 120 # 120 seconds.
|
|
658
|
+
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
|
|
643
659
|
#
|
|
644
660
|
def drop_row_range row_key_prefix: nil, delete_all_data: nil, timeout: nil
|
|
645
661
|
ensure_service!
|