google-cloud-bigtable 0.7.0 → 1.1.0

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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -26
  3. data/CHANGELOG.md +55 -0
  4. data/OVERVIEW.md +388 -19
  5. data/lib/google-cloud-bigtable.rb +0 -1
  6. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +1 -1
  7. data/lib/google/bigtable/v2/bigtable_pb.rb +3 -0
  8. data/lib/google/bigtable/v2/bigtable_services_pb.rb +1 -1
  9. data/lib/google/cloud/bigtable/admin.rb +2 -2
  10. data/lib/google/cloud/bigtable/admin/v2.rb +2 -2
  11. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +1 -1
  12. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +2 -2
  13. data/lib/google/cloud/bigtable/admin/v2/credentials.rb +1 -1
  14. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +1 -1
  15. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +1 -1
  16. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +1 -1
  17. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +1 -1
  18. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +1 -1
  19. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +1 -1
  20. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +7 -6
  21. data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +2 -2
  22. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +1 -1
  23. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +1 -1
  24. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +1 -1
  25. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +1 -1
  26. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +1 -1
  27. data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +7 -55
  28. data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +1 -1
  29. data/lib/google/cloud/bigtable/app_profile.rb +13 -13
  30. data/lib/google/cloud/bigtable/app_profile/list.rb +7 -7
  31. data/lib/google/cloud/bigtable/chunk_processor.rb +1 -1
  32. data/lib/google/cloud/bigtable/cluster.rb +7 -7
  33. data/lib/google/cloud/bigtable/cluster/list.rb +2 -2
  34. data/lib/google/cloud/bigtable/column_family.rb +3 -9
  35. data/lib/google/cloud/bigtable/column_family_map.rb +8 -8
  36. data/lib/google/cloud/bigtable/column_range.rb +6 -6
  37. data/lib/google/cloud/bigtable/gc_rule.rb +8 -8
  38. data/lib/google/cloud/bigtable/instance.rb +78 -71
  39. data/lib/google/cloud/bigtable/instance/cluster_map.rb +8 -6
  40. data/lib/google/cloud/bigtable/instance/job.rb +2 -2
  41. data/lib/google/cloud/bigtable/instance/list.rb +4 -4
  42. data/lib/google/cloud/bigtable/longrunning_job.rb +1 -1
  43. data/lib/google/cloud/bigtable/mutation_entry.rb +17 -16
  44. data/lib/google/cloud/bigtable/mutation_operations.rb +13 -49
  45. data/lib/google/cloud/bigtable/policy.rb +1 -1
  46. data/lib/google/cloud/bigtable/project.rb +28 -59
  47. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +6 -6
  48. data/lib/google/cloud/bigtable/read_operations.rb +15 -19
  49. data/lib/google/cloud/bigtable/routing_policy.rb +3 -2
  50. data/lib/google/cloud/bigtable/row.rb +14 -14
  51. data/lib/google/cloud/bigtable/row_filter.rb +31 -15
  52. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +49 -26
  53. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +4 -1
  54. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +44 -24
  55. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
  56. data/lib/google/cloud/bigtable/rows_mutator.rb +1 -5
  57. data/lib/google/cloud/bigtable/rows_reader.rb +5 -4
  58. data/lib/google/cloud/bigtable/sample_row_key.rb +1 -1
  59. data/lib/google/cloud/bigtable/service.rb +94 -14
  60. data/lib/google/cloud/bigtable/table.rb +130 -27
  61. data/lib/google/cloud/bigtable/table/cluster_state.rb +10 -5
  62. data/lib/google/cloud/bigtable/table/list.rb +2 -2
  63. data/lib/google/cloud/bigtable/v2.rb +2 -2
  64. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +13 -13
  65. data/lib/google/cloud/bigtable/v2/credentials.rb +1 -1
  66. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +17 -14
  67. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +1 -1
  68. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +1 -1
  69. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +1 -1
  70. data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +7 -55
  71. data/lib/google/cloud/bigtable/value_range.rb +14 -13
  72. data/lib/google/cloud/bigtable/version.rb +1 -1
  73. metadata +42 -2
@@ -25,10 +25,13 @@ module Google
25
25
  # A RowFilter that sends rows through several RowFilters in sequence.
26
26
  #
27
27
  # The elements of "filters" are chained together to process the input row:
28
- # in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
28
+ #
29
+ # in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
30
+ #
29
31
  # The full chain is executed atomically.
