google-cloud-bigtable 1.2.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/CHANGELOG.md +57 -0
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google-cloud-bigtable.rb +30 -27
- data/lib/google/cloud/bigtable.rb +18 -26
- data/lib/google/cloud/bigtable/app_profile.rb +3 -3
- data/lib/google/cloud/bigtable/app_profile/list.rb +6 -4
- data/lib/google/cloud/bigtable/backup.rb +445 -0
- data/lib/google/cloud/bigtable/backup/job.rb +87 -0
- data/lib/google/cloud/bigtable/backup/list.rb +167 -0
- data/lib/google/cloud/bigtable/chunk_processor.rb +1 -1
- data/lib/google/cloud/bigtable/cluster.rb +101 -2
- data/lib/google/cloud/bigtable/cluster/list.rb +2 -2
- data/lib/google/cloud/bigtable/column_family.rb +2 -2
- data/lib/google/cloud/bigtable/column_family_map.rb +11 -11
- data/lib/google/cloud/bigtable/column_range.rb +2 -2
- data/lib/google/cloud/bigtable/credentials.rb +36 -2
- data/lib/google/cloud/bigtable/gc_rule.rb +7 -7
- data/lib/google/cloud/bigtable/instance.rb +6 -6
- data/lib/google/cloud/bigtable/instance/cluster_map.rb +1 -1
- data/lib/google/cloud/bigtable/instance/list.rb +2 -2
- data/lib/google/cloud/bigtable/longrunning_job.rb +13 -2
- data/lib/google/cloud/bigtable/mutation_entry.rb +10 -9
- data/lib/google/cloud/bigtable/mutation_operations.rb +2 -2
- data/lib/google/cloud/bigtable/project.rb +1 -1
- data/lib/google/cloud/bigtable/read_modify_write_rule.rb +2 -2
- data/lib/google/cloud/bigtable/read_operations.rb +2 -2
- data/lib/google/cloud/bigtable/routing_policy.rb +2 -2
- data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_range.rb +2 -2
- data/lib/google/cloud/bigtable/rows_mutator.rb +3 -3
- data/lib/google/cloud/bigtable/rows_reader.rb +10 -10
- data/lib/google/cloud/bigtable/sample_row_key.rb +2 -2
- data/lib/google/cloud/bigtable/service.rb +282 -245
- data/lib/google/cloud/bigtable/table.rb +5 -4
- data/lib/google/cloud/bigtable/table/cluster_state.rb +27 -6
- data/lib/google/cloud/bigtable/table/list.rb +2 -2
- data/lib/google/cloud/bigtable/table/restore_job.rb +117 -0
- data/lib/google/cloud/bigtable/value_range.rb +2 -2
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +16 -94
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +0 -145
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +0 -90
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +0 -208
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +0 -154
- data/lib/google/bigtable/admin/v2/common_pb.rb +0 -30
- data/lib/google/bigtable/admin/v2/instance_pb.rb +0 -74
- data/lib/google/bigtable/admin/v2/table_pb.rb +0 -127
- data/lib/google/bigtable/v2/bigtable_pb.rb +0 -113
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +0 -68
- data/lib/google/bigtable/v2/data_pb.rb +0 -156
- data/lib/google/cloud/bigtable/admin.rb +0 -202
- data/lib/google/cloud/bigtable/admin/credentials.rb +0 -27
- data/lib/google/cloud/bigtable/admin/v2.rb +0 -223
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +0 -1451
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +0 -139
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +0 -1734
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +0 -163
- data/lib/google/cloud/bigtable/admin/v2/credentials.rb +0 -51
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +0 -297
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +0 -587
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +0 -193
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +0 -303
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +0 -64
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +0 -33
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +0 -151
- data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +0 -45
- data/lib/google/cloud/bigtable/v2.rb +0 -146
- data/lib/google/cloud/bigtable/v2/bigtable_client.rb +0 -591
- data/lib/google/cloud/bigtable/v2/bigtable_client_config.json +0 -83
- data/lib/google/cloud/bigtable/v2/credentials.rb +0 -46
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +0 -290
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +0 -493
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +0 -34
- data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +0 -39
@@ -56,7 +56,7 @@ module Google
|
|
56
56
|
# @param family [String] Column family name.
|
57
57
|
#
|
58
58
|
def initialize family
|
59
|
-
@grpc = Google::Bigtable::V2::ColumnRange.new family_name: family
|
59
|
+
@grpc = Google::Cloud::Bigtable::V2::ColumnRange.new family_name: family
|
60
60
|
end
|
61
61
|
|
62
62
|
##
|
@@ -183,7 +183,7 @@ module Google
|
|
183
183
|
|
184
184
|
# @private
|
185
185
|
#
|
186
|
-
# @return [Google::Bigtable::V2::ColumnRange]
|
186
|
+
# @return [Google::Cloud::Bigtable::V2::ColumnRange]
|
187
187
|
#
|
188
188
|
def to_grpc
|
189
189
|
@grpc
|
@@ -13,12 +13,46 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
|
16
|
-
require "google/cloud/bigtable/v2/credentials"
|
16
|
+
require "google/cloud/bigtable/v2/bigtable/credentials"
|
17
17
|
|
18
18
|
module Google
|
19
19
|
module Cloud
|
20
20
|
module Bigtable
|
21
|
-
|
21
|
+
##
|
22
|
+
# # Credentials
|
23
|
+
#
|
24
|
+
# Represents the authentication and authorization used to connect to the
|
25
|
+
# Bigtable API.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require "google/cloud/bigtable"
|
29
|
+
#
|
30
|
+
# keyfile = "/path/to/keyfile.json"
|
31
|
+
# creds = Google::Cloud::Bigtable::Credentials.new keyfile
|
32
|
+
#
|
33
|
+
# bigtable = Google::Cloud::Bigtable.new(
|
34
|
+
# project_id: "my-project",
|
35
|
+
# credentials: creds
|
36
|
+
# )
|
37
|
+
#
|
38
|
+
# bigtable.project_id #=> "my-project"
|
39
|
+
#
|
40
|
+
class Credentials < Google::Cloud::Bigtable::V2::Bigtable::Credentials
|
41
|
+
self.scope = [
|
42
|
+
"https://www.googleapis.com/auth/bigtable.admin",
|
43
|
+
"https://www.googleapis.com/auth/bigtable.admin.cluster",
|
44
|
+
"https://www.googleapis.com/auth/bigtable.admin.instance",
|
45
|
+
"https://www.googleapis.com/auth/bigtable.admin.table",
|
46
|
+
"https://www.googleapis.com/auth/bigtable.data",
|
47
|
+
"https://www.googleapis.com/auth/bigtable.data.readonly",
|
48
|
+
"https://www.googleapis.com/auth/cloud-bigtable.admin",
|
49
|
+
"https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
|
50
|
+
"https://www.googleapis.com/auth/cloud-bigtable.admin.table",
|
51
|
+
"https://www.googleapis.com/auth/cloud-bigtable.data",
|
52
|
+
"https://www.googleapis.com/auth/cloud-bigtable.data.readonly",
|
53
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
54
|
+
"https://www.googleapis.com/auth/cloud-platform.read-only"
|
55
|
+
]
|
22
56
|
end
|
23
57
|
end
|
24
58
|
end
|
@@ -66,10 +66,10 @@ module Google
|
|
66
66
|
# @private
|
67
67
|
# Creates a new GC Rule instance.
|
68
68
|
#
|
69
|
-
# @param grpc [Google::Bigtable::Admin::V2::GcRule | nil]
|
69
|
+
# @param grpc [Google::Cloud::Bigtable::Admin::V2::GcRule | nil]
|
70
70
|
#
|
71
71
|
def initialize grpc = nil
|
72
|
-
@grpc = grpc || Google::Bigtable::Admin::V2::GcRule.new
|
72
|
+
@grpc = grpc || Google::Cloud::Bigtable::Admin::V2::GcRule.new
|
73
73
|
end
|
74
74
|
|
75
75
|
##
|
@@ -146,7 +146,7 @@ module Google
|
|
146
146
|
# List of GcRule with nested rules.
|
147
147
|
#
|
148
148
|
def intersection= rules
|
149
|
-
@grpc.intersection = Google::Bigtable::Admin::V2::GcRule::Intersection.new rules: rules.map(&:to_grpc)
|
149
|
+
@grpc.intersection = Google::Cloud::Bigtable::Admin::V2::GcRule::Intersection.new rules: rules.map(&:to_grpc)
|
150
150
|
end
|
151
151
|
|
152
152
|
##
|
@@ -186,7 +186,7 @@ module Google
|
|
186
186
|
# List of GcRule with nested rules.
|
187
187
|
#
|
188
188
|
def union= rules
|
189
|
-
@grpc.union = Google::Bigtable::Admin::V2::GcRule::Union.new rules: rules.map(&:to_grpc)
|
189
|
+
@grpc.union = Google::Cloud::Bigtable::Admin::V2::GcRule::Union.new rules: rules.map(&:to_grpc)
|
190
190
|
end
|
191
191
|
|
192
192
|
##
|
@@ -314,7 +314,7 @@ module Google
|
|
314
314
|
|
315
315
|
# @private
|
316
316
|
# Get gRPC instance of GC Rule
|
317
|
-
# @return [Google::Bigtable::Admin::V2::GcRule]
|
317
|
+
# @return [Google::Cloud::Bigtable::Admin::V2::GcRule]
|
318
318
|
def to_grpc
|
319
319
|
@grpc
|
320
320
|
end
|
@@ -322,8 +322,8 @@ module Google
|
|
322
322
|
# @private
|
323
323
|
#
|
324
324
|
# Creates a new GcRule instance from a
|
325
|
-
# Google::Bigtable::Admin::V2::GcRule.
|
326
|
-
# @param grpc [Google::Bigtable::Admin::V2::GcRule]
|
325
|
+
# Google::Cloud::Bigtable::Admin::V2::GcRule.
|
326
|
+
# @param grpc [Google::Cloud::Bigtable::Admin::V2::GcRule]
|
327
327
|
# @return [Google::Cloud::Bigtable::GcRule]
|
328
328
|
def self.from_grpc grpc
|
329
329
|
new grpc
|
@@ -431,7 +431,7 @@ module Google
|
|
431
431
|
location: location
|
432
432
|
}.delete_if { |_, v| v.nil? }
|
433
433
|
|
434
|
-
cluster = Google::Bigtable::Admin::V2::Cluster.new attrs
|
434
|
+
cluster = Google::Cloud::Bigtable::Admin::V2::Cluster.new attrs
|
435
435
|
grpc = service.create_cluster instance_id, cluster_id, cluster
|
436
436
|
Cluster::Job.from_grpc grpc, service
|
437
437
|
end
|
@@ -566,7 +566,7 @@ module Google
|
|
566
566
|
# * Tablet 3 : `[customer_1, customer_2) => {"customer_1"}`
|
567
567
|
# * Tablet 4 : `[customer_2, other) => {"customer_2"}`
|
568
568
|
# * Tablet 5 : `[other, ) => {"other", "zz"}`
|
569
|
-
# A hash in the form of `Google::Bigtable::Admin::V2::CreateTableRequest::Split`
|
569
|
+
# A hash in the form of `Google::Cloud::Bigtable::Admin::V2::CreateTableRequest::Split`
|
570
570
|
# can also be provided.
|
571
571
|
# @yield [column_families] A block for adding column families.
|
572
572
|
# @yieldparam [Google::Cloud::Bigtable::ColumnFamilyMap] column_families
|
@@ -709,7 +709,7 @@ module Google
|
|
709
709
|
def create_app_profile name, routing_policy, description: nil, etag: nil, ignore_warnings: false
|
710
710
|
ensure_service!
|
711
711
|
routing_policy_grpc = routing_policy.to_grpc
|
712
|
-
if routing_policy_grpc.is_a? Google::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny
|
712
|
+
if routing_policy_grpc.is_a? Google::Cloud::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny
|
713
713
|
multi_cluster_routing = routing_policy_grpc
|
714
714
|
else
|
715
715
|
single_cluster_routing = routing_policy_grpc
|
@@ -725,7 +725,7 @@ module Google
|
|
725
725
|
grpc = service.create_app_profile(
|
726
726
|
instance_id,
|
727
727
|
name,
|
728
|
-
Google::Bigtable::Admin::V2::AppProfile.new(app_profile_attrs),
|
728
|
+
Google::Cloud::Bigtable::Admin::V2::AppProfile.new(app_profile_attrs),
|
729
729
|
ignore_warnings: ignore_warnings
|
730
730
|
)
|
731
731
|
AppProfile.from_grpc grpc, service
|
@@ -909,9 +909,9 @@ module Google
|
|
909
909
|
# @private
|
910
910
|
#
|
911
911
|
# Creates a new Instance instance from a
|
912
|
-
# Google::Bigtable::Admin::V2::Instance.
|
912
|
+
# Google::Cloud::Bigtable::Admin::V2::Instance.
|
913
913
|
#
|
914
|
-
# @param grpc [Google::Bigtable::Admin::V2::Instance]
|
914
|
+
# @param grpc [Google::Cloud::Bigtable::Admin::V2::Instance]
|
915
915
|
# @param service [Google::Cloud::Bigtable::Service]
|
916
916
|
# @return [Google::Cloud::Bigtable::Instance]
|
917
917
|
#
|
@@ -106,7 +106,7 @@ module Google
|
|
106
106
|
# @yield [instance] The block for accessing each instance.
|
107
107
|
# @yieldparam [Instance] instance The instance object.
|
108
108
|
#
|
109
|
-
# @return [Enumerator]
|
109
|
+
# @return [Enumerator,nil] An enumerator is returned if no block is given, otherwise `nil`.
|
110
110
|
#
|
111
111
|
# @example Iterating each instance by passing a block:
|
112
112
|
# require "google/cloud/bigtable"
|
@@ -138,7 +138,7 @@ module Google
|
|
138
138
|
end
|
139
139
|
|
140
140
|
# @private
|
141
|
-
# New Instance::List from a Google::Bigtable::Admin::V2::Instance object.
|
141
|
+
# New Instance::List from a Google::Cloud::Bigtable::Admin::V2::Instance object.
|
142
142
|
def self.from_grpc grpc, service
|
143
143
|
instances = List.new(Array(grpc.instances).map do |instance|
|
144
144
|
Instance.from_grpc instance, service
|
@@ -29,7 +29,7 @@ module Google
|
|
29
29
|
#
|
30
30
|
class LongrunningJob
|
31
31
|
# @private
|
32
|
-
# The
|
32
|
+
# The Gapic::Operation gRPC object.
|
33
33
|
attr_accessor :grpc
|
34
34
|
|
35
35
|
# @private
|
@@ -97,8 +97,19 @@ module Google
|
|
97
97
|
@grpc.wait_until_done!
|
98
98
|
end
|
99
99
|
|
100
|
+
##
|
101
|
+
# @private Gets the metadata object of the operation.
|
102
|
+
#
|
103
|
+
# @return [Object, nil] `nil` if the operation is not complete.
|
104
|
+
#
|
105
|
+
def metadata
|
106
|
+
return nil unless done?
|
107
|
+
return nil unless @grpc.grpc_op.result == :response
|
108
|
+
@grpc.metadata
|
109
|
+
end
|
110
|
+
|
100
111
|
# @private
|
101
|
-
# New BasicJob from a
|
112
|
+
# New BasicJob from a Gapic::Operation object.
|
102
113
|
def self.from_grpc grpc, service
|
103
114
|
new.tap do |job|
|
104
115
|
job.grpc = grpc
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
# @private
|
61
61
|
# mutations gRPC list
|
62
|
-
# @return [Array<Google::Bigtable::V2::Mutation>]
|
62
|
+
# @return [Array<Google::Cloud::Bigtable::V2::Mutation>]
|
63
63
|
attr_accessor :mutations
|
64
64
|
|
65
65
|
##
|
@@ -123,7 +123,7 @@ module Google
|
|
123
123
|
options[:timestamp_micros] = timestamp
|
124
124
|
@retryable = timestamp != -1
|
125
125
|
end
|
126
|
-
@mutations << Google::Bigtable::V2::Mutation.new(set_cell: options)
|
126
|
+
@mutations << Google::Cloud::Bigtable::V2::Mutation.new(set_cell: options)
|
127
127
|
self
|
128
128
|
end
|
129
129
|
|
@@ -177,14 +177,15 @@ module Google
|
|
177
177
|
# )
|
178
178
|
#
|
179
179
|
def delete_cells family, qualifier, timestamp_from: nil, timestamp_to: nil
|
180
|
-
grpc = Google::Bigtable::V2::Mutation::DeleteFromColumn.new
|
180
|
+
grpc = Google::Cloud::Bigtable::V2::Mutation::DeleteFromColumn.new \
|
181
|
+
family_name: family, column_qualifier: qualifier
|
181
182
|
if timestamp_from || timestamp_to
|
182
|
-
time_range = Google::Bigtable::V2::TimestampRange.new
|
183
|
+
time_range = Google::Cloud::Bigtable::V2::TimestampRange.new
|
183
184
|
time_range.start_timestamp_micros = timestamp_from if timestamp_from
|
184
185
|
time_range.end_timestamp_micros = timestamp_to if timestamp_to
|
185
186
|
grpc.time_range = time_range
|
186
187
|
end
|
187
|
-
@mutations << Google::Bigtable::V2::Mutation.new(delete_from_column: grpc)
|
188
|
+
@mutations << Google::Cloud::Bigtable::V2::Mutation.new(delete_from_column: grpc)
|
188
189
|
self
|
189
190
|
end
|
190
191
|
|
@@ -203,7 +204,7 @@ module Google
|
|
203
204
|
# entry.delete_from_family("cf-1")
|
204
205
|
#
|
205
206
|
def delete_from_family family
|
206
|
-
@mutations << Google::Bigtable::V2::Mutation.new(delete_from_family: { family_name: family })
|
207
|
+
@mutations << Google::Cloud::Bigtable::V2::Mutation.new(delete_from_family: { family_name: family })
|
207
208
|
self
|
208
209
|
end
|
209
210
|
|
@@ -219,7 +220,7 @@ module Google
|
|
219
220
|
# entry.delete_from_row
|
220
221
|
#
|
221
222
|
def delete_from_row
|
222
|
-
@mutations << Google::Bigtable::V2::Mutation.new(delete_from_row: {})
|
223
|
+
@mutations << Google::Cloud::Bigtable::V2::Mutation.new(delete_from_row: {})
|
223
224
|
self
|
224
225
|
end
|
225
226
|
|
@@ -245,10 +246,10 @@ module Google
|
|
245
246
|
#
|
246
247
|
# Convert mutation entry to gRPC protobuf object.
|
247
248
|
#
|
248
|
-
# @return [Google::Bigtable::V2::MutateRowsRequest::Entry]
|
249
|
+
# @return [Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry]
|
249
250
|
#
|
250
251
|
def to_grpc
|
251
|
-
Google::Bigtable::V2::MutateRowsRequest::Entry.new row_key: @row_key, mutations: @mutations
|
252
|
+
Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry.new row_key: @row_key, mutations: @mutations
|
252
253
|
end
|
253
254
|
end
|
254
255
|
end
|
@@ -89,7 +89,7 @@ module Google
|
|
89
89
|
# applied in arbitrary order (even between entries for the same row).
|
90
90
|
# At least one entry must be specified, and in total the entries can
|
91
91
|
# contain a maximum of 100,000 mutations.
|
92
|
-
# @return [Array<Google::Bigtable::V2::MutateRowsResponse::Entry>]
|
92
|
+
# @return [Array<Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry>]
|
93
93
|
#
|
94
94
|
# @example
|
95
95
|
# require "google/cloud/bigtable"
|
@@ -346,7 +346,7 @@ module Google
|
|
346
346
|
|
347
347
|
##
|
348
348
|
# @private New MutationEntry::Response from a
|
349
|
-
# Google::Bigtable::V2::MutateRowsResponse::Entry object.
|
349
|
+
# Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry object.
|
350
350
|
def self.from_grpc grpc
|
351
351
|
new grpc.index, Status.from_grpc(grpc.status)
|
352
352
|
end
|
@@ -227,7 +227,7 @@ module Google
|
|
227
227
|
labels = Hash[labels.map { |k, v| [String(k), String(v)] }] if labels
|
228
228
|
|
229
229
|
instance_attrs = { display_name: display_name, type: type, labels: labels }.delete_if { |_, v| v.nil? }
|
230
|
-
instance = Google::Bigtable::Admin::V2::Instance.new instance_attrs
|
230
|
+
instance = Google::Cloud::Bigtable::Admin::V2::Instance.new instance_attrs
|
231
231
|
clusters ||= Instance::ClusterMap.new
|
232
232
|
yield clusters if block_given?
|
233
233
|
|
@@ -44,7 +44,7 @@ module Google
|
|
44
44
|
# The qualifier of the column to which the read/modify/write should be applied.
|
45
45
|
#
|
46
46
|
def initialize family, qualifier
|
47
|
-
@grpc = Google::Bigtable::V2::ReadModifyWriteRule.new
|
47
|
+
@grpc = Google::Cloud::Bigtable::V2::ReadModifyWriteRule.new
|
48
48
|
@grpc.family_name = family
|
49
49
|
@grpc.column_qualifier = qualifier
|
50
50
|
end
|
@@ -123,7 +123,7 @@ module Google
|
|
123
123
|
#
|
124
124
|
# Get gRPC protobuf instance.
|
125
125
|
#
|
126
|
-
# @return [Google::Bigtable::V2::ReadModifyWriteRule]
|
126
|
+
# @return [Google::Cloud::Bigtable::V2::ReadModifyWriteRule]
|
127
127
|
#
|
128
128
|
def to_grpc
|
129
129
|
@grpc
|
@@ -309,7 +309,7 @@ module Google
|
|
309
309
|
#
|
310
310
|
# @param row_keys [Array<String>]
|
311
311
|
# @param row_ranges [Google::Cloud::Bigtable::RowRange | Array<Google::Cloud::Bigtable::RowRange>]
|
312
|
-
# @return [Google::Bigtable::V2::RowSet]
|
312
|
+
# @return [Google::Cloud::Bigtable::V2::RowSet]
|
313
313
|
#
|
314
314
|
def build_row_set row_keys, row_ranges
|
315
315
|
row_set = {}
|
@@ -320,7 +320,7 @@ module Google
|
|
320
320
|
row_set[:row_ranges] = row_ranges.map(&:to_grpc)
|
321
321
|
end
|
322
322
|
|
323
|
-
Google::Bigtable::V2::RowSet.new row_set
|
323
|
+
Google::Cloud::Bigtable::V2::RowSet.new row_set
|
324
324
|
end
|
325
325
|
end
|
326
326
|
end
|
@@ -99,7 +99,7 @@ module Google
|
|
99
99
|
class MultiClusterRoutingUseAny < RoutingPolicy
|
100
100
|
# @private
|
101
101
|
def to_grpc
|
102
|
-
Google::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny.new
|
102
|
+
Google::Cloud::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny.new
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
@@ -161,7 +161,7 @@ module Google
|
|
161
161
|
|
162
162
|
# @private
|
163
163
|
def to_grpc
|
164
|
-
Google::Bigtable::Admin::V2::AppProfile::SingleClusterRouting.new(
|
164
|
+
Google::Cloud::Bigtable::Admin::V2::AppProfile::SingleClusterRouting.new(
|
165
165
|
cluster_id: cluster_id,
|
166
166
|
allow_transactional_writes: allow_transactional_writes
|
167
167
|
)
|
@@ -564,11 +564,11 @@ module Google
|
|
564
564
|
#
|
565
565
|
# Gets a gRPC object of RowFilter with a chain filter.
|
566
566
|
#
|
567
|
-
# @return [Google::Bigtable::V2::RowFilter]
|
567
|
+
# @return [Google::Cloud::Bigtable::V2::RowFilter]
|
568
568
|
#
|
569
569
|
def to_grpc
|
570
|
-
Google::Bigtable::V2::RowFilter.new(
|
571
|
-
chain: Google::Bigtable::V2::RowFilter::Chain.new(filters: @filters.map(&:to_grpc))
|
570
|
+
Google::Cloud::Bigtable::V2::RowFilter.new(
|
571
|
+
chain: Google::Cloud::Bigtable::V2::RowFilter::Chain.new(filters: @filters.map(&:to_grpc))
|
572
572
|
)
|
573
573
|
end
|
574
574
|
|
@@ -48,7 +48,7 @@ module Google
|
|
48
48
|
# @param predicate [SimpleFilter, ChainFilter, InterleaveFilter, ConditionFilter]
|
49
49
|
#
|
50
50
|
def initialize predicate
|
51
|
-
@grpc = Google::Bigtable::V2::RowFilter::Condition.new
|
51
|
+
@grpc = Google::Cloud::Bigtable::V2::RowFilter::Condition.new
|
52
52
|
@grpc.predicate_filter = predicate.to_grpc
|
53
53
|
end
|
54
54
|
|
@@ -102,10 +102,10 @@ module Google
|
|
102
102
|
|
103
103
|
# @private
|
104
104
|
# Gets the row-filter gRPC instance.
|
105
|
-
# @return [Google::Bigtable::V2::RowFilter]
|
105
|
+
# @return [Google::Cloud::Bigtable::V2::RowFilter]
|
106
106
|
#
|
107
107
|
def to_grpc
|
108
|
-
Google::Bigtable::V2::RowFilter.new condition: @grpc
|
108
|
+
Google::Cloud::Bigtable::V2::RowFilter.new condition: @grpc
|
109
109
|
end
|
110
110
|
end
|
111
111
|
end
|
@@ -595,11 +595,11 @@ module Google
|
|
595
595
|
#
|
596
596
|
# Gets a gRPC object of RowFilter with interleave filter.
|
597
597
|
#
|
598
|
-
# @return [Google::Bigtable::V2::RowFilter]
|
598
|
+
# @return [Google::Cloud::Bigtable::V2::RowFilter]
|
599
599
|
#
|
600
600
|
def to_grpc
|
601
|
-
Google::Bigtable::V2::RowFilter.new(
|
602
|
-
interleave: Google::Bigtable::V2::RowFilter::Interleave.new(filters: @filters.map(&:to_grpc))
|
601
|
+
Google::Cloud::Bigtable::V2::RowFilter.new(
|
602
|
+
interleave: Google::Cloud::Bigtable::V2::RowFilter::Interleave.new(filters: @filters.map(&:to_grpc))
|
603
603
|
)
|
604
604
|
end
|
605
605
|
|
@@ -28,7 +28,7 @@ module Google
|
|
28
28
|
# Creates a simple filter instance.
|
29
29
|
#
|
30
30
|
def initialize
|
31
|
-
@grpc = Google::Bigtable::V2::RowFilter.new
|
31
|
+
@grpc = Google::Cloud::Bigtable::V2::RowFilter.new
|
32
32
|
end
|
33
33
|
|
34
34
|
##
|
@@ -230,7 +230,7 @@ module Google
|
|
230
230
|
# @return [Google::Cloud::Bigtable::RowFilter::SimpleFilter]
|
231
231
|
#
|
232
232
|
def timestamp_range from, to
|
233
|
-
range_grpc = Google::Bigtable::V2::TimestampRange.new
|
233
|
+
range_grpc = Google::Cloud::Bigtable::V2::TimestampRange.new
|
234
234
|
range_grpc.start_timestamp_micros = from if from
|
235
235
|
range_grpc.end_timestamp_micros = to if to
|
236
236
|
@grpc.timestamp_range_filter = range_grpc
|
@@ -276,7 +276,7 @@ module Google
|
|
276
276
|
#
|
277
277
|
# Converts to a gRPC row filter instance.
|
278
278
|
#
|
279
|
-
# @return [Google::Bigtable::V2::RowFilter]
|
279
|
+
# @return [Google::Cloud::Bigtable::V2::RowFilter]
|
280
280
|
def to_grpc
|
281
281
|
@grpc
|
282
282
|
end
|