google-cloud-bigtable 0.8.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/OVERVIEW.md +388 -19
  4. data/lib/google-cloud-bigtable.rb +0 -1
  5. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +1 -1
  6. data/lib/google/bigtable/v2/bigtable_pb.rb +3 -0
  7. data/lib/google/bigtable/v2/bigtable_services_pb.rb +1 -1
  8. data/lib/google/cloud/bigtable/admin.rb +1 -1
  9. data/lib/google/cloud/bigtable/admin/v2.rb +1 -1
  10. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +1 -1
  11. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +6 -5
  12. data/lib/google/cloud/bigtable/app_profile.rb +13 -13
  13. data/lib/google/cloud/bigtable/app_profile/list.rb +7 -7
  14. data/lib/google/cloud/bigtable/cluster.rb +7 -7
  15. data/lib/google/cloud/bigtable/cluster/list.rb +2 -2
  16. data/lib/google/cloud/bigtable/column_family.rb +3 -1
  17. data/lib/google/cloud/bigtable/column_family_map.rb +8 -8
  18. data/lib/google/cloud/bigtable/column_range.rb +6 -6
  19. data/lib/google/cloud/bigtable/gc_rule.rb +8 -8
  20. data/lib/google/cloud/bigtable/instance.rb +74 -64
  21. data/lib/google/cloud/bigtable/instance/cluster_map.rb +8 -6
  22. data/lib/google/cloud/bigtable/instance/job.rb +2 -2
  23. data/lib/google/cloud/bigtable/instance/list.rb +4 -4
  24. data/lib/google/cloud/bigtable/longrunning_job.rb +1 -1
  25. data/lib/google/cloud/bigtable/mutation_entry.rb +17 -16
  26. data/lib/google/cloud/bigtable/mutation_operations.rb +10 -11
  27. data/lib/google/cloud/bigtable/project.rb +28 -59
  28. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +6 -6
  29. data/lib/google/cloud/bigtable/read_operations.rb +14 -18
  30. data/lib/google/cloud/bigtable/routing_policy.rb +3 -2
  31. data/lib/google/cloud/bigtable/row.rb +14 -14
  32. data/lib/google/cloud/bigtable/row_filter.rb +31 -15
  33. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +49 -26
  34. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +4 -1
  35. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +44 -24
  36. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
  37. data/lib/google/cloud/bigtable/rows_reader.rb +2 -2
  38. data/lib/google/cloud/bigtable/sample_row_key.rb +1 -1
  39. data/lib/google/cloud/bigtable/table.rb +18 -18
  40. data/lib/google/cloud/bigtable/table/cluster_state.rb +10 -5
  41. data/lib/google/cloud/bigtable/table/list.rb +2 -2
  42. data/lib/google/cloud/bigtable/v2.rb +1 -1
  43. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +21 -12
  44. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +34 -13
  45. data/lib/google/cloud/bigtable/value_range.rb +14 -13
  46. data/lib/google/cloud/bigtable/version.rb +1 -1
  47. metadata +2 -2
@@ -39,7 +39,8 @@ module Google
39
39
  # * `:PLANNED_MAINTENANCE` - The table is temporarily unable to serve.
40
40
  # * `:UNPLANNED_MAINTENANCE` - The table is temporarily unable to serve.
41
41
  # * `:READY` - The table can serve.
42
- # @return [Symbol]
42
+ #
43
+ # @return [Symbol] The state of replication.
43
44
  #
44
45
  def replication_state
45
46
  @grpc.replication_state
@@ -49,7 +50,8 @@ module Google
49
50
  # The cluster was recently created, and the table must finish copying
50
51
  # over pre-existing data from other clusters before it can begin
51
52
  # receiving live replication updates and serving.
52
- # @return [Boolean]
53
+ #
54
+ # @return [Boolean] `true` if the cluster is initializing.
53
55
  #
54
56
  def initializing?
55
57
  replication_state == :INITIALIZING
@@ -58,7 +60,8 @@ module Google
58
60
  ##
59
61
  # The table is temporarily unable to serve
60
62
  # requests from this cluster due to planned internal maintenance.
61
- # @return [Boolean]
63
+ #
64
+ # @return [Boolean] `true` if the cluster is in planned maintenance.
62
65
  #
63
66
  def planned_maintenance?
64
67
  replication_state == :PLANNED_MAINTENANCE
@@ -67,7 +70,8 @@ module Google
67
70
  ##
68
71
  # The table is temporarily unable to serve requests from this
69
72
  # cluster due to unplanned or emergency maintenance.