30
32
  #
31
33
  # @example
34
+ # require "google/cloud/bigtable"
32
35
  #
33
36
  # chain = Google::Cloud::Bigtable::RowFilter.chain
34
37
  # # Add filters to chain filter
@@ -42,12 +45,14 @@ module Google
42
45
  end
43
46
 
44
47
  ##
45
- # Adds a chain filter instance.
48
+ # Adds a chain filter.
46
49
  #
47
50
  # A Chain RowFilter that sends rows through several RowFilters in sequence.
48
51
  #
49
52
  # The elements of "filters" are chained together to process the input row:
50
- # in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
53
+ #
54
+ # in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
55
+ #
51
56
  # The full chain is executed atomically.
52
57
  #
53
58
  # @param filter [SimpleFilter, ChainFilter, InterleaveFilter, ConditionFilter]
@@ -55,6 +60,7 @@ module Google
55
60
  # `self` instance of chain filter.
56
61
  #
57
62
  # @example Create a chain filter and add a chain filter.
63
+ # require "google/cloud/bigtable"
58
64
  #
59
65
  # chain_1 = Google::Cloud::Bigtable::RowFilter.chain
60
66
  #
@@ -73,7 +79,7 @@ module Google
73
79
  end
74
80
 
75
81
  ##
76
- # Add interleave filter.
82
+ # Adds an interleave filter.
77
83
  #
78
84
  # A RowFilter that sends each row to each of several component
79
85
  # RowFilters and interleaves the results.
@@ -110,7 +116,8 @@ module Google
110
116
  # @return [Google::Cloud::Bigtable::RowFilter::ChainFilter]
111
117
  # `self` instance of chain filter.
112
118
  #
113
- # @example Add interleave filter to chain filter
119
+ # @example Add an interleave filter to the chain filter.
120
+ # require "google/cloud/bigtable"
114
121
  #
115
122
  # interleave = Google::Cloud::Bigtable::RowFilter.interleave
116
123
  #
@@ -125,7 +132,7 @@ module Google
125
132
  end
126
133
 
127
134
  ##
128
- # Adds a condition filter instance.
135
+ # Adds a condition filter.
129
136
  #
130
137
  # A RowFilter that evaluates one of two possible RowFilters, depending on
131
138
  # whether or not a predicate RowFilter outputs any cells from the input row.
@@ -142,6 +149,7 @@ module Google
142
149
  # `self` instance of chain filter.
143
150
  #
144
151
  # @example
152
+ # require "google/cloud/bigtable"
145
153
  #
146
154
  # predicate = Google::Cloud::Bigtable::RowFilter.key("user-*")
147
155
  #
@@ -159,7 +167,7 @@ module Google
159
167
  end
160
168
 
161
169
  ##
162
- # Adds a pass filter instance.
170
+ # Adds a pass filter.
163
171
  #
164
172
  # Matches all cells, regardless of input. Functionally equivalent to
165
173
  # leaving `filter` unset, but included for completeness.
@@ -168,6 +176,7 @@ module Google
168
176
  # `self` instance of chain filter.
169
177
  #
170
178
  # @example
179
+ # require "google/cloud/bigtable"
171
180
  #
172
181
  # filter = Google::Cloud::Bigtable::RowFilter.chain.pass
173
182
  #
@@ -176,7 +185,7 @@ module Google
176
185
  end
177
186
 
178
187
  ##
179
- # Adds a block-all filter instance.
188
+ # Adds a block-all filter.
180
189
  #
181
190
  # Does not match any cells, regardless of input. Useful for temporarily
182
191
  # disabling just part of a filter.
@@ -185,6 +194,7 @@ module Google
185
194
  # `self` instance of chain filter.
186
195
  #
187
196
  # @example
197
+ # require "google/cloud/bigtable"
188
198
  #
189
199
  # filter = Google::Cloud::Bigtable::RowFilter.chain.block
190
200
  #
@@ -193,7 +203,7 @@ module Google
193
203
  end
194
204
 
195
205
  ##
196
- # Adds a sink filter instance.
206
+ # Adds a sink filter.
197
207
  #
198
208
  # Outputs all cells directly to the output of the read rather than to any parent filter.
199
209
  #
@@ -201,6 +211,7 @@ module Google
201
211
  # `self` instance of chain filter.
202
212
  #
203
213
  # @example
214
+ # require "google/cloud/bigtable"
204
215
  #
