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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -26
- data/CHANGELOG.md +85 -0
- data/CONTRIBUTING.md +1 -1
- data/OVERVIEW.md +388 -19
- data/lib/google-cloud-bigtable.rb +19 -22
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +1 -1
- data/lib/google/bigtable/v2/bigtable_pb.rb +3 -0
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +1 -1
- data/lib/google/cloud/bigtable.rb +11 -17
- data/lib/google/cloud/bigtable/admin.rb +2 -2
- data/lib/google/cloud/bigtable/admin/v2.rb +2 -2
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +2 -2
- data/lib/google/cloud/bigtable/admin/v2/credentials.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +7 -6
- data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +2 -2
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +7 -55
- data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +1 -1
- data/lib/google/cloud/bigtable/app_profile.rb +162 -96
- data/lib/google/cloud/bigtable/app_profile/job.rb +5 -8
- data/lib/google/cloud/bigtable/app_profile/list.rb +18 -12
- data/lib/google/cloud/bigtable/chunk_processor.rb +24 -36
- data/lib/google/cloud/bigtable/cluster.rb +45 -18
- data/lib/google/cloud/bigtable/cluster/job.rb +3 -7
- data/lib/google/cloud/bigtable/cluster/list.rb +22 -20
- data/lib/google/cloud/bigtable/column_family.rb +18 -231
- data/lib/google/cloud/bigtable/column_family_map.rb +426 -0
- data/lib/google/cloud/bigtable/column_range.rb +15 -7
- data/lib/google/cloud/bigtable/convert.rb +12 -4
- data/lib/google/cloud/bigtable/errors.rb +4 -1
- data/lib/google/cloud/bigtable/gc_rule.rb +188 -69
- data/lib/google/cloud/bigtable/instance.rb +209 -189
- data/lib/google/cloud/bigtable/instance/cluster_map.rb +17 -13
- data/lib/google/cloud/bigtable/instance/job.rb +6 -5
- data/lib/google/cloud/bigtable/instance/list.rb +18 -13
- data/lib/google/cloud/bigtable/longrunning_job.rb +7 -1
- data/lib/google/cloud/bigtable/mutation_entry.rb +36 -39
- data/lib/google/cloud/bigtable/mutation_operations.rb +90 -73
- data/lib/google/cloud/bigtable/policy.rb +9 -5
- data/lib/google/cloud/bigtable/project.rb +87 -196
- data/lib/google/cloud/bigtable/read_modify_write_rule.rb +15 -10
- data/lib/google/cloud/bigtable/read_operations.rb +42 -59
- data/lib/google/cloud/bigtable/routing_policy.rb +172 -0
- data/lib/google/cloud/bigtable/row.rb +32 -21
- data/lib/google/cloud/bigtable/row_filter.rb +80 -35
- data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +119 -68
- data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +8 -2
- data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +117 -66
- data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +24 -9
- data/lib/google/cloud/bigtable/row_range.rb +5 -0
- data/lib/google/cloud/bigtable/rows_mutator.rb +14 -21
- data/lib/google/cloud/bigtable/rows_reader.rb +23 -18
- data/lib/google/cloud/bigtable/sample_row_key.rb +6 -3
- data/lib/google/cloud/bigtable/service.rb +200 -253
- data/lib/google/cloud/bigtable/status.rb +76 -0
- data/lib/google/cloud/bigtable/table.rb +158 -262
- data/lib/google/cloud/bigtable/table/cluster_state.rb +17 -6
- data/lib/google/cloud/bigtable/table/list.rb +16 -9
- data/lib/google/cloud/bigtable/v2.rb +2 -2
- data/lib/google/cloud/bigtable/v2/bigtable_client.rb +13 -13
- data/lib/google/cloud/bigtable/v2/credentials.rb +1 -1
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +17 -14
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +1 -1
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +1 -1
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +1 -1
- data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +7 -55
- data/lib/google/cloud/bigtable/value_range.rb +19 -13
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +67 -25
- data/lib/google/cloud/bigtable/table/column_family_map.rb +0 -70
@@ -18,6 +18,7 @@
|
|
18
18
|
module Google
|
19
19
|
module Cloud
|
20
20
|
module Bigtable
|
21
|
+
##
|
21
22
|
# # ValueRange
|
22
23
|
#
|
23
24
|
# Specifies a contiguous range of string values.
|
@@ -33,7 +34,7 @@ module Google
|
|
33
34
|
# bigtable = Google::Cloud::Bigtable.new
|
34
35
|
# table = bigtable.table("my-instance", "my-table")
|
35
36
|
#
|
36
|
-
# # Range that includes all row keys including "value-001" to "value-005" excluding
|
37
|
+
# # Range that includes all row keys including "value-001" to "value-005" excluding.
|
37
38
|
# table.new_value_range.from("value-001").to("value-005")
|
38
39
|
#
|
39
40
|
# # Range that includes all row keys including "value-001" up to inclusive "value-010".
|
@@ -45,13 +46,13 @@ module Google
|
|
45
46
|
# # Range that includes all row keys exclusive "value-001" up until end of the row keys.
|
46
47
|
# table.new_value_range.from("value-001", inclusive: false)
|
47
48
|
#
|
48
|
-
# # Range with unbounded from and the exclusive end "value-100"
|
49
|
+
# # Range with unbounded from and the exclusive end "value-100".
|
49
50
|
# table.new_value_range.to("value-100")
|
50
51
|
#
|
51
|
-
# # Range that includes all row keys including from and end row keys "value-001", "value-100"
|
52
|
+
# # Range that includes all row keys including from and end row keys "value-001", "value-100".
|
52
53
|
# table.new_value_range.between("value-001", "value-100")
|
53
54
|
#
|
54
|
-
# # Range that includes all row keys including "value-001" up until "value-100"
|
55
|
+
# # Range that includes all row keys including "value-001" up until "value-100".
|
55
56
|
# table.new_value_range.of("value-001", "value-100")
|
56
57
|
#
|
57
58
|
class ValueRange
|
@@ -61,11 +62,12 @@ module Google
|
|
61
62
|
@grpc = Google::Bigtable::V2::ValueRange.new
|
62
63
|
end
|
63
64
|
|
65
|
+
##
|
64
66
|
# Sets the row range with the lower bound.
|
65
67
|
#
|
66
|
-
# @param value [String] value. Required
|
67
|
-
# @param inclusive [
|
68
|
-
# Default
|
68
|
+
# @param value [String] The value. Required.
|
69
|
+
# @param inclusive [Boolean] Whether the value is an inclusive or
|
70
|
+
# exclusive lower bound. Default is `true`, an inclusive lower bound.
|
69
71
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
70
72
|
#
|
71
73
|
# @example Inclusive lower bound.
|
@@ -93,11 +95,12 @@ module Google
|
|
93
95
|
self
|
94
96
|
end
|
95
97
|
|
98
|
+
##
|
96
99
|
# Sets the value range with upper bound.
|
97
100
|
#
|
98
101
|
# @param value [String] value. Required
|
99
|
-
# @param inclusive [
|
100
|
-
# Default
|
102
|
+
# @param inclusive [Boolean] Whether the value is an inclusive or
|
103
|
+
# exclusive lower bound. Default is `false`, an exclusive lower bound.
|
101
104
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
102
105
|
#
|
103
106
|
# @example Inclusive upper bound.
|
@@ -125,12 +128,13 @@ module Google
|
|
125
128
|
self
|
126
129
|
end
|
127
130
|
|
128
|
-
|
131
|
+
##
|
132
|
+
# Sets the value range with inclusive lower and upper bounds.
|
129
133
|
#
|
130
134
|
# @param from_value [String] Inclusive from value. Required
|
131
|
-
# @param to_value [String] Inclusive
|
135
|
+
# @param to_value [String] Inclusive to value. Required
|
132
136
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
133
|
-
# Range with inclusive from and
|
137
|
+
# Range with inclusive from and to values.
|
134
138
|
#
|
135
139
|
# @example
|
136
140
|
# require "google/cloud/bigtable"
|
@@ -144,11 +148,13 @@ module Google
|
|
144
148
|
from(from_value).to(to_value, inclusive: true)
|
145
149
|
end
|
146
150
|
|
147
|
-
|
151
|
+
##
|
152
|
+
# Set value range with an inclusive lower bound and an exclusive upper bound.
|
148
153
|
#
|
149
154
|
# @param from_value [String] Inclusive from value
|
150
155
|
# @param to_value [String] Exclusive to value
|
151
156
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
157
|
+
# Range with an inclusive from value and an exclusive to value.
|
152
158
|
#
|
153
159
|
# @example
|
154
160
|
# require "google/cloud/bigtable"
|
metadata
CHANGED
@@ -1,29 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigtable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-cloud-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.1'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: google-gax
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
33
|
+
version: '1.8'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
40
|
+
version: '1.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: googleapis-common-protos
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.3.9
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '2.0'
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 1.3.9
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '2.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: googleapis-common-protos-types
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 1.0.4
|
68
|
+
- - "<"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '2.0'
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.0.4
|
78
|
+
- - "<"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '2.0'
|
27
81
|
- !ruby/object:Gem::Dependency
|
28
82
|
name: grpc-google-iam-v1
|
29
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,19 +93,19 @@ dependencies:
|
|
39
93
|
- !ruby/object:Gem::Version
|
40
94
|
version: 0.6.9
|
41
95
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: google-
|
96
|
+
name: google-style
|
43
97
|
requirement: !ruby/object:Gem::Requirement
|
44
98
|
requirements:
|
45
99
|
- - "~>"
|
46
100
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
type: :
|
101
|
+
version: 1.24.0
|
102
|
+
type: :development
|
49
103
|
prerelease: false
|
50
104
|
version_requirements: !ruby/object:Gem::Requirement
|
51
105
|
requirements:
|
52
106
|
- - "~>"
|
53
107
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
108
|
+
version: 1.24.0
|
55
109
|
- !ruby/object:Gem::Dependency
|
56
110
|
name: minitest
|
57
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +162,6 @@ dependencies:
|
|
108
162
|
- - "~>"
|
109
163
|
- !ruby/object:Gem::Version
|
110
164
|
version: '3.0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.64.0
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.64.0
|
125
165
|
- !ruby/object:Gem::Dependency
|
126
166
|
name: simplecov
|
127
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,6 +263,7 @@ files:
|
|
223
263
|
- lib/google/cloud/bigtable/cluster/job.rb
|
224
264
|
- lib/google/cloud/bigtable/cluster/list.rb
|
225
265
|
- lib/google/cloud/bigtable/column_family.rb
|
266
|
+
- lib/google/cloud/bigtable/column_family_map.rb
|
226
267
|
- lib/google/cloud/bigtable/column_range.rb
|
227
268
|
- lib/google/cloud/bigtable/convert.rb
|
228
269
|
- lib/google/cloud/bigtable/credentials.rb
|
@@ -239,6 +280,7 @@ files:
|
|
239
280
|
- lib/google/cloud/bigtable/project.rb
|
240
281
|
- lib/google/cloud/bigtable/read_modify_write_rule.rb
|
241
282
|
- lib/google/cloud/bigtable/read_operations.rb
|
283
|
+
- lib/google/cloud/bigtable/routing_policy.rb
|
242
284
|
- lib/google/cloud/bigtable/row.rb
|
243
285
|
- lib/google/cloud/bigtable/row_filter.rb
|
244
286
|
- lib/google/cloud/bigtable/row_filter/chain_filter.rb
|
@@ -250,9 +292,9 @@ files:
|
|
250
292
|
- lib/google/cloud/bigtable/rows_reader.rb
|
251
293
|
- lib/google/cloud/bigtable/sample_row_key.rb
|
252
294
|
- lib/google/cloud/bigtable/service.rb
|
295
|
+
- lib/google/cloud/bigtable/status.rb
|
253
296
|
- lib/google/cloud/bigtable/table.rb
|
254
297
|
- lib/google/cloud/bigtable/table/cluster_state.rb
|
255
|
-
- lib/google/cloud/bigtable/table/column_family_map.rb
|
256
298
|
- lib/google/cloud/bigtable/table/list.rb
|
257
299
|
- lib/google/cloud/bigtable/v2.rb
|
258
300
|
- lib/google/cloud/bigtable/v2/bigtable_client.rb
|
@@ -277,14 +319,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
277
319
|
requirements:
|
278
320
|
- - ">="
|
279
321
|
- !ruby/object:Gem::Version
|
280
|
-
version: 2.
|
322
|
+
version: '2.4'
|
281
323
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
282
324
|
requirements:
|
283
325
|
- - ">="
|
284
326
|
- !ruby/object:Gem::Version
|
285
327
|
version: '0'
|
286
328
|
requirements: []
|
287
|
-
rubygems_version: 3.0.
|
329
|
+
rubygems_version: 3.0.6
|
288
330
|
signing_key:
|
289
331
|
specification_version: 4
|
290
332
|
summary: API Client library for Cloud Bigtable API
|
@@ -1,70 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2018 Google LLC
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
|
18
|
-
module Google
|
19
|
-
module Cloud
|
20
|
-
module Bigtable
|
21
|
-
class Table
|
22
|
-
# Table::ColumnFamilyMap is a hash accepting string `ColumnFamily` names as keys and `GcRule` objects as values.
|
23
|
-
# It is used to create an instance.
|
24
|
-
# @example Add column family with name and garbage collection rule
|
25
|
-
#
|
26
|
-
# column_families = Google::Cloud::Bigtable::Instance::ColumnFamilyMap.new
|
27
|
-
#
|
28
|
-
# column_families.add('cf1', Google::Cloud::Bigtable::GcRule.max_versions(3))
|
29
|
-
#
|
30
|
-
class ColumnFamilyMap < DelegateClass(::Hash)
|
31
|
-
# @private
|
32
|
-
# Create a new ColumnFamilyMap.
|
33
|
-
def initialize value = {}
|
34
|
-
super(value)
|
35
|
-
end
|
36
|
-
|
37
|
-
# Adds a column family.
|
38
|
-
#
|
39
|
-
# @param name [String] Column family name
|
40
|
-
# @param gc_rule [Google::Cloud::Bigtable::GcRule] The garbage
|
41
|
-
# collection rule to be used for the column family. Optional. The
|
42
|
-
# service default value will be used when not specified.
|
43
|
-
# @example
|
44
|
-
# column_families = Google::Cloud::Bigtable::Instance::ColumnFamilyMap.new
|
45
|
-
#
|
46
|
-
# gc_rule_1 = Google::Cloud::Bigtable::GcRule.max_versions(3)
|
47
|
-
# column_families.add('cf1', gc_rule_1)
|
48
|
-
#
|
49
|
-
# gc_rule = Google::Cloud::Bigtable::GcRule.max_age(1800)
|
50
|
-
# column_families.add('cf2', gc_rule)
|
51
|
-
|
52
|
-
def add name, gc_rule = nil
|
53
|
-
cf = Google::Bigtable::Admin::V2::ColumnFamily.new
|
54
|
-
cf.gc_rule = gc_rule.to_grpc if gc_rule
|
55
|
-
self[name] = cf
|
56
|
-
end
|
57
|
-
|
58
|
-
# Removes a column family from the map.
|
59
|
-
#
|
60
|
-
# @param name [String] Column family name
|
61
|
-
# @return [Google::Bigtable::Admin::V2::ColumnFamily]
|
62
|
-
|
63
|
-
def remove name
|
64
|
-
delete(name)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|