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
@@ -109,7 +109,7 @@ module Google
109
109
  # recommended for production use. It is not subject to any SLA or deprecation
110
110
  # policy.
111
111
  rpc :DeleteSnapshot, DeleteSnapshotRequest, Google::Protobuf::Empty
112
- # Gets the access control policy for an instance resource. Returns an empty
112
+ # Gets the access control policy for a table resource. Returns an empty
113
113
  # policy if an table exists but does not have a policy set.
114
114
  rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
115
115
  # Sets the access control policy on a table resource. Replaces any existing
@@ -5,6 +5,9 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
8
11
  require 'google/bigtable/v2/data_pb'
9
12
  require 'google/protobuf/wrappers_pb'
10
13
  require 'google/rpc/status_pb'
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/bigtable/v2/bigtable.proto for package 'google.bigtable.v2'
3
3
  # Original file comments:
4
- # Copyright 2018 Google Inc.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ module Google
22
22
  # rubocop:disable LineLength
23
23
 
24
24
  ##
25
- # # Ruby Client for Cloud Bigtable Admin API ([Beta](https://github.com/googleapis/google-cloud-ruby#versioning))
25
+ # # Ruby Client for Cloud Bigtable Admin API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
26
26
  #
27
27
  # [Cloud Bigtable Admin API][Product Documentation]:
28
28
  #
@@ -25,7 +25,7 @@ module Google
25
25
  # rubocop:disable LineLength
26
26
 
27
27
  ##
28
- # # Ruby Client for Cloud Bigtable Admin API ([Beta](https://github.com/googleapis/google-cloud-ruby#versioning))
28
+ # # Ruby Client for Cloud Bigtable Admin API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
29
29
  #
30
30
  # [Cloud Bigtable Admin API][Product Documentation]:
31
31
  #
@@ -870,7 +870,7 @@ module Google
870
870
  @check_consistency.call(req, options, &block)
871
871
  end
872
872
 
873
- # Gets the access control policy for an instance resource. Returns an empty
873
+ # Gets the access control policy for a table resource. Returns an empty
874
874
  # policy if an table exists but does not have a policy set.
875
875
  #
876
876
  # @param resource [String]
@@ -82,12 +82,13 @@ module Google
82
82
  #
83
83
  # Operations affecting conditional bindings must specify version 3. This can
84
84
  # be either setting a conditional policy, modifying a conditional binding,
85
- # or removing a conditional binding from the stored conditional policy.
85
+ # or removing a binding (conditional or unconditional) from the stored
86
+ # conditional policy.
86
87
  # Operations on non-conditional policies may specify any valid value or
87
88
  # leave the field unset.
88
89
  #
89
- # If no etag is provided in the call to `setIamPolicy`, any version
90
- # compliance checks on the incoming and/or stored policy is skipped.
90
+ # If no etag is provided in the call to `setIamPolicy`, version compliance
91
+ # checks against the stored policy is skipped.
91
92
  # @!attribute [rw] bindings
92
93
  # @return [Array<Google::Iam::V1::Binding>]
93
94
  # Associates a list of `members` to a `role`. Optionally may specify a
@@ -105,8 +106,8 @@ module Google
105
106
  #
106
107
  # If no `etag` is provided in the call to `setIamPolicy`, then the existing
107
108
  # policy is overwritten. Due to blind-set semantics of an etag-less policy,
108
- # 'setIamPolicy' will not fail even if either of incoming or stored policy
109
- # does not meet the version requirements.
109
+ # 'setIamPolicy' will not fail even if the incoming policy version does not
110
+ # meet the requirements for modifying the stored policy.
110
111
  class Policy; end
111
112
 
112
113
  # Associates `members` with a `role`.
@@ -61,7 +61,7 @@ module Google
61
61
  end
62
62
 
63
63
  ##
64
- # The unique identifier for the project.
64
+ # The unique identifier for the project to which the app profile belongs.
65
65
  #