205
216
  # filter = Google::Cloud::Bigtable::RowFilter.chain.sink
206
217
  #
@@ -209,7 +220,7 @@ module Google
209
220
  end
210
221
 
211
222
  ##
212
- # Adds a strip-value filter instance.
223
+ # Adds a strip-value filter.
213
224
  #
214
225
  # Replaces each cell's value with an empty string.
215
226
  #
@@ -217,6 +228,7 @@ module Google
217
228
  # `self` instance of chain filter.
218
229
  #
219
230
  # @example
231
+ # require "google/cloud/bigtable"
220
232
  #
221
233
  # filter = Google::Cloud::Bigtable::RowFilter.chain.strip_value
222
234
  #
@@ -243,6 +255,7 @@ module Google
243
255
  # `self` instance of chain filter.
244
256
  #
245
257
  # @example
258
+ # require "google/cloud/bigtable"
246
259
  #
247
260
  # filter = Google::Cloud::Bigtable::RowFilter.chain.key("user-*")
248
261
  #
@@ -251,17 +264,18 @@ module Google
251
264
  end
252
265
 
253
266
  ##
254
- # Adds a sample-probability filter instance.
267
+ # Adds a sample-probability filter.
255
268
  #
256
269
  # Matches all cells from a row with probability p, and matches no cells
257
270
  # from the row with probability 1-p.
258
271
  #
259
- # @param probability [Float] Probability value
260
- # Probability must be greather then 0 and less then 1.0.
272
+ # @param probability [Float] Probability value.
273
+ # Probability must be greater than 0 and less than 1.0.
261
274
  # @return [Google::Cloud::Bigtable::RowFilter::ChainFilter]
262
275
  # `self` instance of chain filter.
263
276
  #
264
277
  # @example
278
+ # require "google/cloud/bigtable"
265
279
  #
266
280
  # filter = Google::Cloud::Bigtable::RowFilter.chain.sample(0.5)
267
281
  #
@@ -287,6 +301,7 @@ module Google
287
301
  # `self` instance of chain filter.
288
302
  #
289
303
  # @example
304
+ # require "google/cloud/bigtable"
290
305
  #
291
306
  # filter = Google::Cloud::Bigtable::RowFilter.chain.family("cf-*")
292
307
  #
@@ -295,7 +310,7 @@ module Google
295
310
  end
296
311
 
297
312
  ##
298
- # Add a column-qualifier-match filter using a regular expression.
313
+ # Adds a column-qualifier-match filter using a regular expression.
299
314
  #
300
315
  # Matches only cells from columns whose qualifiers satisfy the given RE2
301
316
  # regex.
@@ -312,6 +327,7 @@ module Google
312
327
  # `self` instance of chain filter.
313
328
  #
314
329
  # @example
330
+ # require "google/cloud/bigtable"
315
331
  #
316
332
  # filter = Google::Cloud::Bigtable::RowFilter.chain.qualifier("user-name*")
317
333
  #
@@ -336,6 +352,7 @@ module Google
336
352
  # `self` instance of chain filter.
337
353
  #
338
354
  # @example
355
+ # require "google/cloud/bigtable"
339
356
  #
340
357
  # filter = Google::Cloud::Bigtable::RowFilter.chain.value("abc*")
341
358
  #
@@ -364,6 +381,7 @@ module Google
364
381
  # `self` instance of chain filter.
365
382
  #
366
383
  # @example
384
+ # require "google/cloud/bigtable"
367
385
  #
368
386
  # filter = Google::Cloud::Bigtable::RowFilter.chain.label("user-detail")
369
387
  #
@@ -383,6 +401,7 @@ module Google
383
401
  # `self` instance of chain filter.
384
402
  #
385
403
  # @example
404
+ # require "google/cloud/bigtable"
386
405
  #
387
406
  # filter = Google::Cloud::Bigtable::RowFilter.chain.cells_per_row_offset(3)
388
407
  #
@@ -391,17 +410,18 @@ module Google
391
410
  end
392
411
 
393
412
  ##
394
- # Adds a cells-per-row-limit filter instance.
413
+ # Adds a cells-per-row-limit filter.
395
414
  #
396
415
  # Matches only the first N cells of each row.
397
416
  # If duplicate cells are present, as is possible when using an Interleave,
398
417
  # each copy of the cell is counted separately.
399
418
  #
