google-cloud-bigtable 0.6.2 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -26
  3. data/CHANGELOG.md +85 -0
  4. data/CONTRIBUTING.md +1 -1
  5. data/OVERVIEW.md +388 -19
  6. data/lib/google-cloud-bigtable.rb +19 -22
  7. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +1 -1
  8. data/lib/google/bigtable/v2/bigtable_pb.rb +3 -0
  9. data/lib/google/bigtable/v2/bigtable_services_pb.rb +1 -1
  10. data/lib/google/cloud/bigtable.rb +11 -17
  11. data/lib/google/cloud/bigtable/admin.rb +2 -2
  12. data/lib/google/cloud/bigtable/admin/v2.rb +2 -2
  13. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +1 -1
  14. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +2 -2
  15. data/lib/google/cloud/bigtable/admin/v2/credentials.rb +1 -1
  16. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +1 -1
  17. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +1 -1
  18. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +1 -1
  19. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +1 -1
  20. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +1 -1
  21. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +1 -1
  22. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +7 -6
  23. data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +2 -2
  24. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +1 -1
  25. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +1 -1
  26. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +1 -1
  27. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +1 -1
  28. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +1 -1
  29. data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +7 -55
  30. data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +1 -1
  31. data/lib/google/cloud/bigtable/app_profile.rb +162 -96
  32. data/lib/google/cloud/bigtable/app_profile/job.rb +5 -8
  33. data/lib/google/cloud/bigtable/app_profile/list.rb +18 -12
  34. data/lib/google/cloud/bigtable/chunk_processor.rb +24 -36
  35. data/lib/google/cloud/bigtable/cluster.rb +45 -18
  36. data/lib/google/cloud/bigtable/cluster/job.rb +3 -7
  37. data/lib/google/cloud/bigtable/cluster/list.rb +22 -20
  38. data/lib/google/cloud/bigtable/column_family.rb +18 -231
  39. data/lib/google/cloud/bigtable/column_family_map.rb +426 -0
  40. data/lib/google/cloud/bigtable/column_range.rb +15 -7
  41. data/lib/google/cloud/bigtable/convert.rb +12 -4
  42. data/lib/google/cloud/bigtable/errors.rb +4 -1
  43. data/lib/google/cloud/bigtable/gc_rule.rb +188 -69
  44. data/lib/google/cloud/bigtable/instance.rb +209 -189
  45. data/lib/google/cloud/bigtable/instance/cluster_map.rb +17 -13
  46. data/lib/google/cloud/bigtable/instance/job.rb +6 -5
  47. data/lib/google/cloud/bigtable/instance/list.rb +18 -13
  48. data/lib/google/cloud/bigtable/longrunning_job.rb +7 -1
  49. data/lib/google/cloud/bigtable/mutation_entry.rb +36 -39
  50. data/lib/google/cloud/bigtable/mutation_operations.rb +90 -73
  51. data/lib/google/cloud/bigtable/policy.rb +9 -5
  52. data/lib/google/cloud/bigtable/project.rb +87 -196
  53. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +15 -10
  54. data/lib/google/cloud/bigtable/read_operations.rb +42 -59
  55. data/lib/google/cloud/bigtable/routing_policy.rb +172 -0
  56. data/lib/google/cloud/bigtable/row.rb +32 -21
  57. data/lib/google/cloud/bigtable/row_filter.rb +80 -35
  58. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +119 -68
  59. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +8 -2
  60. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +117 -66
  61. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +24 -9
  62. data/lib/google/cloud/bigtable/row_range.rb +5 -0
  63. data/lib/google/cloud/bigtable/rows_mutator.rb +14 -21
  64. data/lib/google/cloud/bigtable/rows_reader.rb +23 -18
  65. data/lib/google/cloud/bigtable/sample_row_key.rb +6 -3
  66. data/lib/google/cloud/bigtable/service.rb +200 -253
  67. data/lib/google/cloud/bigtable/status.rb +76 -0
  68. data/lib/google/cloud/bigtable/table.rb +158 -262
  69. data/lib/google/cloud/bigtable/table/cluster_state.rb +17 -6
  70. data/lib/google/cloud/bigtable/table/list.rb +16 -9
  71. data/lib/google/cloud/bigtable/v2.rb +2 -2
  72. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +13 -13
  73. data/lib/google/cloud/bigtable/v2/credentials.rb +1 -1
  74. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +17 -14
  75. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +1 -1
  76. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +1 -1
  77. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +1 -1
  78. data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +7 -55
  79. data/lib/google/cloud/bigtable/value_range.rb +19 -13
  80. data/lib/google/cloud/bigtable/version.rb +1 -1
  81. metadata +67 -25
  82. data/lib/google/cloud/bigtable/table/column_family_map.rb +0 -70