66
66
  # @return [String]
67
67
  #
@@ -70,7 +70,7 @@ module Google
70
70
  end
71
71
 
72
72
  ##
73
- # The unique identifier for the instance.
73
+ # The unique identifier for the instance to which the app profile belongs.
74
74
  #
75
75
  # @return [String]
76
76
  #
@@ -88,8 +88,8 @@ module Google
88
88
  end
89
89
 
90
90
  ##
91
- # The full path for the instance resource. Values are of the form
92
- # `projects/<project_id>/instances/<instance_id>`.
91
+ # The full path for the app profile resource. Values are of the form:
92
+ # `projects/<project_id>/instances/<instance_id>/appProfiles/<app_profile_name>`.
93
93
  #
94
94
  # @return [String]
95
95
  #
@@ -107,7 +107,7 @@ module Google
107
107
  end
108
108
 
109
109
  ##
110
- # Description of the AppProfile.
110
+ # Description of the app profile.
111
111
  #
112
112
  # @return [String]
113
113
  #
@@ -116,7 +116,7 @@ module Google
116
116
  end
117
117
 
118
118
  ##
119
- # Set description of the AppProfile.
119
+ # Sets the description of the app profile.
120
120
  #
121
121
  # @param text [String] Description text
122
122
  #
@@ -168,7 +168,7 @@ module Google
168
168
  # availability. Value contains `cluster_id` and optional field
169
169
  # `allow_transactional_writes`.
170
170
  #
171
- # @example Set multi cluster routing policy
171
+ # @example Set multi cluster routing policy.
172
172
  # require "google/cloud/bigtable"
173
173
  #
174
174
  # bigtable = Google::Cloud::Bigtable.new
@@ -178,7 +178,7 @@ module Google
178
178
  # routing_policy = Google::Cloud::Bigtable::AppProfile.multi_cluster_routing
179
179
  # app_profile.routing_policy = routing_policy
180
180
  #
181
- # @example Set single cluster routing policy
181
+ # @example Set single cluster routing policy.
182
182
  # require "google/cloud/bigtable"
183
183
  #
184
184
  # bigtable = Google::Cloud::Bigtable.new
@@ -241,7 +241,7 @@ module Google
241
241
  end
242
242
 
243
243
  ##
244
- # Delete app profile.
244
+ # Deletes the app profile.
245
245
  #
246
246
  # @param ignore_warnings [Boolean]
247
247
  # Default value is false. If true, ignore safety checks when deleting
@@ -269,14 +269,14 @@ module Google
269
269
  end
270
270
 
271
271
  ##
272
- # Update app profile.
272
+ # Updates the app profile.
273
273
  #
274
274
  # @param ignore_warnings [Boolean]
275
275
  # Default value is false. If true, ignore safety checks when updating
276
276
  # the app profile.
277
277
  # @return [Google::Cloud::Bigtable::AppProfile::Job]
278
278
  #
279
- # @example Update
279
+ # @example
280
280
  # require "google/cloud/bigtable"
281
281
  #
282
282
  # bigtable = Google::Cloud::Bigtable.new
@@ -298,7 +298,7 @@ module Google
298
298
  # app_profile = job.app_profile
299
299
  # end
300
300
  #
301
- # @example Update with single cluster routing
301
+ # @example Update with single cluster routing.
302
302
  # require "google/cloud/bigtable"
303
303
  #
304
304
  # bigtable = Google::Cloud::Bigtable.new
@@ -336,7 +336,7 @@ module Google
336
336
  alias update save
337
337
 
338
338
  ##
339
- # Reload app profile information.
339
+ # Reloads the app profile data.
340
340
  #
341
341
  # @return [Google::Cloud::Bigtable::AppProfile]
342
342
  #
@@ -32,13 +32,13 @@ module Google
32
32
  attr_accessor :grpc
33
33
 