400
- # @param limit [String] Max cell match per row limit
419
+ # @param limit [String] Max cell match per row limit.
401
420
  # @return [Google::Cloud::Bigtable::RowFilter::ChainFilter]
402
421
  # `self` instance of chain filter.
403
422
  #
404
423
  # @example
424
+ # require "google/cloud/bigtable"
405
425
  #
406
426
  # filter = Google::Cloud::Bigtable::RowFilter.chain.cells_per_row(5)
407
427
  #
@@ -410,7 +430,7 @@ module Google
410
430
  end
411
431
 
412
432
  ##
413
- # Adds a cells-per-column filter instance.
433
+ # Adds a cells-per-column filter.
414
434
  #
415
435
  # Matches only the most recent N cells within each column. For example,
416
436
  # if N=2, this filter would match column `foo:bar` at timestamps 10 and 9,
@@ -419,11 +439,12 @@ module Google
419
439
  # If duplicate cells are present, as is possible when using an Interleave,
420
440
  # each copy of the cell is counted separately.
421
441
  #
422
- # @param limit [String] Max cell match per column limit
442
+ # @param limit [String] Max cell match per column limit.
423
443
  # @return [Google::Cloud::Bigtable::RowFilter::ChainFilter]
424
444
  # `self` instance of chain filter.
425
445
  #
426
446
  # @example
447
+ # require "google/cloud/bigtable"
427
448
  #
428
449
  # filter = Google::Cloud::Bigtable::RowFilter.chain.cells_per_column(5)
429
450
  #
@@ -432,7 +453,7 @@ module Google
432
453
  end
433
454
 
434
455
  ##
435
- # Adds a timestamp-range filter instance.
456
+ # Adds a timestamp-range filter.
436
457
  #
437
458
  # Matches only cells with timestamps within the given range.
438
459
  # Specifies a contiguous range of timestamps.
@@ -445,6 +466,7 @@ module Google
445
466
  # `self` instance of chain filter.
446
467
  #
447
468
  # @example
469
+ # require "google/cloud/bigtable"
448
470
  #
449
471
  # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
450
472
  # from = timestamp_micros - 300000000
@@ -457,12 +479,12 @@ module Google
457
479
  end
458
480
 
459
481
  ##
460
- # Adds a value-range filter instance.
482
+ # Adds a value-range filter.
461
483
  #
462
484
  # Matches only cells with values that fall within the given range.
463
485
  #
464
486
  # See {Google::Cloud::Bigtable::ValueRange#from} and { Google::Cloud::Bigtable::ValueRange#to} for range
465
- # option inclusive/exclusive options
487
+ # option inclusive/exclusive options.
466
488
  #
467
489
  # * The value at which to start the range. If neither field is set, interpreted as an empty string, inclusive.
468
490
  # * The value at which to end the range. If neither field is set, interpreted as the infinite string,
@@ -472,7 +494,7 @@ module Google
472
494
  # @return [Google::Cloud::Bigtable::RowFilter::ChainFilter]
473
495
  # `self` instance of chain filter.
474
496
  #
475
- # @example Start to end range
497
+ # @example Start to end range.
476
498
  # require "google/cloud/bigtable"
477
499
  #
478
500
  # bigtable = Google::Cloud::Bigtable.new
@@ -481,7 +503,7 @@ module Google
481
503
  # range = table.new_value_range.from("value-001").to("value-005")
482
504
  # filter = Google::Cloud::Bigtable::RowFilter.chain.value_range(range)
483
505
  #
484
- # @example Start exclusive to infinite end range
506
+ # @example Start exclusive to infinite end range.
485
507
  # require "google/cloud/bigtable"
486
508
  #
487
509
  # bigtable = Google::Cloud::Bigtable.new
@@ -495,7 +517,7 @@ module Google
495
517
  end
496
518
 
497
519
  ##
498
- # Adds a column-range filter instance.
520
+ # Adds a column-range filter.
499
521
  #
500
522
  # Matches only cells from columns within the given range.
501
523
  #
@@ -520,9 +542,10 @@ module Google
520
542
  # @return [Integer]
521
543
  #
522
544
  # @example
545
+ # require "google/cloud/bigtable"
523
546
  #
524
- # filter = Google::Cloud::Bigtable::RowFilter.chain.key("user-1*").label("user")
525
- # filter.length # 2
547
+ # filter = Google::Cloud::Bigtable::RowFilter.chain.key("user-1*").label("user")
548
+ # filter.length # 2
526
549
  #