@@ -17,6 +17,7 @@ module Google
17
17
  module Cloud
18
18
  module Bigtable
19
19
  class AppProfile
20
+ ##
20
21
  # # Job
21
22
  #
22
23
  # A resource representing the long-running, asynchronous processing of
@@ -34,7 +35,7 @@ module Google
34
35
  # bigtable = Google::Cloud::Bigtable.new
35
36
  #
36
37
  # instance = bigtable.instance("my-instance")
37
- # app_profile = bigtable.instance("my-app-profile")
38
+ # app_profile = instance.app_profile("my-app-profile")
38
39
  #
39
40
  # app_profile.description = "User data instance app profile"
40
41
  # routing_policy = Google::Cloud::Bigtable::AppProfile.single_cluster_routing(
@@ -59,6 +60,7 @@ module Google
59
60
  # end
60
61
  #
61
62
  class Job < LongrunningJob
63
+ ##
62
64
  # The instance that is the object of the operation.
63
65
  #
64
66
  # @return [Google::Cloud::Bigtable::AppProfile, nil] The app profile instance, or
@@ -70,7 +72,7 @@ module Google
70
72
  # bigtable = Google::Cloud::Bigtable.new
71
73
  #
72
74
  # instance = bigtable.instance("my-instance")
73
- # app_profile = bigtable.instance("my-app-profile")
75
+ # app_profile = instance.app_profile("my-app-profile")
74
76
  #
75
77
  # app_profile.description = "User data instance app profile"
76
78
  # routing_policy = Google::Cloud::Bigtable::AppProfile.single_cluster_routing(
@@ -81,11 +83,6 @@ module Google
81
83
  #
82
84
  # job = app_profile.save
83
85
  #
84
- # job.done? #=> false
85
- # job.reload!
86
- # job.done? #=> true
87
- #
88
- # # OR
89
86
  # job.wait_until_done!
90
87
  #
91
88
  # app_profile = job.app_profile
@@ -93,7 +90,7 @@ module Google
93
90
  def app_profile
94
91
  return nil unless done?
95
92
  return nil unless @grpc.grpc_op.result == :response
96
- AppProfile.from_grpc(@grpc.results, service)
93
+ AppProfile.from_grpc @grpc.results, service
97
94
  end
98
95
  end
99
96
  end
@@ -19,6 +19,7 @@ module Google
19
19
  module Cloud
20
20
  module Bigtable
21
21
  class AppProfile
22
+ ##
22
23
  # AppProfile::List is a special-case array with additional
23
24
  # values.
24
25
  class List < DelegateClass(::Array)
@@ -31,12 +32,13 @@ module Google
31
32
  attr_accessor :grpc
32
33
 
33
34
  # @private
34
- # Creates a new AppProfile::List with an array of snapshot instances.
35
+ # Creates a new AppProfile::List with an array of app profiles.
35
36
  def initialize arr = []
36
- super(arr)
37
+ super arr
37
38
  end
38
39
 
39
- # Whether there is a next page of instances.
40
+ ##
41
+ # Whether there is a next page of app profiles.
40
42
  #
41
43
  # @return [Boolean]
42
44
  #
@@ -51,13 +53,15 @@ module Google
51
53
  # if app_profiles.next?