70
- # @return [Boolean]
73
+ #
74
+ # @return [Boolean] `true` if the cluster is in unplanned maintenance.
71
75
  #
72
76
  def unplanned_maintenance?
73
77
  replication_state == :UNPLANNED_MAINTENANCE
@@ -77,7 +81,8 @@ module Google
77
81
  # The table can serve requests from this cluster.
78
82
  # Depending on replication delay, reads may not immediately
79
83
  # reflect the state of the table in other clusters.
80
- # @return [Boolean]
84
+ #
85
+ # @return [Boolean] `true` if the cluster is ready.
81
86
  #
82
87
  def ready?
83
88
  replication_state == :READY
@@ -92,11 +92,11 @@ module Google
92
92
  # over the results returned by a single API call). Use with caution.
93
93
  #
94
94
  # @yield [table] The block for accessing each table instance.
95
- # @yieldparam [Table] instance The table instance object.
95
+ # @yieldparam [Table] table The table instance object.
96
96
  #
97
97
  # @return [Enumerator]
98
98
  #
99
- # @example Iterating each instance by passing a block:
99
+ # @example Iterating each table by passing a block:
100
100
  # require "google/cloud/bigtable"
101
101
  #
102
102
  # bigtable = Google::Cloud::Bigtable.new
@@ -21,7 +21,7 @@ module Google
21
21
  # rubocop:disable LineLength
22
22
 
23
23
  ##
24
- # # Ruby Client for Cloud Bigtable API ([Beta](https://github.com/googleapis/google-cloud-ruby#versioning))
24
+ # # Ruby Client for Cloud Bigtable API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
25
25
  #
26
26
  # [Cloud Bigtable API][Product Documentation]:
27
27
  # API for reading and writing the contents of Bigtables associated with a
@@ -250,7 +250,7 @@ module Google
250
250
  # ReadRowsResponse documentation for details.
251
251
  #
252
252
  # @param table_name [String]
253
- # The unique name of the table from which to read.
253
+ # Required. The unique name of the table from which to read.
254
254
  # Values are of the form
255
255
  # `projects/<project>/instances/<instance>/tables/<table>`.
256
256
  # @param app_profile_id [String]
@@ -308,7 +308,7 @@ module Google
308
308
  # mapreduces.
309
309
  #
310
310
  # @param table_name [String]
311
- # The unique name of the table from which to sample row keys.
311
+ # Required. The unique name of the table from which to sample row keys.
312
312
  # Values are of the form
313
313
  # `projects/<project>/instances/<instance>/tables/<table>`.
314
314
  # @param app_profile_id [String]
@@ -346,13 +346,16 @@ module Google
346
346
  # unchanged unless explicitly changed by `mutation`.
347
347
  #
348
348
  # @param table_name [String]
349
- # The unique name of the table to which the mutation should be applied.
349
+ # Required. The unique name of the table to which the mutation should be applied.
350
350
  # Values are of the form
351
351
  # `projects/<project>/instances/<instance>/tables/<table>`.
352
352
  # @param row_key [String]
353
- # The key of the row to which the mutation should be applied.
353
+ # Required. The key of the row to which the mutation should be applied.
354
+ #
355
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
356
+ # auditing systems.
354
357
  # @param mutations [Array<Google::Bigtable::V2::Mutation | Hash>]
355
- # Changes to be atomically applied to the specified row. Entries are applied
358
+ # Required. Changes to be atomically applied to the specified row. Entries are applied
356
359
  # in order, meaning that earlier mutations can be masked by later ones.
357
360
  # Must contain at least one entry and at most 100000.
358
361
  # A hash of the same form as `Google::Bigtable::V2::Mutation`
@@ -403,9 +406,9 @@ module Google
403
406
  # atomically.
404
407
  #
405
408
  # @param table_name [String]
406
- # The unique name of the table to which the mutations should be applied.
409
+ # Required. The unique name of the table to which the mutations should be applied.
407
410
  # @param entries [Array<Google::Bigtable::V2::MutateRowsRequest::Entry | Hash>]
408
- # The row keys and corresponding mutations to be applied in bulk.
411
+ # Required. The row keys and corresponding mutations to be applied in bulk.
409
412
  # Each entry is applied as an atomic mutation, but the entries may be
410
413
  # applied in arbitrary order (even between entries for the same row).
411
414
  # At least one entry must be specified, and in total the entries can
@@ -451,12 +454,15 @@ module Google
451
454
  # Mutates a row atomically based on the output of a predicate Reader filter.
452
455
  #
453
456
  # @param table_name [String]
454
- # The unique name of the table to which the conditional mutation should be
457
+ # Required. The unique name of the table to which the conditional mutation should be
455
458
  # applied.