527
550
  def length
528
551
  @filters.length
@@ -53,7 +53,7 @@ module Google
53
53
  end
54
54
 
55
55
  ##
56
- # Set a true filter on predicate-filter match.
56
+ # Sets a true filter on predicate-filter match.
57
57
  #
58
58
  # The filter to apply to the input row if `predicate_filter` returns any
59
59
  # results. If not provided, no results will be returned in the true case.
@@ -62,6 +62,7 @@ module Google
62
62
  # @return [Google::Cloud::Bigtable::RowFilter::ConditionFilter]
63
63
  #
64
64
  # @example
65
+ # require "google/cloud/bigtable"
65
66
  # predicate = Google::Cloud::Bigtable::RowFilter.key("user-*")
66
67
  #
67
68
  # label = Google::Cloud::Bigtable::RowFilter.label("user")
@@ -85,6 +86,8 @@ module Google
85
86
  # @return [Google::Cloud::Bigtable::RowFilter::ConditionFilter]
86
87
  #
87
88
  # @example
89
+ # require "google/cloud/bigtable"
90
+ #
88
91
  # predicate = Google::Cloud::Bigtable::RowFilter.key("user-*")
89
92
  #
90
93
  # label = Google::Cloud::Bigtable::RowFilter.label("user")
@@ -52,6 +52,7 @@ module Google
52
52
  # All interleaved filters are executed atomically.
53
53
  #
54
54
  # @example Create an interleave filter with a simple filter.
55
+ # require "google/cloud/bigtable"
55
56
  #
56
57
  # interleave = Google::Cloud::Bigtable::RowFilter.interleave
57
58
  #
@@ -63,14 +64,15 @@ module Google
63
64
  # interleave.key("user-*").sink
64
65
  #
65
66
  # @example Create a complex interleave filter.
67
+ # require "google/cloud/bigtable"
66
68
  #
67
- # interleave = Google::Cloud::Bigtable::RowFilter.interleave
69
+ # interleave = Google::Cloud::Bigtable::RowFilter.interleave
68
70
  #
69
- # chain_1 = Google::Cloud::Bigtable::RowFilter.chain
70
- # chain_1.label("users").qualifier("name").cells_per_row(5)
71
+ # chain_1 = Google::Cloud::Bigtable::RowFilter.chain
72
+ # chain_1.label("users").qualifier("name").cells_per_row(5)
71
73
  #
72
- # # Add to main chain filter
73
- # interleave.chain(chain_1).value("xyz*").key("user-*")
74
+ # # Add to main chain filter
75
+ # interleave.chain(chain_1).value("xyz*").key("user-*")
74
76
  #
75
77
  class InterleaveFilter
76
78
  # @private
@@ -80,7 +82,7 @@ module Google
80
82
  end
81
83
 
82
84
  ##
83
- # Adds a chain filter instance.
85
+ # Adds a chain filter.
84
86
  #
85
87
  # A Chain RowFilter that sends rows through several RowFilters in sequence.
86
88
  #
@@ -95,6 +97,7 @@ module Google
95
97
  # `self` instance of interleave filter.
96
98
  #
97
99
  # @example Create a chain filter and add an interleave filter.
100
+ # require "google/cloud/bigtable"
98
101
  #
99
102
  # chain = Google::Cloud::Bigtable::RowFilter.chain
100
103
  #
@@ -145,6 +148,7 @@ module Google
145
148
  # `self` instance of interleave filter.
146
149
  #
147
150
  # @example Add an interleave filter to a chain filter.
151
+ # require "google/cloud/bigtable"
148
152
  #
149
153
  # interleave = Google::Cloud::Bigtable::RowFilter.interleave
150
154
  #
@@ -159,7 +163,7 @@ module Google
159
163
  end
160
164
 
161
165
  ##
162
- # Adds a condition filter instance.
166
+ # Adds a condition filter.
163
167
  #
164
168
  # A RowFilter that evaluates one of two possible RowFilters, depending on
165
169
  # whether or not a predicate RowFilter outputs any cells from the input row.
@@ -176,6 +180,7 @@ module Google
176
180
  # `self` instance of interleave filter.
177
181
  #
178
182
  # @example
183
+ # require "google/cloud/bigtable"
179
184
  #
180
185
  # predicate = Google::Cloud::Bigtable::RowFilter.key("user-*")
181
186
  #
@@ -193,7 +198,7 @@ module Google
193
198
  end