52
54
  # next_app_profiles = app_profiles.next
53
55
  # end
56
+ #
54
57
  def next?
55
58
  grpc.next_page?
56
59
  end
57
60
 
58
- # Retrieves the next page of app_profiles.
61
+ ##
62
+ # Retrieves the next page of app profiles.
59
63
  #
60
- # @return [AppProfile::List] The list of instances.
64
+ # @return [AppProfile::List] The list of app profiles.
61
65
  #
62
66
  # @example
63
67
  # require "google/cloud/bigtable"
@@ -70,14 +74,16 @@ module Google
70
74
  # if app_profiles.next?
71
75
  # next_app_profiles = app_profiles.next
72
76
  # end
77
+ #
73
78
  def next
74
79
  ensure_grpc!
75
80
 
76
81
  return nil unless next?
77
82
  grpc.next_page
78
- self.class.from_grpc(grpc, service)
83
+ self.class.from_grpc grpc, service
79
84
  end
80
85
 
86
+ ##
81
87
  # Retrieves remaining results by repeatedly invoking {#next} until
82
88
  # {#next?} returns `false`. Calls the given block once for each
83
89
  # result, which is passed as the argument to the block.
@@ -88,12 +94,12 @@ module Google
88
94
  # are retrieved (unlike `#each`, for example, which merely iterates
89
95
  # over the results returned by a single API call). Use with caution.
90
96
  #
91
- # @yield [app_profile] The block for accessing each instance.
92
- # @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.
93
99
  #
94
100
  # @return [Enumerator]
95
101
  #
96
- # @example Iterating each instance by passing a block:
102
+ # @example Iterating each app profile by passing a block:
97
103
  # require "google/cloud/bigtable"
98
104
  #
99
105
  # bigtable = Google::Cloud::Bigtable.new
@@ -117,14 +123,14 @@ module Google
117
123
  # end
118
124
  #
119
125
  def all
120
- return enum_for(:all) unless block_given?
126
+ return enum_for :all unless block_given?
121
127
 
122
128
  results = self
123
129
  loop do
124
130
  results.each { |r| yield r }
125
131
  break unless next?
126
132
  grpc.next_page
127
- results = self.class.from_grpc(grpc, service)
133
+ results = self.class.from_grpc grpc, service
128
134
  end
129
135
  end
130
136
 
@@ -136,7 +142,7 @@ module Google
136
142
  def self.from_grpc grpc, service
137
143
  app_profiles = List.new(
138
144
  Array(grpc.response.app_profiles).map do |app_profile|
139
- AppProfile.from_grpc(app_profile, service)
145
+ AppProfile.from_grpc app_profile, service
140
146
  end
141
147
  )
142
148
  app_profiles.grpc = grpc
@@ -19,7 +19,7 @@ module Google
19
19
  module Cloud
20
20
  module Bigtable
21
21
  # @private
22
- # # RowsMutator
22
+ # # ChunkProcessor
23
23
  #
24
24
  # Read a chunk of data and merge it based on states and build rows and cells
25
25
  #
@@ -46,6 +46,7 @@ module Google
46
46
  reset_to_new_row
47
47
  end
48
48
 
49
+ ##
49
50
  # Process chunk and build full row with cells
50
51
  #
51
52
  # @param chunk [Google::Bigtable::V2::ReadRowsResponse::CellChunk]
@@ -53,12 +54,8 @@ module Google
53
54
  def process chunk
54
55
  self.chunk = chunk
55
56
 
56
- if chunk.commit_row
57
- raise_if(
58
- chunk.value_size > 0,
59
- "Commit rows cannot have a non-zero value_size."
60
- )
61
- end
57
+
58
+ raise_if chunk.value_size.positive?, "Commit rows cannot have a non-zero value_size." if chunk.commit_row
62
59
 
63
60
  if state == NEW_ROW
64
61
  process_new_row
@@ -69,6 +66,7 @@ module Google
69
66
  end
70
67
  end
71
68
 
69
+ ##
72
70
  # Validate row status commit or reset