456
459
  # Values are of the form
457
460
  # `projects/<project>/instances/<instance>/tables/<table>`.
458
461
  # @param row_key [String]
459
- # The key of the row to which the conditional mutation should be applied.
462
+ # Required. The key of the row to which the conditional mutation should be applied.
463
+ #
464
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
465
+ # auditing systems.
460
466
  # @param app_profile_id [String]
461
467
  # This value specifies routing for replication. If not specified, the
462
468
  # "default" application profile will be used.
@@ -529,14 +535,17 @@ module Google
529
535
  # time. The method returns the new contents of all modified cells.
530
536
  #
531
537
  # @param table_name [String]
532
- # The unique name of the table to which the read/modify/write rules should be
538
+ # Required. The unique name of the table to which the read/modify/write rules should be
533
539
  # applied.
534
540
  # Values are of the form
535
541
  # `projects/<project>/instances/<instance>/tables/<table>`.
536
542
  # @param row_key [String]
537
- # The key of the row to which the read/modify/write rules should be applied.
543
+ # Required. The key of the row to which the read/modify/write rules should be applied.
544
+ #
545
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
546
+ # auditing systems.
538
547
  # @param rules [Array<Google::Bigtable::V2::ReadModifyWriteRule | Hash>]
539
- # Rules specifying how the specified row's contents are to be transformed
548
+ # Required. Rules specifying how the specified row's contents are to be transformed
540
549
  # into writes. Entries are applied in order, meaning that earlier rules will
541
550
  # affect the results of later ones.
542
551
  # A hash of the same form as `Google::Bigtable::V2::ReadModifyWriteRule`
@@ -19,7 +19,7 @@ module Google
19
19
  # Request message for Bigtable.ReadRows.
20
20
  # @!attribute [rw] table_name
21
21
  # @return [String]
22
- # The unique name of the table from which to read.
22
+ # Required. The unique name of the table from which to read.
23
23
  # Values are of the form
24
24
  # `projects/<project>/instances/<instance>/tables/<table>`.
25
25
  # @!attribute [rw] app_profile_id
@@ -42,6 +42,7 @@ module Google
42
42
  # Response message for Bigtable.ReadRows.
43
43
  # @!attribute [rw] chunks
44
44
  # @return [Array<Google::Bigtable::V2::ReadRowsResponse::CellChunk>]
45
+ # A collection of a row's contents as part of the read request.
45
46
  # @!attribute [rw] last_scanned_row_key
46
47
  # @return [String]
47
48
  # Optionally the server might return the row key of the last row it
@@ -60,6 +61,9 @@ module Google
60
61
  # this CellChunk is a continuation of the same row as the previous
61
62
  # CellChunk in the response stream, even if that CellChunk was in a
62
63
  # previous ReadRowsResponse message.
64
+ #
65
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
66
+ # auditing systems.
63
67
  # @!attribute [rw] family_name
64
68
  # @return [Google::Protobuf::StringValue]
65
69
  # The column family name for this chunk of data. If this message
@@ -117,7 +121,7 @@ module Google
117
121
  # Request message for Bigtable.SampleRowKeys.
118
122
  # @!attribute [rw] table_name
119
123
  # @return [String]
120
- # The unique name of the table from which to sample row keys.
124
+ # Required. The unique name of the table from which to sample row keys.
121
125
  # Values are of the form
122
126
  # `projects/<project>/instances/<instance>/tables/<table>`.
123
127
  # @!attribute [rw] app_profile_id
@@ -136,6 +140,9 @@ module Google
136
140
  # Note that row keys in this list may not have ever been written to or read
137
141
  # from, and users should therefore not make any assumptions about the row key
138
142
  # structure that are specific to their use case.
143
+ #
144
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
145
+ # auditing systems.
139
146
  # @!attribute [rw] offset_bytes
140
147
  # @return [Integer]
141
148
  # Approximate total storage space used by all rows in the table which precede
@@ -147,7 +154,7 @@ module Google
147
154
  # Request message for Bigtable.MutateRow.
148
155
  # @!attribute [rw] table_name
149
156
  # @return [String]
150
- # The unique name of the table to which the mutation should be applied.
157
+ # Required. The unique name of the table to which the mutation should be applied.
151
158
  # Values are of the form
152
159
  # `projects/<project>/instances/<instance>/tables/<table>`.
153
160
  # @!attribute [rw] app_profile_id
@@ -156,10 +163,13 @@ module Google
156
163
  # "default" application profile will be used.
157
164
  # @!attribute [rw] row_key
158
165
  # @return [String]
