google-cloud-bigtable 0.6.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) 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 +1 -1
  12. data/lib/google/cloud/bigtable/admin/v2.rb +1 -1
  13. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +1 -1
  14. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +42 -21
  15. data/lib/google/cloud/bigtable/app_profile.rb +162 -96
  16. data/lib/google/cloud/bigtable/app_profile/job.rb +5 -8
  17. data/lib/google/cloud/bigtable/app_profile/list.rb +18 -12
  18. data/lib/google/cloud/bigtable/chunk_processor.rb +24 -36
  19. data/lib/google/cloud/bigtable/cluster.rb +45 -18
  20. data/lib/google/cloud/bigtable/cluster/job.rb +3 -7
  21. data/lib/google/cloud/bigtable/cluster/list.rb +22 -20
  22. data/lib/google/cloud/bigtable/column_family.rb +18 -231
  23. data/lib/google/cloud/bigtable/column_family_map.rb +426 -0
  24. data/lib/google/cloud/bigtable/column_range.rb +15 -7
  25. data/lib/google/cloud/bigtable/convert.rb +12 -4
  26. data/lib/google/cloud/bigtable/errors.rb +4 -1
  27. data/lib/google/cloud/bigtable/gc_rule.rb +188 -69
  28. data/lib/google/cloud/bigtable/instance.rb +209 -189
  29. data/lib/google/cloud/bigtable/instance/cluster_map.rb +17 -13
  30. data/lib/google/cloud/bigtable/instance/job.rb +6 -5
  31. data/lib/google/cloud/bigtable/instance/list.rb +18 -13
  32. data/lib/google/cloud/bigtable/longrunning_job.rb +7 -1
  33. data/lib/google/cloud/bigtable/mutation_entry.rb +36 -39
  34. data/lib/google/cloud/bigtable/mutation_operations.rb +90 -73
  35. data/lib/google/cloud/bigtable/policy.rb +9 -5
  36. data/lib/google/cloud/bigtable/project.rb +87 -196
  37. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +15 -10
  38. data/lib/google/cloud/bigtable/read_operations.rb +42 -59
  39. data/lib/google/cloud/bigtable/routing_policy.rb +172 -0
  40. data/lib/google/cloud/bigtable/row.rb +32 -21
  41. data/lib/google/cloud/bigtable/row_filter.rb +80 -35
  42. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +119 -68
  43. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +8 -2
  44. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +117 -66
  45. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +24 -9
  46. data/lib/google/cloud/bigtable/row_range.rb +5 -0
  47. data/lib/google/cloud/bigtable/rows_mutator.rb +14 -21
  48. data/lib/google/cloud/bigtable/rows_reader.rb +23 -18
  49. data/lib/google/cloud/bigtable/sample_row_key.rb +6 -3
  50. data/lib/google/cloud/bigtable/service.rb +200 -253
  51. data/lib/google/cloud/bigtable/status.rb +76 -0
  52. data/lib/google/cloud/bigtable/table.rb +158 -262
  53. data/lib/google/cloud/bigtable/table/cluster_state.rb +17 -6
  54. data/lib/google/cloud/bigtable/table/list.rb +16 -9
  55. data/lib/google/cloud/bigtable/v2.rb +1 -1
  56. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +12 -12
  57. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +16 -13
  58. data/lib/google/cloud/bigtable/value_range.rb +19 -13
  59. data/lib/google/cloud/bigtable/version.rb +1 -1
  60. metadata +67 -25
  61. data/lib/google/cloud/bigtable/table/column_family_map.rb +0 -70
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigtable
19
- VERSION = "0.6.1".freeze
19
+ VERSION = "1.0.1".freeze
20
20
  end
21
21
  end
22
22
  end
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.6.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-05 00:00:00.000000000 Z
11
+ date: 2020-01-15 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.7'
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.7'
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-cloud-core
96
+ name: google-style
43
97
  requirement: !ruby/object:Gem::Requirement
44
98
  requirements:
45
99
  - - "~>"
46
100
  - !ruby/object:Gem::Version
47
- version: '1.1'
48
- type: :runtime
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: '1.1'
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.0.0
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.4
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