73
71
  #
74
72
  # @raise [Google::Cloud::Bigtable::InvalidRowStateError]
@@ -81,11 +79,12 @@ module Google
81
79
  chunk.family_name ||
82
80
  chunk.qualifier ||
83
81
  !chunk.value.empty? ||
84
- chunk.timestamp_micros > 0)
82
+ chunk.timestamp_micros.positive?)
85
83
 
86
84
  raise_if value, "A reset should have no data"
87
85
  end
88
86
 
87
+ ##
89
88
  # Validate chunk has new row state
90
89
  #
91
90
  # @raise [Google::Cloud::Bigtable::InvalidRowStateError]
@@ -94,36 +93,29 @@ module Google
94
93
  # or if family name or column qualifier are empty
95
94
  #
96
95
  def validate_new_row
97
- raise_if(row.key, "A new row cannot have existing state")
98
- raise_if(chunk.row_key.empty?, "A row key must be set")
99
- raise_if(chunk.reset_row, "A new row cannot be reset")
100
- raise_if(
101
- last_key == chunk.row_key,
102
- "A commit happened but the same key followed"
103
- )
104
- raise_if(chunk.family_name.nil?, "A family must be set")
105
- raise_if(chunk.qualifier.nil?, "A column qualifier must be set")
96
+ raise_if row.key, "A new row cannot have existing state"
97
+ raise_if chunk.row_key.empty?, "A row key must be set"
98
+ raise_if chunk.reset_row, "A new row cannot be reset"
99
+ raise_if last_key == chunk.row_key, "A commit happened but the same key followed"
100
+ raise_if chunk.family_name.nil?, "A family must be set"
101
+ raise_if chunk.qualifier.nil?, "A column qualifier must be set"
106
102
  end
107
103
 
104
+ ##
108
105
  # Validate chunk merge is in progress to build new row
109
106
  #
110
107
  # @raise [Google::Cloud::Bigtable::InvalidRowStateError]
111
108
  # If row and chunk row key are not same or chunk row key is empty.
112
109
  #
113
110
  def validate_row_in_progress
114
- raise_if(
115
- !chunk.row_key.empty? && chunk.row_key != row.key,
116
- "A commit is required between row keys"
117
- )
111
+ raise_if !chunk.row_key.empty? && chunk.row_key != row.key, "A commit is required between row keys"
118
112
 
119
- raise_if(
120
- chunk.family_name && chunk.qualifier.nil?,
121
- "A qualifier must be specified"
122
- )
113
+ raise_if chunk.family_name && chunk.qualifier.nil?, "A qualifier must be specified"
123
114
 
124
115
  validate_reset_row
125
116
  end
126
117
 
118
+ ##
127
119
  # Process new row by setting values from current chunk.
128
120
  #
129
121
  # @return [Google::Cloud::Bigtable::Row]
@@ -142,6 +134,7 @@ module Google
142
134
  next_state!
143
135
  end
144
136
 
137
+ ##
145
138
  # Process chunk if row state is in progress
146
139
  #
147
140
  # @return [Google::Cloud::Bigtable::Row]
@@ -158,6 +151,7 @@ module Google
158
151
  next_state!
159
152
  end
160
153
 
154
+ ##
161
155
  # Process chunk if row cell state is in progress
162
156
  #
163
157
  # @return [Google::Cloud::Bigtable::Row]
@@ -170,6 +164,7 @@ module Google
170
164
  next_state!
171
165
  end
172
166
 
167
+ ##
173
168
  # Set next state of row.
174
169
  #
175
170
  # @return [Google::Cloud::Bigtable::Row]
@@ -198,13 +193,7 @@ module Google
198
193
 
199
194
  # Build cell and append to row.
200
195
  def persist_cell
201
- cell = Row::Cell.new(
202
- cur_family,
203
- cur_qaul,
204
- cur_ts,
205
- cur_val,
206
- cur_labels
207
- )
196
+ cell = Row::Cell.new cur_family, cur_qaul, cur_ts, cur_val, cur_labels
208
197
  row.cells[cur_family] << cell