159
- # The key of the row to which the mutation should be applied.
166
+ # Required. The key of the row to which the mutation should be applied.
167
+ #
168
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
169
+ # auditing systems.
160
170
  # @!attribute [rw] mutations
161
171
  # @return [Array<Google::Bigtable::V2::Mutation>]
162
- # Changes to be atomically applied to the specified row. Entries are applied
172
+ # Required. Changes to be atomically applied to the specified row. Entries are applied
163
173
  # in order, meaning that earlier mutations can be masked by later ones.
164
174
  # Must contain at least one entry and at most 100000.
165
175
  class MutateRowRequest; end
@@ -170,25 +180,29 @@ module Google
170
180
  # Request message for BigtableService.MutateRows.
171
181
  # @!attribute [rw] table_name
172
182
  # @return [String]
173
- # The unique name of the table to which the mutations should be applied.
183
+ # Required. The unique name of the table to which the mutations should be applied.
174
184
  # @!attribute [rw] app_profile_id
175
185
  # @return [String]
176
186
  # This value specifies routing for replication. If not specified, the
177
187
  # "default" application profile will be used.
178
188
  # @!attribute [rw] entries
179
189
  # @return [Array<Google::Bigtable::V2::MutateRowsRequest::Entry>]
180
- # The row keys and corresponding mutations to be applied in bulk.
190
+ # Required. The row keys and corresponding mutations to be applied in bulk.
181
191
  # Each entry is applied as an atomic mutation, but the entries may be
182
192
  # applied in arbitrary order (even between entries for the same row).
183
193
  # At least one entry must be specified, and in total the entries can
184
194
  # contain at most 100000 mutations.
185
195
  class MutateRowsRequest
196
+ # A mutation for a given row.
186
197
  # @!attribute [rw] row_key
187
198
  # @return [String]
188
199
  # The key of the row to which the `mutations` should be applied.
200
+ #
201
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
202
+ # auditing systems.
189
203
  # @!attribute [rw] mutations
190
204
  # @return [Array<Google::Bigtable::V2::Mutation>]
191
- # Changes to be atomically applied to the specified row. Mutations are
205
+ # Required. Changes to be atomically applied to the specified row. Mutations are
192
206
  # applied in order, meaning that earlier mutations can be masked by
193
207
  # later ones.
194
208
  # You must specify at least one mutation.
@@ -200,6 +214,7 @@ module Google
200
214
  # @return [Array<Google::Bigtable::V2::MutateRowsResponse::Entry>]
201
215
  # One or more results for Entries from the batch request.
202
216
  class MutateRowsResponse
217
+ # The result of applying a passed mutation in the original request.
203
218
  # @!attribute [rw] index
204
219
  # @return [Integer]
205
220
  # The index into the original request's `entries` list of the Entry
@@ -216,7 +231,7 @@ module Google
216
231
  # Request message for Bigtable.CheckAndMutateRow.
217
232
  # @!attribute [rw] table_name
218
233
  # @return [String]
219
- # The unique name of the table to which the conditional mutation should be
234
+ # Required. The unique name of the table to which the conditional mutation should be
220
235
  # applied.
221
236
  # Values are of the form
222
237
  # `projects/<project>/instances/<instance>/tables/<table>`.
@@ -226,7 +241,10 @@ module Google
226
241
  # "default" application profile will be used.
227
242
  # @!attribute [rw] row_key
228
243
  # @return [String]
229
- # The key of the row to which the conditional mutation should be applied.
244
+ # Required. The key of the row to which the conditional mutation should be applied.
245
+ #
246
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
247
+ # auditing systems.
230
248
  # @!attribute [rw] predicate_filter
231
249
  # @return [Google::Bigtable::V2::RowFilter]
232
250
  # The filter to be applied to the contents of the specified row. Depending
@@ -259,7 +277,7 @@ module Google
259
277
  # Request message for Bigtable.ReadModifyWriteRow.
260
278
  # @!attribute [rw] table_name
261
279
  # @return [String]
262
- # The unique name of the table to which the read/modify/write rules should be
280
+ # Required. The unique name of the table to which the read/modify/write rules should be
263
281
  # applied.
264
282
  # Values are of the form
265
283
  # `projects/<project>/instances/<instance>/tables/<table>`.
@@ -269,10 +287,13 @@ module Google
269
287
  # "default" application profile will be used.
270
288
  # @!attribute [rw] row_key
271
289
  # @return [String]
272
- # The key of the row to which the read/modify/write rules should be applied.
290
+ # Required. The key of the row to which the read/modify/write rules should be applied.
291
+ #
292
+ # Classified as IDENTIFYING_ID to provide context around data accesses for
293
+ # auditing systems.
273
294
  # @!attribute [rw] rules