34
34
  # @private
35
- # Creates a new AppProfile::List with an array of snapshot instances.
35
+ # Creates a new AppProfile::List with an array of app profiles.
36
36
  def initialize arr = []
37
37
  super arr
38
38
  end
39
39
 
40
40
  ##
41
- # Whether there is a next page of instances.
41
+ # Whether there is a next page of app profiles.
42
42
  #
43
43
  # @return [Boolean]
44
44
  #
@@ -59,9 +59,9 @@ module Google
59
59
  end
60
60
 
61
61
  ##
62
- # Retrieves the next page of app_profiles.
62
+ # Retrieves the next page of app profiles.
63
63
  #
64
- # @return [AppProfile::List] The list of instances.
64
+ # @return [AppProfile::List] The list of app profiles.
65
65
  #
66
66
  # @example
67
67
  # require "google/cloud/bigtable"
@@ -94,12 +94,12 @@ module Google
94
94
  # are retrieved (unlike `#each`, for example, which merely iterates
95
95
  # over the results returned by a single API call). Use with caution.
96
96
  #
97
- # @yield [app_profile] The block for accessing each instance.
98
- # @yieldparam [AppProfile] instance The instance object.
97
+ # @yield [app_profile] The block for accessing each app profile.
98
+ # @yieldparam [AppProfile] app_profile The app profile object.
99
99
  #
100
100
  # @return [Enumerator]
101
101
  #
102
- # @example Iterating each instance by passing a block:
102
+ # @example Iterating each app profile by passing a block:
103
103
  # require "google/cloud/bigtable"
104
104
  #
105
105
  # bigtable = Google::Cloud::Bigtable.new
@@ -56,7 +56,7 @@ module Google
56
56
  end
57
57
 
58
58
  ##
59
- # The unique identifier for the project.
59
+ # The unique identifier for the project to which the cluster belongs.
60
60
  #
61
61
  # @return [String]
62
62
  #
@@ -65,7 +65,7 @@ module Google
65
65
  end
66
66
 
67
67
  ##
68
- # The unique identifier for the instance.
68
+ # The unique identifier for the instance to which the cluster belongs.
69
69
  #
70
70
  # @return [String]
71
71
  #
@@ -93,7 +93,7 @@ module Google
93
93
  end
94
94
 
95
95
  ##
96
- # The current instance state.
96
+ # The current state of the cluster.
97
97
  # Possible values are
98
98
  # `:CREATING`, `:READY`, `:STATE_NOT_KNOWN`, `:RESIZING`, `:DISABLED`.
99
99
  #
@@ -113,7 +113,7 @@ module Google
113
113
  end
114
114
 
115
115
  ##
116
- # The instance is currently being created, and may be destroyed if the
116
+ # The cluster is currently being created, and may be destroyed if the
117
117
  # creation process encounters an error.
118
118
  #
119
119
  # @return [Boolean]
@@ -197,9 +197,9 @@ module Google
197
197
  end
198
198
 
199
199
  ##
200
- # Update cluster.
200
+ # Updates the cluster.
201
201
  #
202
- # `serve_nodes` is the only updatable field
202
+ # `serve_nodes` is the only updatable field.
203
203
  #
204
204
  # @return [Google::Cloud::Bigtable::Cluster::Job]
205
205
  # The job representing the long-running, asynchronous processing of
@@ -235,7 +235,7 @@ module Google
235
235
  alias update save
236
236
 
237
237
  ##
238
- # Reloads cluster information.
238
+ # Reloads cluster data.
239
239
  #
240
240
  # @return [Google::Cloud::Bigtable::Cluster]
241
241
  #
@@ -53,7 +53,7 @@ module Google
53
53
  end
54
54
 
55
55
  ##
56
- # Whether there is a next page of instances.
56
+ # Whether there is a next page of clusters.
57
57
  #
58
58
  # @return [Boolean]