209
198
 
210
199
  # Clear cached cell values
@@ -224,6 +213,7 @@ module Google
224
213
  self.cur_labels = nil
225
214
  end
226
215
 
216
+ ##
227
217
  # Validate last row is completed
228
218
  #
229
219
  # @raise [Google::Cloud::Bigtable::InvalidRowStateError]
@@ -232,14 +222,12 @@ module Google
232
222
  def validate_last_row_complete
233
223
  return if row.key.nil?
234
224
 
235
- raise_if(
236
- !chunk.commit_row,
237
- "Response ended with pending row without commit"
238
- )
225
+ raise_if !chunk.commit_row, "Response ended with pending row without commit"
239
226
  end
240
227
 
241
228
  private
242
229
 
230
+ ##
243
231
  # Raise error on condition failure
244
232
  #
245
233
  # @raise [Google::Cloud::Bigtable::InvalidRowStateError]
@@ -21,6 +21,7 @@ require "google/cloud/bigtable/cluster/job"
21
21
  module Google
22
22
  module Cloud
23
23
  module Bigtable
24
+ ##
24
25
  # # Cluster
25
26
  #
26
27
  # A configuration object describing how Cloud Bigtable should treat traffic
@@ -54,59 +55,74 @@ module Google
54
55
  @service = service
55
56
  end
56
57
 
57
- # The unique identifier for the project.
58
+ ##
59
+ # The unique identifier for the project to which the cluster belongs.
58
60
  #
59
61
  # @return [String]
62
+ #
60
63
  def project_id
61
64
  @grpc.name.split("/")[1]
62
65
  end
63
66
 
64
- # The unique identifier for the instance.
67
+ ##
68
+ # The unique identifier for the instance to which the cluster belongs.
65
69
  #
66
70
  # @return [String]
71
+ #
67
72
  def instance_id
68
73
  @grpc.name.split("/")[3]
69
74
  end
70
75
 
76
+ ##
71
77
  # The unique identifier for the cluster.
72
78
  #
73
79
  # @return [String]
80
+ #
74
81
  def cluster_id
75
82
  @grpc.name.split("/")[5]
76
83
  end
77
84
 
85
+ ##
78
86
  # The unique name of the cluster. Value in the form
79
87
  # `projects/<project_id>/instances/<instance_id>/clusters/<cluster_id>`.
80
88
  #
81
89
  # @return [String]
90
+ #
82
91
  def path
83
92
  @grpc.name
84
93
  end
85
94
 
86
- # The current instance state.
95
+ ##
96
+ # The current state of the cluster.
87
97
  # Possible values are
88
98
  # `:CREATING`, `:READY`, `:STATE_NOT_KNOWN`, `:RESIZING`, `:DISABLED`.
89
99
  #
90
100
  # @return [Symbol]
101
+ #
91
102
  def state
92
103
  @grpc.state
93
104
  end
94
105
 
106
+ ##
95
107
  # The cluster has been successfully created and is ready to serve requests.
96
108
  #
97
109
  # @return [Boolean]
110
+ #
98
111
  def ready?
99
112
  state == :READY
100
113
  end
101
114
 
102
- # The instance is currently being created, and may be destroyed if the
115
+ ##
116
+ # The cluster is currently being created, and may be destroyed if the
103
117
  # creation process encounters an error.
104
118
  #
105
119
  # @return [Boolean]
120
+ #
106
121
  def creating?
107
122
  state == :CREATING
108
123
  end
109
124
 
125
+ ##
110
126
  # The cluster is currently being resized, and may revert to its previous
111
127
  # node count if the process encounters an error.
112
128
  # A cluster is still capable of serving requests while being resized,
@@ -114,62 +130,76 @@ module Google
114
130
  # between the starting and requested states.
115
131
  #
116
132
  # @return [Boolean]
133
+ #
117
134
  def resizing?
118
135
  state == :RESIZING
119
136
  end
120
137
 