194
199
 
195
200
  ##
196
- # Adds a pass filter instance.
201
+ # Adds a pass filter.
197
202
  #
198
203
  # Matches all cells, regardless of input. Functionally equivalent to
199
204
  # leaving `filter` unset, but included for completeness.
@@ -202,6 +207,7 @@ module Google
202
207
  # `self` instance of interleave filter.
203
208
  #
204
209
  # @example
210
+ # require "google/cloud/bigtable"
205
211
  #
206
212
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.pass
207
213
  #
@@ -210,7 +216,7 @@ module Google
210
216
  end
211
217
 
212
218
  ##
213
- # Adds a block-all filter instance.
219
+ # Adds a block-all filter.
214
220
  #
215
221
  # Does not match any cells, regardless of input. Useful for temporarily
216
222
  # disabling just part of a filter.
@@ -219,6 +225,7 @@ module Google
219
225
  # `self` instance of interleave filter.
220
226
  #
221
227
  # @example
228
+ # require "google/cloud/bigtable"
222
229
  #
223
230
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.block
224
231
  #
@@ -227,7 +234,7 @@ module Google
227
234
  end
228
235
 
229
236
  ##
230
- # Adds a sink filter instance.
237
+ # Adds a sink filter.
231
238
  #
232
239
  # Outputs all cells directly to the output of the read rather than to any parent filter.
233
240
  #
@@ -235,6 +242,7 @@ module Google
235
242
  # `self` instance of interleave filter.
236
243
  #
237
244
  # @example
245
+ # require "google/cloud/bigtable"
238
246
  #
239
247
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.sink
240
248
  #
@@ -243,7 +251,7 @@ module Google
243
251
  end
244
252
 
245
253
  ##
246
- # Adds a strip-value filter instance.
254
+ # Adds a strip-value filter.
247
255
  #
248
256
  # Replaces each cell's value with an empty string.
249
257
  #
@@ -251,6 +259,7 @@ module Google
251
259
  # `self` instance of interleave filter.
252
260
  #
253
261
  # @example
262
+ # require "google/cloud/bigtable"
254
263
  #
255
264
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.strip_value
256
265
  #
@@ -277,6 +286,7 @@ module Google
277
286
  # `self` instance of interleave filter.
278
287
  #
279
288
  # @example
289
+ # require "google/cloud/bigtable"
280
290
  #
281
291
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.key("user-*")
282
292
  #
@@ -285,17 +295,18 @@ module Google
285
295
  end
286
296
 
287
297
  ##
288
- # Adds a sample-probability filter instance.
298
+ # Adds a sample-probability filter.
289
299
  #
290
300
  # Matches all cells from a row with probability p, and matches no cells
291
301
  # from the row with probability 1-p.
292
302
  #
293
- # @param probability [Float] Probability value
294
- # Probability must be greather then 0 and less then 1.0
303
+ # @param probability [Float] Probability value.
304
+ # Probability must be greater than 0 and less than 1.0.
295
305
  # @return [Google::Cloud::Bigtable::RowFilter::InterleaveFilter]
296
306
  # `self` instance of interleave filter.
297
307
  #
298
308
  # @example
309
+ # require "google/cloud/bigtable"
299
310
  #
300
311
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.sample(0.5)
301
312
  #
@@ -321,6 +332,7 @@ module Google
321
332
  # `self` instance of interleave filter.
322
333
  #
323
334
  # @example
335
+ # require "google/cloud/bigtable"
324
336
  #
325
337
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.family("cf-*")
326
338
  #
@@ -346,6 +358,7 @@ module Google
346
358
  # `self` instance of interleave filter.
347
359
  #
348
360
  # @example
361
+ # require "google/cloud/bigtable"
349
362
  #
350
363
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.qualifier("user-name*")
351
364
  #
@@ -370,6 +383,7 @@ module Google
370
383
  # `self` instance of interleave filter.
371
384
  #
372
385
  # @example
386
+ # require "google/cloud/bigtable"
373
387
  #
374
388
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.value("abc*")
375
389
  #
@@ -385,7 +399,7 @@ module Google
385
399
  # the filter.
386
400
  #
387
401
  # Values must be at most 15 characters in length, and match the RE2
388
- # pattern `[a-z0-9\\-]+`
402
+ # pattern `[a-z0-9\\-]+`.
389
403
  #
390
404
  # Due to a technical limitation, it is not possible to apply
