google-cloud-bigtable 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/CHANGELOG.md +8 -0
- data/EMULATOR.md +30 -0
- data/OVERVIEW.md +2 -1
- data/lib/google-cloud-bigtable.rb +28 -22
- data/lib/google/cloud/bigtable.rb +25 -13
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +14 -14
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +5 -5
- data/lib/google/cloud/bigtable/app_profile.rb +14 -14
- data/lib/google/cloud/bigtable/app_profile/list.rb +9 -9
- data/lib/google/cloud/bigtable/chunk_processor.rb +6 -6
- data/lib/google/cloud/bigtable/cluster.rb +5 -5
- data/lib/google/cloud/bigtable/cluster/job.rb +1 -1
- data/lib/google/cloud/bigtable/cluster/list.rb +6 -6
- data/lib/google/cloud/bigtable/column_family.rb +12 -12
- data/lib/google/cloud/bigtable/column_range.rb +8 -8
- data/lib/google/cloud/bigtable/gc_rule.rb +2 -2
- data/lib/google/cloud/bigtable/instance.rb +34 -36
- data/lib/google/cloud/bigtable/instance/cluster_map.rb +5 -5
- data/lib/google/cloud/bigtable/instance/list.rb +9 -9
- data/lib/google/cloud/bigtable/longrunning_job.rb +1 -1
- data/lib/google/cloud/bigtable/mutation_entry.rb +18 -18
- data/lib/google/cloud/bigtable/mutation_operations.rb +25 -23
- data/lib/google/cloud/bigtable/policy.rb +13 -13
- data/lib/google/cloud/bigtable/project.rb +27 -27
- data/lib/google/cloud/bigtable/read_modify_write_rule.rb +6 -6
- data/lib/google/cloud/bigtable/read_operations.rb +13 -13
- data/lib/google/cloud/bigtable/row.rb +7 -7
- data/lib/google/cloud/bigtable/row_filter.rb +58 -58
- data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +40 -41
- data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +6 -6
- data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +46 -47
- data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +14 -15
- data/lib/google/cloud/bigtable/row_range.rb +16 -16
- data/lib/google/cloud/bigtable/rows_mutator.rb +5 -5
- data/lib/google/cloud/bigtable/rows_reader.rb +8 -9
- data/lib/google/cloud/bigtable/service.rb +153 -141
- data/lib/google/cloud/bigtable/table.rb +23 -23
- data/lib/google/cloud/bigtable/table/cluster_state.rb +2 -2
- data/lib/google/cloud/bigtable/table/column_family_map.rb +5 -5
- data/lib/google/cloud/bigtable/table/list.rb +8 -8
- data/lib/google/cloud/bigtable/value_range.rb +7 -7
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +5 -4
@@ -19,8 +19,8 @@ module Google
|
|
19
19
|
module Cloud
|
20
20
|
module Bigtable
|
21
21
|
class Instance
|
22
|
-
# Instance::ClusterMap is a
|
23
|
-
# It is used to create instance.
|
22
|
+
# Instance::ClusterMap is a hash with cluster name and gRPC object.
|
23
|
+
# It is used to create an instance.
|
24
24
|
# @example Create
|
25
25
|
#
|
26
26
|
# clusters = Google::Cloud::Bigtable::Instance::ClusterMap.new
|
@@ -33,20 +33,20 @@ module Google
|
|
33
33
|
class ClusterMap < DelegateClass(::Hash)
|
34
34
|
# @private
|
35
35
|
#
|
36
|
-
#
|
36
|
+
# Creates a new Instance::ClusterMap with an hash of Cluster name and
|
37
37
|
# cluster grpc instances.
|
38
38
|
def initialize value = {}
|
39
39
|
super(value)
|
40
40
|
end
|
41
41
|
|
42
|
-
#
|
42
|
+
# Adds a cluster to a map
|
43
43
|
#
|
44
44
|
# @param name [String] Cluster name
|
45
45
|
# @param location [String]
|
46
46
|
# The location where this cluster's nodes and storage reside. For best
|
47
47
|
# performance, clients should be located as close as possible to this
|
48
48
|
# cluster. Currently only zones are supported.
|
49
|
-
# @param nodes [Integer]
|
49
|
+
# @param nodes [Integer] Number of nodes
|
50
50
|
# @param storage_type [Symbol]
|
51
51
|
# Valid values are:
|
52
52
|
# * `:SSD`(Flash (SSD) storage should be used),
|
@@ -21,14 +21,14 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module Bigtable
|
23
23
|
class Instance
|
24
|
-
# Instance::List is a special
|
25
|
-
# values and failed_locations
|
24
|
+
# Instance::List is a special-case array with additional
|
25
|
+
# values and failed_locations.
|
26
26
|
class List < DelegateClass(::Array)
|
27
27
|
# @private
|
28
28
|
# The gRPC Service object.
|
29
29
|
attr_accessor :service
|
30
30
|
|
31
|
-
# If not empty, indicates that
|
31
|
+
# If not empty, indicates that more records match
|
32
32
|
# the request and this value should be passed to continue.
|
33
33
|
attr_accessor :token
|
34
34
|
|
@@ -40,7 +40,7 @@ module Google
|
|
40
40
|
attr_accessor :failed_locations
|
41
41
|
|
42
42
|
# @private
|
43
|
-
#
|
43
|
+
# Creates a new Instance::List with an array of
|
44
44
|
# Instance instances.
|
45
45
|
def initialize arr = []
|
46
46
|
super(arr)
|
@@ -63,7 +63,7 @@ module Google
|
|
63
63
|
!token.nil?
|
64
64
|
end
|
65
65
|
|
66
|
-
#
|
66
|
+
# Retrieves the next page of instances.
|
67
67
|
#
|
68
68
|
# @return [Instance::List] The list of instances.
|
69
69
|
#
|
@@ -92,11 +92,11 @@ module Google
|
|
92
92
|
# {#next?} returns `false`. Calls the given block once for each
|
93
93
|
# result, which is passed as the argument to the block.
|
94
94
|
#
|
95
|
-
# An
|
95
|
+
# An enumerator is returned if no block is given.
|
96
96
|
#
|
97
97
|
# This method will make repeated API calls until all remaining results
|
98
|
-
# are retrieved
|
99
|
-
# over the results returned by a single API call.
|
98
|
+
# are retrieved (unlike `#each`, for example, which merely iterates
|
99
|
+
# over the results returned by a single API call). Use with caution.
|
100
100
|
#
|
101
101
|
# @yield [instance] The block for accessing each instance.
|
102
102
|
# @yieldparam [Instance] instance The instance object.
|
@@ -148,7 +148,7 @@ module Google
|
|
148
148
|
|
149
149
|
protected
|
150
150
|
|
151
|
-
#
|
151
|
+
# Raises an error unless an active service is available.
|
152
152
|
def ensure_service!
|
153
153
|
raise "Must have active connection" unless service
|
154
154
|
end
|
@@ -20,14 +20,14 @@ module Google
|
|
20
20
|
module Bigtable
|
21
21
|
# # MutationEntry
|
22
22
|
#
|
23
|
-
# MutationEntry is a chainable structure
|
23
|
+
# MutationEntry is a chainable structure that holds data for different
|
24
24
|
# type of mutations.
|
25
|
-
# MutationEntry is used in following data operations
|
25
|
+
# MutationEntry is used in following data operations:
|
26
26
|
#
|
27
27
|
# * Mutate row. See {Google::Cloud::Bigtable::Table#mutate_row}
|
28
28
|
# * Mutate rows. See {Google::Cloud::Bigtable::Table#mutate_rows}
|
29
29
|
# * Check and mutate row using a predicate.
|
30
|
-
#
|
30
|
+
# See {Google::Cloud::Bigtable::Table#check_and_mutate_row}
|
31
31
|
#
|
32
32
|
# @example
|
33
33
|
# entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
|
@@ -69,14 +69,14 @@ module Google
|
|
69
69
|
|
70
70
|
# Add SetCell mutation to list of mutations.
|
71
71
|
#
|
72
|
-
# A
|
72
|
+
# A mutation that sets the value of the specified cell.
|
73
73
|
#
|
74
74
|
# @param family [String] Table column family name.
|
75
75
|
# The name of the family into which new data should be written.
|
76
76
|
# Must match `[-_.a-zA-Z0-9]+`
|
77
77
|
# @param qualifier [String] Column qualifier name.
|
78
78
|
# The qualifier of the column into which new data should be written.
|
79
|
-
# Can be any byte string, including
|
79
|
+
# Can be any byte string, including an empty string.
|
80
80
|
# @param value [String, Integer] Cell value data.
|
81
81
|
# The value to be written into the specified cell.
|
82
82
|
# @param timestamp [Time, Integer] Timestamp value.
|
@@ -84,7 +84,7 @@ module Google
|
|
84
84
|
# Use -1 for current Bigtable server time.
|
85
85
|
# Otherwise, the client should set this value itself, noting that the
|
86
86
|
# default value is a timestamp of zero if the field is left unspecified.
|
87
|
-
# Values must match the granularity of the table (
|
87
|
+
# Values must match the granularity of the table (micros or millis, for example).
|
88
88
|
# @return [MutationEntry] `self` object of entry for chaining.
|
89
89
|
#
|
90
90
|
# @example
|
@@ -101,7 +101,7 @@ module Google
|
|
101
101
|
# )
|
102
102
|
#
|
103
103
|
def set_cell family, qualifier, value, timestamp: nil
|
104
|
-
# If value is integer
|
104
|
+
# If value is integer, covert it to a 64-bit signed big-endian integer.
|
105
105
|
value = [value].pack("q>") if value.is_a?(Integer)
|
106
106
|
options = {
|
107
107
|
family_name: family,
|
@@ -119,19 +119,19 @@ module Google
|
|
119
119
|
|
120
120
|
# Add DeleteFromColumn entry to list of mutations.
|
121
121
|
#
|
122
|
-
# A
|
122
|
+
# A mutation that deletes cells from the specified column, optionally
|
123
123
|
# restricting the deletions to a given timestamp range.
|
124
124
|
#
|
125
125
|
# @param family [String] Table column family name.
|
126
|
-
# The name of the family from which cells should be deleted.
|
126
|
+
# The name of the column family from which cells should be deleted.
|
127
127
|
# Must match `[-_.a-zA-Z0-9]+`
|
128
128
|
# @param qualifier [String] Column qualifier name.
|
129
129
|
# The qualifier of the column from which cells should be deleted.
|
130
|
-
# Can be any byte string, including
|
131
|
-
# @param timestamp_from [Integer] Timestamp lower
|
132
|
-
# The range of timestamps
|
133
|
-
# @param timestamp_to [Integer] Timestamp upper
|
134
|
-
# The range of timestamps
|
130
|
+
# Can be any byte string, including an empty string.
|
131
|
+
# @param timestamp_from [Integer] Timestamp lower boundary. Optional.
|
132
|
+
# The range of timestamps from which cells should be deleted.
|
133
|
+
# @param timestamp_to [Integer] Timestamp upper boundary. Optional.
|
134
|
+
# The range of timestamps from which cells should be deleted.
|
135
135
|
# @return [MutationEntry] `self` object of entry for chaining.
|
136
136
|
#
|
137
137
|
# @example Without timestamp range
|
@@ -146,7 +146,7 @@ module Google
|
|
146
146
|
# timestamp_from: (Time.now.to_i - 1800) * 1000,
|
147
147
|
# timestamp_to: (Time.now.to_i * 1000)
|
148
148
|
# )
|
149
|
-
# @example With lower
|
149
|
+
# @example With timestamp range with lower boundary only
|
150
150
|
# entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
|
151
151
|
# entry.delete_cells(
|
152
152
|
# "cf1",
|
@@ -177,10 +177,10 @@ module Google
|
|
177
177
|
|
178
178
|
# Add DeleteFromFamily to list of mutations.
|
179
179
|
#
|
180
|
-
# A
|
180
|
+
# A mutation that deletes all cells from the specified column family.
|
181
181
|
#
|
182
182
|
# @param family [String] Table column family name.
|
183
|
-
# The name of the family from which cells should be deleted.
|
183
|
+
# The name of the column family from which cells should be deleted.
|
184
184
|
# Must match `[-_.a-zA-Z0-9]+`
|
185
185
|
# @return [MutationEntry] `self` object of entry for chaining.
|
186
186
|
#
|
@@ -218,7 +218,7 @@ module Google
|
|
218
218
|
@retryable
|
219
219
|
end
|
220
220
|
|
221
|
-
#
|
221
|
+
# Number of mutations
|
222
222
|
#
|
223
223
|
# @return [Integer]
|
224
224
|
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
module Bigtable
|
26
26
|
# # MutationOperations
|
27
27
|
#
|
28
|
-
# Collection of mutations
|
28
|
+
# Collection of mutations APIs.
|
29
29
|
#
|
30
30
|
# * Mutate single row
|
31
31
|
# * Mutate multiple rows
|
@@ -35,11 +35,11 @@ module Google
|
|
35
35
|
module MutationOperations
|
36
36
|
# Mutate row.
|
37
37
|
#
|
38
|
-
# Mutates a row atomically. Cells
|
38
|
+
# Mutates a row atomically. Cells in the row are left
|
39
39
|
# unchanged unless explicitly changed by +mutation+.
|
40
40
|
# Changes to be atomically applied to the specified row. Entries are applied
|
41
|
-
# in order, meaning that earlier mutations can be masked by later
|
42
|
-
# Must contain at least one mutation entry and at most
|
41
|
+
# in order, meaning that earlier mutations can be masked by later mutations.
|
42
|
+
# Must contain at least one mutation entry and at most 100,000.
|
43
43
|
#
|
44
44
|
# @param entry [Google::Cloud::Bigtable::MutationEntry]
|
45
45
|
# Mutation entry with row key and list of mutations.
|
@@ -91,7 +91,7 @@ module Google
|
|
91
91
|
# Each entry is applied as an atomic mutation, but the entries may be
|
92
92
|
# applied in arbitrary order (even between entries for the same row).
|
93
93
|
# At least one entry must be specified, and in total the entries can
|
94
|
-
# contain
|
94
|
+
# contain a maximum of 100,000 mutations.
|
95
95
|
# @return [Array<Google::Bigtable::V2::MutateRowsResponse::Entry>]
|
96
96
|
#
|
97
97
|
# @example
|
@@ -117,7 +117,7 @@ module Google
|
|
117
117
|
# time. The method returns the new contents of all modified cells.
|
118
118
|
#
|
119
119
|
# @param key [String]
|
120
|
-
# The key of the row to which the read/modify/write rules should be applied.
|
120
|
+
# The row key of the row to which the read/modify/write rules should be applied.
|
121
121
|
# @param rules [Google::Cloud::Bigtable::ReadModifyWriteRule, Array<Google::Cloud::Bigtable::ReadModifyWriteRule>]
|
122
122
|
# Rules specifying how the specified row's contents are to be transformed
|
123
123
|
# into writes. Entries are applied in order, meaning that earlier rules will
|
@@ -177,29 +177,31 @@ module Google
|
|
177
177
|
row
|
178
178
|
end
|
179
179
|
|
180
|
-
# Mutates a row atomically based on the output of a predicate
|
180
|
+
# Mutates a row atomically based on the output of a predicate reader filter.
|
181
181
|
#
|
182
182
|
# NOTE: Condition predicate filter is not supported.
|
183
183
|
#
|
184
184
|
# @param key [String] Row key.
|
185
|
-
# The key of the row to which the conditional mutation should be applied.
|
185
|
+
# The row key of the row to which the conditional mutation should be applied.
|
186
186
|
# @param predicate [SimpleFilter, ChainFilter, InterleaveFilter] Predicate filter.
|
187
187
|
# The filter to be applied to the contents of the specified row. Depending
|
188
188
|
# on whether or not any results are yielded, either +true_mutations+ or
|
189
189
|
# +false_mutations+ will be executed. If unset, checks that the row contains
|
190
|
-
# any values
|
191
|
-
# @param on_match [Google::Cloud::Bigtable::MutationEntry] Mutation entry
|
190
|
+
# any values.
|
191
|
+
# @param on_match [Google::Cloud::Bigtable::MutationEntry] Mutation entry
|
192
|
+
# applied to predicate filter match.
|
192
193
|
# Changes to be atomically applied to the specified row if +predicate_filter+
|
193
194
|
# yields at least one cell when applied to +row_key+. Entries are applied in
|
194
195
|
# order, meaning that earlier mutations can be masked by later ones.
|
195
|
-
# Must contain at least one entry if +false_mutations+ is empty
|
196
|
-
#
|
197
|
-
# @param otherwise [Google::Cloud::Bigtable::MutationEntry] Mutation entry
|
196
|
+
# Must contain at least one entry if +false_mutations+ is empty and at most
|
197
|
+
# 100,000 entries.
|
198
|
+
# @param otherwise [Google::Cloud::Bigtable::MutationEntry] Mutation entry applied
|
199
|
+
# when predicate filter does not match.
|
198
200
|
# Changes to be atomically applied to the specified row if +predicate_filter+
|
199
201
|
# does not yield any cells when applied to +row_key+. Entries are applied in
|
200
202
|
# order, meaning that earlier mutations can be masked by later ones.
|
201
|
-
# Must contain at least one entry if +true_mutations+ is empty
|
202
|
-
#
|
203
|
+
# Must contain at least one entry if +true_mutations+ is empty and at most
|
204
|
+
# 100,000 entries.
|
203
205
|
# @return [Boolean]
|
204
206
|
# Predicate match or not status
|
205
207
|
# @example
|
@@ -252,9 +254,9 @@ module Google
|
|
252
254
|
# Read sample row keys.
|
253
255
|
#
|
254
256
|
# Returns a sample of row keys in the table. The returned row keys will
|
255
|
-
# delimit contiguous sections of the table of approximately equal size
|
256
|
-
#
|
257
|
-
#
|
257
|
+
# delimit contiguous sections of the table of approximately equal size. The
|
258
|
+
# sections can be used to break up the data for distributed tasks like
|
259
|
+
# MapReduces.
|
258
260
|
#
|
259
261
|
# @yieldreturn [Google::Cloud::Bigtable::SampleRowKey]
|
260
262
|
# @return [:yields: sample_row_key]
|
@@ -283,10 +285,10 @@ module Google
|
|
283
285
|
end
|
284
286
|
end
|
285
287
|
|
286
|
-
# Create instance of mutation_entry
|
288
|
+
# Create an instance of mutation_entry
|
287
289
|
#
|
288
290
|
# @param row_key [String] Row key. Optional
|
289
|
-
# The key of the row to which the mutation should be applied.
|
291
|
+
# The row key of the row to which the mutation should be applied.
|
290
292
|
# @return [Google::Cloud::Bigtable::MutationEntry]
|
291
293
|
#
|
292
294
|
# @example
|
@@ -304,13 +306,13 @@ module Google
|
|
304
306
|
Google::Cloud::Bigtable::MutationEntry.new(row_key)
|
305
307
|
end
|
306
308
|
|
307
|
-
# Create instance of ReadModifyWriteRule to append or increment value
|
309
|
+
# Create an instance of ReadModifyWriteRule to append or increment the value
|
308
310
|
# of the cell qualifier.
|
309
311
|
#
|
310
312
|
# @param family [String]
|
311
|
-
# The name of the family to which the read/modify/write should be applied.
|
313
|
+
# The name of the column family to which the read/modify/write should be applied.
|
312
314
|
# @param qualifier [String]
|
313
|
-
# The qualifier of the column to which the read/modify/write should be
|
315
|
+
# The qualifier of the column to which the read/modify/write should be applied.
|
314
316
|
# @return [Google::Cloud::Bigtable::ReadModifyWriteRule]
|
315
317
|
#
|
316
318
|
# @example Create rule to append to qualifier value.
|
@@ -18,22 +18,22 @@ module Google
|
|
18
18
|
module Bigtable
|
19
19
|
# # Policy
|
20
20
|
#
|
21
|
-
# Represents a Cloud IAM Policy for
|
21
|
+
# Represents a Cloud IAM Policy for Bigtable instance resources.
|
22
22
|
#
|
23
|
-
# A common pattern for updating a resource's metadata, such as its
|
23
|
+
# A common pattern for updating a resource's metadata, such as its policy,
|
24
24
|
# is to read the current data from the service, update the data locally,
|
25
|
-
# and then
|
26
|
-
# a conflict if two or more processes attempt the sequence simultaneously.
|
25
|
+
# and then write the modified data back to the resource. This pattern may
|
26
|
+
# result in a conflict if two or more processes attempt the sequence simultaneously.
|
27
27
|
# IAM solves this problem with the {Google::Cloud::Bigtable::Policy#etag}
|
28
28
|
# property, which is used to verify whether the policy has changed since
|
29
|
-
# the last request. When you make a request
|
29
|
+
# the last request. When you make a request with an `etag` value, Cloud
|
30
30
|
# IAM compares the `etag` value in the request with the existing `etag`
|
31
31
|
# value associated with the policy. It writes the policy only if the
|
32
32
|
# `etag` values match.
|
33
33
|
#
|
34
34
|
# @see https://cloud.google.com/bigtable/docs/access-control Permissions and roles
|
35
35
|
#
|
36
|
-
# @attr [String] etag Used to
|
36
|
+
# @attr [String] etag Used to check if the policy has changed since
|
37
37
|
# the last request. The policy will be written only if the `etag` values
|
38
38
|
# match.
|
39
39
|
# @attr [Hash{String => Array<String>}] roles The bindings that associate
|
@@ -66,9 +66,9 @@ module Google
|
|
66
66
|
# Convenience method for adding a member to a binding on this policy.
|
67
67
|
# See [Understanding
|
68
68
|
# Roles](https://cloud.google.com/iam/docs/understanding-roles) for a
|
69
|
-
#
|
69
|
+
# list of primitive and curated roles. See
|
70
70
|
# [Binding](https://cloud.google.com/bigtable/docs/access-control)
|
71
|
-
# for a
|
71
|
+
# for a list of values and patterns for members.
|
72
72
|
#
|
73
73
|
# @param [String] role_name A Cloud IAM role, such as
|
74
74
|
# `"roles/bigtable.admin"`.
|
@@ -91,9 +91,9 @@ module Google
|
|
91
91
|
# Convenience method for removing a member from a binding on this
|
92
92
|
# policy. See [Understanding
|
93
93
|
# Roles](https://cloud.google.com/iam/docs/understanding-roles) for a
|
94
|
-
#
|
94
|
+
# list of primitive and curated roles.See
|
95
95
|
# [Binding](https://cloud.google.com/bigtable/docs/access-control)
|
96
|
-
# for a
|
96
|
+
# for a list of values and patterns for members.
|
97
97
|
#
|
98
98
|
# @param [String] role_name A Cloud IAM role, such as
|
99
99
|
# `"roles/Bigtable.admin"`.
|
@@ -114,12 +114,12 @@ module Google
|
|
114
114
|
end
|
115
115
|
|
116
116
|
# Convenience method returning the array of members bound to a role in
|
117
|
-
# this policy
|
117
|
+
# this policy. Returns an empty array if no value is present for the role in
|
118
118
|
# {#roles}. See [Understanding
|
119
119
|
# Roles](https://cloud.google.com/iam/docs/understanding-roles) for a
|
120
|
-
#
|
120
|
+
# list of primitive and curated roles. See
|
121
121
|
# [Binding](https://cloud.google.com/bigtable/docs/access-control)
|
122
|
-
# for a
|
122
|
+
# for a list of values and patterns for members.
|
123
123
|
#
|
124
124
|
# @return [Array<String>] The members strings, or an empty array.
|
125
125
|
#
|
@@ -64,7 +64,7 @@ module Google
|
|
64
64
|
|
65
65
|
# The identifier for the Cloud Bigtable project.
|
66
66
|
#
|
67
|
-
# @return [String] Project
|
67
|
+
# @return [String] Project ID.
|
68
68
|
#
|
69
69
|
# @example
|
70
70
|
# require "google/cloud"
|
@@ -84,7 +84,7 @@ module Google
|
|
84
84
|
# Retrieves the list of Bigtable instances for the project.
|
85
85
|
#
|
86
86
|
# @param token [String] The `token` value returned by the last call to
|
87
|
-
# `instances`; indicates that this is a continuation of a call
|
87
|
+
# `instances`; indicates that this is a continuation of a call
|
88
88
|
# and that the system should return the next page of data.
|
89
89
|
# @return [Array<Google::Cloud::Bigtable::Instance>] The list of instances.
|
90
90
|
# (See {Google::Cloud::Bigtable::Instance::List})
|
@@ -105,7 +105,7 @@ module Google
|
|
105
105
|
Instance::List.from_grpc(grpc, service)
|
106
106
|
end
|
107
107
|
|
108
|
-
# Get existing Bigtable instance.
|
108
|
+
# Get an existing Bigtable instance.
|
109
109
|
#
|
110
110
|
# @param instance_id [String] Existing instance id.
|
111
111
|
# @return [Google::Cloud::Bigtable::Instance, nil]
|
@@ -136,10 +136,10 @@ module Google
|
|
136
136
|
# @param instance_id [String] The unique identifier for the instance,
|
137
137
|
# which cannot be changed after the instance is created. Values are of
|
138
138
|
# the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 6 and 30
|
139
|
-
# characters
|
139
|
+
# characters. Required.
|
140
140
|
# @param display_name [String] The descriptive name for this instance as it
|
141
141
|
# appears in UIs. Must be unique per project and between 4 and 30
|
142
|
-
# characters
|
142
|
+
# characters.
|
143
143
|
# @param type [Symbol] The type of the instance.
|
144
144
|
# Valid values are `:DEVELOPMENT` or `:PRODUCTION`.
|
145
145
|
# Default `:PRODUCTION` instance will created if left blank.
|
@@ -147,20 +147,20 @@ module Google
|
|
147
147
|
# mechanism for organizing cloud resources into groups that reflect a
|
148
148
|
# customer's organizational needs and deployment strategies. Cloud
|
149
149
|
# Labels can be used to filter collections of resources. They can be
|
150
|
-
# used to control how resource metrics are aggregated.
|
151
|
-
# used as arguments to policy management rules (e.g
|
152
|
-
# load balancing
|
150
|
+
# used to control how resource metrics are aggregated. Cloud Labels can be
|
151
|
+
# used as arguments to policy management rules (e.g., route, firewall, or
|
152
|
+
# load balancing).
|
153
153
|
#
|
154
|
-
# * Label keys must be between 1 and 63 characters
|
154
|
+
# * Label keys must be between 1 and 63 characters and must
|
155
155
|
# conform to the following regular expression:
|
156
156
|
# `[a-z]([-a-z0-9]*[a-z0-9])?`.
|
157
|
-
# * Label values must be between 0 and 63 characters
|
157
|
+
# * Label values must be between 0 and 63 characters and must
|
158
158
|
# conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
|
159
159
|
# * No more than 64 labels can be associated with a given resource.
|
160
160
|
# @param clusters [Hash{String => Google::Cloud::Bigtable::Cluster}]
|
161
161
|
# (See {Google::Cloud::Bigtable::Instance::ClusterMap})
|
162
162
|
# If unspecified, you may use a code block to add clusters.
|
163
|
-
# Minimum one cluster must be specified.
|
163
|
+
# Minimum of one cluster must be specified.
|
164
164
|
# @yield [clusters] A block for adding clusters.
|
165
165
|
# @yieldparam [Hash{String => Google::Cloud::Bigtable::Cluster}]
|
166
166
|
# Cluster map of cluster name and cluster object.
|
@@ -254,8 +254,8 @@ module Google
|
|
254
254
|
# List all clusters in project.
|
255
255
|
#
|
256
256
|
# @param token [String] The `token` value returned by the last call to
|
257
|
-
# `clusters
|
258
|
-
# and
|
257
|
+
# `clusters` indicates that this is a continuation of a call
|
258
|
+
# and the system should return the next page of data.
|
259
259
|
# @return [Array<Google::Cloud::Bigtable::Cluster>]
|
260
260
|
# (See {Google::Cloud::Bigtable::Cluster::List})
|
261
261
|
# @example
|
@@ -302,7 +302,7 @@ module Google
|
|
302
302
|
# @param instance_id [String] Existing instance Id.
|
303
303
|
# @param table_id [String] Existing table Id.
|
304
304
|
# @param view [Symbol] Optional. Table view type. Default `:SCHEMA_VIEW`
|
305
|
-
# Valid view types are
|
305
|
+
# Valid view types are the following:
|
306
306
|
# * `:NAME_ONLY` - Only populates `name`
|
307
307
|
# * `:SCHEMA_VIEW` - Only populates `name` and fields related to the table's schema
|
308
308
|
# * `:REPLICATION_VIEW` - Only populates `name` and fields related to the table's replication state.
|
@@ -311,9 +311,9 @@ module Google
|
|
311
311
|
# Get table object without verifying that the table resource exists.
|
312
312
|
# Calls made on this object will raise errors if the table does not exist.
|
313
313
|
# Default value is `false`. Optional.
|
314
|
-
#
|
314
|
+
# Helps to reduce admin API calls.
|
315
315
|
# @param app_profile_id [String] The unique identifier for the app profile. Optional.
|
316
|
-
#
|
316
|
+
# Used only in data operations.
|
317
317
|
# This value specifies routing for replication. If not specified, the
|
318
318
|
# "default" application profile will be used.
|
319
319
|
# @return [Google::Cloud::Bigtable::Table, nil]
|
@@ -336,7 +336,7 @@ module Google
|
|
336
336
|
#
|
337
337
|
# table = bigtable.table("my-instance", "my-table")
|
338
338
|
#
|
339
|
-
# @example Get table with all fields
|
339
|
+
# @example Get table with all fields, cluster states, and column families.
|
340
340
|
# require "google/cloud/bigtable"
|
341
341
|
#
|
342
342
|
# bigtable = Google::Cloud::Bigtable.new
|
@@ -404,17 +404,17 @@ module Google
|
|
404
404
|
# specified in the request.
|
405
405
|
#
|
406
406
|
# @param instance_id [String]
|
407
|
-
# The unique
|
407
|
+
# The unique ID of the instance in which to create the table.
|
408
408
|
# @param table_id [String]
|
409
|
-
# The
|
410
|
-
# instance, e.g., `foobar
|
409
|
+
# The ID by which the new table should be referred to within the
|
410
|
+
# instance, e.g., `foobar`.
|
411
411
|
# @param column_families [Hash{String => Google::Cloud::Bigtable::ColumnFamily}]
|
412
412
|
# (See {Google::Cloud::Bigtable::Table::ColumnFamilyMap})
|
413
413
|
# If unspecified, you may use a code block to add column families.
|
414
414
|
# @param granularity [Symbol]
|
415
415
|
# The granularity at which timestamps are stored in this table.
|
416
416
|
# Timestamps not matching the granularity will be rejected.
|
417
|
-
# Valid
|
417
|
+
# Valid value is `:MILLIS`.
|
418
418
|
# If unspecified, the value will be set to `:MILLIS`.
|
419
419
|
# @param initial_splits [Array<String>]
|
420
420
|
# The optional list of row keys that will be used to initially split the
|
@@ -432,17 +432,17 @@ module Google
|
|
432
432
|
# * Tablet 3 : `[customer_1, customer_2) => {"customer_1"}`
|
433
433
|
# * Tablet 4 : `[customer_2, other) => {"customer_2"}`
|
434
434
|
# * Tablet 5 : `[other, ) => {"other", "zz"}`
|
435
|
-
# A hash
|
435
|
+
# A hash in the form of `Google::Bigtable::Admin::V2::CreateTableRequest::Split`
|
436
436
|
# can also be provided.
|
437
437
|
# @yield [column_families] A block for adding column_families.
|
438
438
|
# @yieldparam [Hash{String => Google::Cloud::Bigtable::ColumnFamily}]
|
439
439
|
# Map of family name and column family object.
|
440
440
|
# (See {Google::Cloud::Bigtable::Instance::ColumnFamilyMap})
|
441
|
-
# GC Rules for column
|
441
|
+
# (Read the GC Rules for column families at {Google::Cloud::Bigtable::GcRule})
|
442
442
|
#
|
443
443
|
# @return [Google::Cloud::Bigtable::Table]
|
444
444
|
#
|
445
|
-
# @example Create table without column family
|
445
|
+
# @example Create a table without a column family
|
446
446
|
# require "google/cloud/bigtable"
|
447
447
|
#
|
448
448
|
# bigtable = Google::Cloud::Bigtable.new
|
@@ -491,9 +491,9 @@ module Google
|
|
491
491
|
# Permanently deletes a specified table and all of its data.
|
492
492
|
#
|
493
493
|
# @param instance_id [String]
|
494
|
-
# The unique
|
494
|
+
# The unique ID of the instance the table is in.
|
495
495
|
# @param table_id [String]
|
496
|
-
# The unique
|
496
|
+
# The unique ID of the table to be deleted,
|
497
497
|
# e.g., `foobar`
|
498
498
|
#
|
499
499
|
# @example Create table with column families and initial splits.
|
@@ -514,7 +514,7 @@ module Google
|
|
514
514
|
# where only some modifications have taken effect.
|
515
515
|
#
|
516
516
|
# @param instance_id [String]
|
517
|
-
# The unique
|
517
|
+
# The unique ID of the instance the table is in.
|
518
518
|
# @param table_id [String]
|
519
519
|
# The unique Id of the table whose families should be modified.
|
520
520
|
# @param modifications [Array<Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification> | Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification]
|