138
+ ##
121
139
  # The cluster has no backing nodes. The data (tables) still
122
140
  # exist, but no operations can be performed on the cluster.
123
141
  #
124
142
  # @return [Boolean]
143
+ #
125
144
  def disabled?
126
145
  state == :DISABLED
127
146
  end
128
147
 
148
+ ##
129
149
  # The number of nodes allocated to this cluster.
130
150
  #
131
151
  # @return [Integer]
152
+ #
132
153
  def nodes
133
154
  @grpc.serve_nodes
134
155
  end
135
156
 
157
+ ##
136
158
  # The number of nodes allocated to this cluster. More nodes enable higher
137
159
  # throughput and more consistent performance.
138
160
  #
139
161
  # @param serve_nodes [Integer] Number of nodes
162
+ #
140
163
  def nodes= serve_nodes
141
164
  @grpc.serve_nodes = serve_nodes
142
165
  end
143
166
 
167
+ ##
144
168
  # The type of storage used by this cluster to serve its
145
169
  # parent instance's tables, unless explicitly overridden.
146
170
  # Valid values are `:SSD`(Flash (SSD) storage should be used),
147
171
  # `:HDD`(Magnetic drive (HDD) storage should be used)
148
172
  #
149
173
  # @return [Symbol]
174
+ #
150
175
  def storage_type
151
176
  @grpc.default_storage_type
152
177
  end
153
178
 
179
+ ##
154
180
  # Cluster location.
155
181
  # For example, "us-east1-b"
156
182
  #
157
183
  # @return [String]
184
+ #
158
185
  def location
159
186
  @grpc.location.split("/")[3]
160
187
  end
161
188
 
189
+ ##
162
190
  # Cluster location path in form of
163
191
  # `projects/<project_id>/locations/<zone>`
164
192
  #
165
193
  # @return [String]
194
+ #
166
195
  def location_path
167
196
  @grpc.location
168
197
  end
169
198
 
170
- # Update cluster.
199
+ ##
200
+ # Updates the cluster.
171
201
  #
172
- # `serve_nodes` is the only updatable field
202
+ # `serve_nodes` is the only updatable field.
173
203
  #
174
204
  # @return [Google::Cloud::Bigtable::Cluster::Job]
175
205
  # The job representing the long-running, asynchronous processing of
@@ -199,25 +229,22 @@ module Google
199
229
  #
200
230
  def save
201
231
  ensure_service!
202
- grpc = service.update_cluster(
203
- instance_id,
204
- cluster_id,
205
- location_path,
206
- nodes
207
- )
208
- Cluster::Job.from_grpc(grpc, service)
232
+ grpc = service.update_cluster instance_id, cluster_id, location_path, nodes
233
+ Cluster::Job.from_grpc grpc, service
209
234
  end
210
235
  alias update save
211
236
 
212
- # Reloads cluster information.
237
+ ##
238
+ # Reloads cluster data.
213
239
  #
214
240
  # @return [Google::Cloud::Bigtable::Cluster]
215
-
241
+ #
216
242
  def reload!
217
- @grpc = service.get_cluster(instance_id, cluster_id)
243
+ @grpc = service.get_cluster instance_id, cluster_id
218
244
  self
219
245
  end
220
246
 
247
+ ##
221
248
  # Permanently deletes the cluster.
222
249
  #
223
250
  # @return [Boolean] Returns `true` if the cluster was deleted.
@@ -233,7 +260,7 @@ module Google
233
260
  #
234
261
  def delete
235
262
  ensure_service!
236
- service.delete_cluster(instance_id, cluster_id)
263
+ service.delete_cluster instance_id, cluster_id
237
264
  true
238
265
  end
239
266
 
@@ -246,7 +273,7 @@ module Google
246
273
  # @param service [Google::Cloud::Bigtable::Service]
247
274
  # @return [Google::Cloud::Bigtable::Cluster]
248
275
  def self.from_grpc grpc, service
249
- new(grpc, service)
276
+ new grpc, service
250
277
  end
251
278
 
252
279
  protected