391
405
  # multiple labels to a cell. As a result, a Chain may have no more than
@@ -398,6 +412,7 @@ module Google
398
412
  # `self` instance of interleave filter.
399
413
  #
400
414
  # @example
415
+ # require "google/cloud/bigtable"
401
416
  #
402
417
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.label("user-detail")
403
418
  #
@@ -417,6 +432,7 @@ module Google
417
432
  # `self` instance of interleave filter.
418
433
  #
419
434
  # @example
435
+ # require "google/cloud/bigtable"
420
436
  #
421
437
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.cells_per_row_offset(3)
422
438
  #
@@ -425,7 +441,7 @@ module Google
425
441
  end
426
442
 
427
443
  ##
428
- # Adds a cells-per-row-limit filter instance.
444
+ # Adds a cells-per-row-limit filter.
429
445
  #
430
446
  # Matches only the first N cells of each row.
431
447
  # If duplicate cells are present, as is possible when using an interleave,
@@ -436,6 +452,7 @@ module Google
436
452
  # `self` instance of interleave filter.
437
453
  #
438
454
  # @example
455
+ # require "google/cloud/bigtable"
439
456
  #
440
457
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.cells_per_row(5)
441
458
  #
@@ -444,7 +461,7 @@ module Google
444
461
  end
445
462
 
446
463
  ##
447
- # Adds a cells-per-column filter instance.
464
+ # Adds a cells-per-column filter.
448
465
  #
449
466
  # Matches only the most recent N cells within each column. For example,
450
467
  # if N=2, this filter would match column `foo:bar` at timestamps 10 and 9,
@@ -458,6 +475,7 @@ module Google
458
475
  # `self` instance of interleave filter.
459
476
  #
460
477
  # @example
478
+ # require "google/cloud/bigtable"
461
479
  #
462
480
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.cells_per_column(5)
463
481
  #
@@ -466,7 +484,7 @@ module Google
466
484
  end
467
485
 
468
486
  ##
469
- # Adds a timestamp-range filter instance.
487
+ # Adds a timestamp-range filter.
470
488
  #
471
489
  # Matches only cells with timestamps within the given range.
472
490
  # Specifies a contiguous range of timestamps.
@@ -479,6 +497,7 @@ module Google
479
497
  # `self` instance of interleave filter.
480
498
  #
481
499
  # @example
500
+ # require "google/cloud/bigtable"
482
501
  #
483
502
  # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
484
503
  # from = timestamp_micros - 300000000
@@ -491,7 +510,7 @@ module Google
491
510
  end
492
511
 
493
512
  ##
494
- # Adds a value-range filter instance.
513
+ # Adds a value-range filter.
495
514
  #
496
515
  # Matches only cells with values that fall within the given range.
497
516
  #
@@ -506,7 +525,7 @@ module Google
506
525
  # @return [Google::Cloud::Bigtable::RowFilter::InterleaveFilter]
507
526
  # `self` instance of interleave filter.
508
527
  #
509
- # @example Start to end range
528
+ # @example Start to end range.
510
529
  # require "google/cloud/bigtable"
511
530
  #
512
531
  # bigtable = Google::Cloud::Bigtable.new
@@ -515,7 +534,7 @@ module Google
515
534
  # range = table.new_value_range.from("value-001").to("value-005")
516
535
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.value_range(range)
517
536
  #
518
- # @example Start exlusive to infinite end range
537
+ # @example Start exlusive to infinite end range.
519
538
  # require "google/cloud/bigtable"
520
539
  #
521
540
  # bigtable = Google::Cloud::Bigtable.new
@@ -529,7 +548,7 @@ module Google
529
548
  end
530
549
 
531
550
  ##
532
- # Adds a column-range filter instance.
551
+ # Adds a column-range filter.
533
552
  #
534
553
  # Matches only cells from columns within the given range.
535
554
  #
@@ -554,9 +573,10 @@ module Google
554
573
  # @return [Integer]
555
574
  #
556
575
  # @example
576
+ # require "google/cloud/bigtable"
557
577
  #
558
- # filter = Google::Cloud::Bigtable::RowFilter.interleave.key("user-1*").label("user")
559
- # filter.length # 2
578
+ # filter = Google::Cloud::Bigtable::RowFilter.interleave.key("user-1*").label("user")
579
+ # filter.length # 2
560
580
  #
561
581
  def length
562
582
  @filters.length