59
59
  #
@@ -126,7 +126,7 @@ module Google
126
126
  # bigtable = Google::Cloud::Bigtable.new
127
127
  #
128
128
  # all_cluster_ids = bigtable.clusters.all.map do |cluster|
129
- # puts cluster.instance_id
129
+ # puts cluster.cluster_id
130
130
  # end
131
131
  #
132
132
  def all
@@ -37,10 +37,12 @@ module Google
37
37
  # puts column_family.gc_rule
38
38
  #
39
39
  class ColumnFamily
40
- # Name of the column family
40
+ ##
41
+ # Name of the column family.
41
42
  # @return [String]
42
43
  attr_reader :name
43
44
 
45
+ ##
44
46
  # The garbage collection rule to be used for the column family.
45
47
  # Optional. The service default value will be used when not specified.
46
48
  # @return [Google::Cloud::Bigtable::GcRule, nil]
@@ -79,7 +79,7 @@ module Google
79
79
  include Enumerable
80
80
 
81
81
  ##
82
- # Create a new ColumnFamilyMap object.
82
+ # Creates a new ColumnFamilyMap object.
83
83
  #
84
84
  # @example
85
85
  # require "google/cloud/bigtable"
@@ -108,14 +108,14 @@ module Google
108
108
  end
109
109
 
110
110
  ##
111
- # Calls block once for each column family in the map, passing passing
111
+ # Calls the block once for each column family in the map, passing
112
112
  # the name and column family pair as parameters.
113
113
  #
114
114
  # If no block is given, an enumerator is returned instead.
115
115
  #
116
- # @yield [name, column_family] The name and column family pair
117
- # @yieldparam [String] name the column family name
118
- # @yieldparam [ColumnFamily] column_family the column family object
116
+ # @yield [name, column_family] The name and column family pair.
117
+ # @yieldparam [String] name the column family name.
118
+ # @yieldparam [ColumnFamily] column_family the column family object.
119
119
  #
120
120
  # @return [Enumerator]
121
121
  #
@@ -183,7 +183,7 @@ module Google
183
183
  # Adds a new column family to the table.
184
184
  #
185
185
  # @overload add(name, gc_rule: nil)
186
- # @param name [String] Column family name
186
+ # @param name [String] Column family name.
187
187
  # @param gc_rule [Google::Cloud::Bigtable::GcRule] The garbage
188
188
  # collection rule to be used for the column family. Optional. The
189
189
  # service default value will be used when not specified.
@@ -222,7 +222,7 @@ module Google
222
222
  ##
223
223
  # Updates an existing column family in the table.
224
224
  #
225
- # @param name [String] Column family name
225
+ # @param name [String] Column family name.
226
226
  # @param gc_rule [Google::Cloud::Bigtable::GcRule] The new garbage
227
227
  # collection rule to be used for the column family. Optional. The
228
228
  # service default value will be used when not specified.
@@ -258,7 +258,7 @@ module Google
258
258
  ##
259
259
  # Deletes the named column family from the table.
260
260
  #
261
- # @param name [String] Column family name
261
+ # @param name [String] Column family name.
262
262
  #
263
263
  # @raise [ArgumentError] if the column family name does not exist.
264
264
  # @raise [FrozenError] if the column family map is frozen.
@@ -60,7 +60,7 @@ module Google
60
60
  end
61
61
 
62
62
  ##
63
- # Get column family name
63
+ # Gets the column family name.
64
64
  #
65
65
  # @return [String]
66
66
  #
@@ -69,7 +69,7 @@ module Google
69
69
  end
70
70
 
71
71
  ##
72
- # Set column family name
72
+ # Sets the column family name.
73
73
  #
74
74
  # @param name [String] Column family name
75
75
  #
@@ -78,7 +78,7 @@ module Google
78
78
  end
79
79
 
80
80
  ##