274
295
  # @return [Array<Google::Bigtable::V2::ReadModifyWriteRule>]
275
- # Rules specifying how the specified row's contents are to be transformed
296
+ # Required. Rules specifying how the specified row's contents are to be transformed
276
297
  # into writes. Entries are applied in order, meaning that earlier rules will
277
298
  # affect the results of later ones.
278
299
  class ReadModifyWriteRowRequest; end
@@ -34,7 +34,7 @@ module Google
34
34
  # bigtable = Google::Cloud::Bigtable.new
35
35
  # table = bigtable.table("my-instance", "my-table")
36
36
  #
37
- # # Range that includes all row keys including "value-001" to "value-005" excluding
37
+ # # Range that includes all row keys including "value-001" to "value-005" excluding.
38
38
  # table.new_value_range.from("value-001").to("value-005")
39
39
  #
40
40
  # # Range that includes all row keys including "value-001" up to inclusive "value-010".
@@ -46,13 +46,13 @@ module Google
46
46
  # # Range that includes all row keys exclusive "value-001" up until end of the row keys.
47
47
  # table.new_value_range.from("value-001", inclusive: false)
48
48
  #
49
- # # Range with unbounded from and the exclusive end "value-100"
49
+ # # Range with unbounded from and the exclusive end "value-100".
50
50
  # table.new_value_range.to("value-100")
51
51
  #
52
- # # Range that includes all row keys including from and end row keys "value-001", "value-100"
52
+ # # Range that includes all row keys including from and end row keys "value-001", "value-100".
53
53
  # table.new_value_range.between("value-001", "value-100")
54
54
  #
55
- # # Range that includes all row keys including "value-001" up until "value-100"
55
+ # # Range that includes all row keys including "value-001" up until "value-100".
56
56
  # table.new_value_range.of("value-001", "value-100")
57
57
  #
58
58
  class ValueRange
@@ -65,9 +65,9 @@ module Google
65
65
  ##
66
66
  # Sets the row range with the lower bound.
67
67
  #
68
- # @param value [String] value. Required
69
- # @param inclusive [String] Inclusive/Exclusive lower bound.
70
- # Default it is an inclusive lower bound.
68
+ # @param value [String] The value. Required.
69
+ # @param inclusive [Boolean] Whether the value is an inclusive or
70
+ # exclusive lower bound. Default is `true`, an inclusive lower bound.
71
71
  # @return [Google::Cloud::Bigtable::ValueRange]
72
72
  #
73
73
  # @example Inclusive lower bound.
@@ -99,8 +99,8 @@ module Google
99
99
  # Sets the value range with upper bound.
100
100
  #
101
101
  # @param value [String] value. Required
102
- # @param inclusive [String] Inclusive/Exclusive upper bound.
103
- # Default it is an exclusive upper bound.
102
+ # @param inclusive [Boolean] Whether the value is an inclusive or
103
+ # exclusive lower bound. Default is `false`, an exclusive lower bound.
104
104
  # @return [Google::Cloud::Bigtable::ValueRange]
105
105
  #
106
106
  # @example Inclusive upper bound.
@@ -129,12 +129,12 @@ module Google
129
129
  end
130
130
 
131
131
  ##
132
- # Sets the value range with the inclusive lower and upper bound.
132
+ # Sets the value range with inclusive lower and upper bounds.
133
133
  #
134
134
  # @param from_value [String] Inclusive from value. Required
135
- # @param to_value [String] Inclusive end value. Required
135
+ # @param to_value [String] Inclusive to value. Required
136
136
  # @return [Google::Cloud::Bigtable::ValueRange]
137
- # Range with inclusive from and end value.
137
+ # Range with inclusive from and to values.
138
138
  #
139
139
  # @example
140
140
  # require "google/cloud/bigtable"
@@ -149,11 +149,12 @@ module Google
149
149
  end
150
150
 
151
151
  ##
152
- # Set value range with the inclusive lower and the exclusive upper bound.
152
+ # Set value range with an inclusive lower bound and an exclusive upper bound.
153
153
  #
154
154
  # @param from_value [String] Inclusive from value
155
155
  # @param to_value [String] Exclusive to value
156
156
  # @return [Google::Cloud::Bigtable::ValueRange]
157
+ # Range with an inclusive from value and an exclusive to value.
157
158
  #
158
159
  # @example
159
160
  # require "google/cloud/bigtable"
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigtable
19
- VERSION = "0.8.0".freeze
19
+ VERSION = "1.0.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-01 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core