81
- # Set column range with the lower bound.
81
+ # Sets the column range with the lower bound.
82
82
  #
83
83
  # @param qualifier [String] Column qualifier name. Required
84
84
  # @param inclusive [String] Lower bound flag. Inclusive/Exclusive.
@@ -111,7 +111,7 @@ module Google
111
111
  end
112
112
 
113
113
  ##
114
- # Set column range with the upper bound.
114
+ # Sets the column range with the upper bound.
115
115
  #
116
116
  # @param qualifier [String] Column qualifier name. Required.
117
117
  # @param inclusive [String] Upper bound flag. Inclusive/Exclusive.
@@ -144,7 +144,7 @@ module Google
144
144
  end
145
145
 
146
146
  ##
147
- # Set column range with the inclusive upper and lower bound.
147
+ # Sets the column range with the inclusive upper and lower bound.
148
148
  #
149
149
  # @param from_qualifier [String] Inclusive from qualifier. Required.
150
150
  # @param to_qualifier [String] Inclusive to qualifier. Required.
@@ -163,7 +163,7 @@ module Google
163
163
  end
164
164
 
165
165
  ##
166
- # Set column range with the inclusive upper and the exclusive lower bound.
166
+ # Sets the column range with the inclusive upper and the exclusive lower bound.
167
167
  #
168
168
  # @param from_qualifier [String] Inclusive from qualifier
169
169
  # @param to_qualifier [String] Exclusive to qualifier
@@ -219,12 +219,12 @@ module Google
219
219
  end
220
220
 
221
221
  ##
222
- # Create GcRule instance with max number of versions.
222
+ # Creates a GcRule instance with max number of versions.
223
223
  #
224
224
  # @param versions [Integer] Max number of versions
225
225
  # @return [Google::Cloud::Bigtable::GcRule]
226
226
  #
227
- # @example Create a table with column families.
227
+ # @example
228
228
  # require "google/cloud/bigtable"
229
229
  #
230
230
  # bigtable = Google::Cloud::Bigtable.new
@@ -240,12 +240,12 @@ module Google
240
240
  end
241
241
 
242
242
  ##
243
- # Create GcRule instance with max age.
243
+ # Creates a GcRule instance with max age.
244
244
  #
245
245
  # @param age [Integer] Max age in seconds.
246
246
  # @return [Google::Cloud::Bigtable::GcRule]
247
247
  #
248
- # @example Create a table with column families.
248
+ # @example
249
249
  # require "google/cloud/bigtable"
250
250
  #
251
251
  # bigtable = Google::Cloud::Bigtable.new
@@ -261,13 +261,13 @@ module Google
261
261
  end
262
262
 
263
263
  ##
264
- # Create union GcRule instance.
264
+ # Creates a union GcRule instance.
265
265
  #
266
266
  # @param rules [Google::Cloud::Bigtable::GcRule, Array<Google::Cloud::Bigtable::GcRule>]
267
267
  # List of GcRule with nested rules.
268
268
  # @return [Google::Cloud::Bigtable::GcRule]
269
269
  #
270
- # @example Create a table with column families.
270
+ # @example
271
271
  # require "google/cloud/bigtable"
272
272
  #
273
273
  # bigtable = Google::Cloud::Bigtable.new
@@ -287,13 +287,13 @@ module Google
287
287
  end
288
288
 
289
289
  ##
290
- # Create intersection GCRule instance.
290
+ # Creates a intersection GCRule instance.
291
291
  #
292
292
  # @param rules [Google::Cloud::Bigtable::GcRule, Array<Google::Cloud::Bigtable::GcRule>]
293
293
  # List of GcRule with nested rules.
294
294
  # @return [Google::Cloud::Bigtable::GcRule]
295
295
  #
296
- # @example Create a table with column families.
296
+ # @example
297
297
  # require "google/cloud/bigtable"
298
298
  #
299
299
  # bigtable = Google::Cloud::Bigtable.new