google-cloud-bigtable 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2c1fb609f8db01cde0db582a3b9e0ca9449d799b0ac1f846f7228588cf96aae
4
- data.tar.gz: 24f397071cd64bfb49d8b7291484220c12fcc310f947961ebe17a79035fc2821
3
+ metadata.gz: 75dda3fa2c76316a47a331878fc5b634c5bd5f471ec3c89ece5db2e8ce60c388
4
+ data.tar.gz: dfceb7dabcb83f54c3f2bf1e30d85e3ddf13e6f490260e1dd966e52c2675b05b
5
5
  SHA512:
6
- metadata.gz: 6bec388faa026a1020991fbb6f1fb183879582b67625ada410e4fbdcc940322bde9e8d0d557a6d880c023e036dee8980b1f40414fa02dbd2c7c7858aef467219
7
- data.tar.gz: a9a06cdcc075b1aa94ac74de239bf45e3c8263d77676dc3723bdc899d46ea506c49588e52f9e23f394ff644a8104df70f159313dc8e1a162fd52494e73c785ad
6
+ metadata.gz: 88626715dc50760d929db8819cdf6333a7faffe67153222a81dcd2d941ced9cc471912f33ed74fa04a0c629f4d351386f9ae6ca098f4d083eb24100b5120b82d
7
+ data.tar.gz: 3c5c577ae655453c155fab31735312933c834984b2d2091a7950fddbec9532f71b8d395d41a3c768d4ed6bec016f07f5384c11ac547075e1cfb67ed0abaf7b51
@@ -1,5 +1,10 @@
1
1
  # Release History
2
2
 
3
+ ### 0.5.0 / 2019-08-05
4
+
5
+ * Accept nil gc_rule arguments for column_family create/update
6
+ * Update documentation
7
+
3
8
  ### 0.4.3 / 2019-07-12
4
9
 
5
10
  * Update #to_hash to #to_h for compatibility with google-protobuf >= 3.9.0
data/LOGGING.md CHANGED
@@ -5,7 +5,7 @@ To enable logging for this library, set the logger for the underlying
5
5
  that you set may be a Ruby stdlib
6
6
  [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as
7
7
  shown below, or a
8
- [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger)
8
+ [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
9
9
  that will write logs to [Stackdriver
10
10
  Logging](https://cloud.google.com/logging/). See
11
11
  [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
@@ -14,7 +14,7 @@ steps:
14
14
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
15
15
  2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
16
16
  3. [Enable the Cloud Bigtable API.](https://console.cloud.google.com/apis/library/bigtable.googleapis.com)
17
- 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/docs/google-cloud/latest/file.AUTHENTICATION)
17
+ 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigtable/latest/file.AUTHENTICATION.html)
18
18
 
19
19
  ### Next Steps
20
20
  - Read the [Cloud Bigtable API Product documentation][Product Documentation]
@@ -35,7 +35,7 @@ module Google
35
35
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
36
36
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
37
37
  # 3. [Enable the Cloud Bigtable Admin API.](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com)
38
- # 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
38
+ # 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigtable/latest/file.AUTHENTICATION.html)
39
39
  #
40
40
  # ### Installation
41
41
  # ```
@@ -54,7 +54,7 @@ module Google
54
54
  #
55
55
  # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
56
56
  # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
57
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
57
+ # or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
58
58
  # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
59
59
  # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
60
60
  #
@@ -38,7 +38,7 @@ module Google
38
38
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
39
39
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
40
40
  # 3. [Enable the Cloud Bigtable Admin API.](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com)
41
- # 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
41
+ # 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigtable/latest/file.AUTHENTICATION.html)
42
42
  #
43
43
  # ### Installation
44
44
  # ```
@@ -57,7 +57,7 @@ module Google
57
57
  #
58
58
  # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
59
59
  # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
60
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
60
+ # or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
61
61
  # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
62
62
  # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
63
63
  #
@@ -6,116 +6,132 @@
6
6
  "DEADLINE_EXCEEDED",
7
7
  "UNAVAILABLE"
8
8
  ],
9
- "non_idempotent": [
10
- "UNAVAILABLE"
11
- ]
9
+ "non_idempotent": []
12
10
  },
13
11
  "retry_params": {
14
- "default": {
15
- "initial_retry_delay_millis": 5,
12
+ "idempotent_params": {
13
+ "initial_retry_delay_millis": 1000,
16
14
  "retry_delay_multiplier": 2.0,
17
15
  "max_retry_delay_millis": 60000,
18
16
  "initial_rpc_timeout_millis": 60000,
19
17
  "rpc_timeout_multiplier": 1.0,
20
18
  "max_rpc_timeout_millis": 60000,
21
19
  "total_timeout_millis": 600000
20
+ },
21
+ "non_idempotent_params": {
22
+ "initial_retry_delay_millis": 0,
23
+ "retry_delay_multiplier": 1.0,
24
+ "max_retry_delay_millis": 0,
25
+ "initial_rpc_timeout_millis": 60000,
26
+ "rpc_timeout_multiplier": 1.0,
27
+ "max_rpc_timeout_millis": 60000,
28
+ "total_timeout_millis": 60000
29
+ },
30
+ "non_idempotent_heavy_params": {
31
+ "initial_retry_delay_millis": 0,
32
+ "retry_delay_multiplier": 1.0,
33
+ "max_retry_delay_millis": 0,
34
+ "initial_rpc_timeout_millis": 300000,
35
+ "rpc_timeout_multiplier": 1.0,
36
+ "max_rpc_timeout_millis": 300000,
37
+ "total_timeout_millis": 300000
22
38
  }
23
39
  },
24
40
  "methods": {
25
41
  "CreateInstance": {
26
42
  "timeout_millis": 60000,
27
43
  "retry_codes_name": "non_idempotent",
28
- "retry_params_name": "default"
44
+ "retry_params_name": "non_idempotent_heavy_params"
29
45
  },
30
46
  "GetInstance": {
31
47
  "timeout_millis": 60000,
32
48
  "retry_codes_name": "idempotent",
33
- "retry_params_name": "default"
49
+ "retry_params_name": "idempotent_params"
34
50
  },
35
51
  "ListInstances": {
36
52
  "timeout_millis": 60000,
37
53
  "retry_codes_name": "idempotent",
38
- "retry_params_name": "default"
54
+ "retry_params_name": "idempotent_params"
39
55
  },
40
56
  "UpdateInstance": {
41
57
  "timeout_millis": 60000,
42
58
  "retry_codes_name": "idempotent",
43
- "retry_params_name": "default"
59
+ "retry_params_name": "idempotent_params"
44
60
  },
45
61
  "PartialUpdateInstance": {
46
62
  "timeout_millis": 60000,
47
63
  "retry_codes_name": "idempotent",
48
- "retry_params_name": "default"
64
+ "retry_params_name": "idempotent_params"
49
65
  },
50
66
  "DeleteInstance": {
51
67
  "timeout_millis": 60000,
52
68
  "retry_codes_name": "non_idempotent",
53
- "retry_params_name": "default"
69
+ "retry_params_name": "non_idempotent_params"
54
70
  },
55
71
  "CreateCluster": {
56
72
  "timeout_millis": 60000,
57
73
  "retry_codes_name": "non_idempotent",
58
- "retry_params_name": "default"
74
+ "retry_params_name": "non_idempotent_params"
59
75
  },
60
76
  "GetCluster": {
61
77
  "timeout_millis": 60000,
62
78
  "retry_codes_name": "idempotent",
63
- "retry_params_name": "default"
79
+ "retry_params_name": "idempotent_params"
64
80
  },
65
81
  "ListClusters": {
66
82
  "timeout_millis": 60000,
67
83
  "retry_codes_name": "idempotent",
68
- "retry_params_name": "default"
84
+ "retry_params_name": "idempotent_params"
69
85
  },
70
86
  "UpdateCluster": {
71
87
  "timeout_millis": 60000,
72
88
  "retry_codes_name": "idempotent",
73
- "retry_params_name": "default"
89
+ "retry_params_name": "idempotent_params"
74
90
  },
75
91
  "DeleteCluster": {
76
92
  "timeout_millis": 60000,
77
93
  "retry_codes_name": "non_idempotent",
78
- "retry_params_name": "default"
94
+ "retry_params_name": "non_idempotent_params"
79
95
  },
80
96
  "CreateAppProfile": {
81
97
  "timeout_millis": 60000,
82
98
  "retry_codes_name": "non_idempotent",
83
- "retry_params_name": "default"
99
+ "retry_params_name": "non_idempotent_params"
84
100
  },
85
101
  "GetAppProfile": {
86
102
  "timeout_millis": 60000,
87
103
  "retry_codes_name": "idempotent",
88
- "retry_params_name": "default"
104
+ "retry_params_name": "idempotent_params"
89
105
  },
90
106
  "ListAppProfiles": {
91
107
  "timeout_millis": 60000,
92
108
  "retry_codes_name": "idempotent",
93
- "retry_params_name": "default"
109
+ "retry_params_name": "idempotent_params"
94
110
  },
95
111
  "UpdateAppProfile": {
96
112
  "timeout_millis": 60000,
97
113
  "retry_codes_name": "idempotent",
98
- "retry_params_name": "default"
114
+ "retry_params_name": "idempotent_params"
99
115
  },
100
116
  "DeleteAppProfile": {
101
117
  "timeout_millis": 60000,
102
118
  "retry_codes_name": "non_idempotent",
103
- "retry_params_name": "default"
119
+ "retry_params_name": "non_idempotent_params"
104
120
  },
105
121
  "GetIamPolicy": {
106
122
  "timeout_millis": 60000,
107
123
  "retry_codes_name": "idempotent",
108
- "retry_params_name": "default"
124
+ "retry_params_name": "idempotent_params"
109
125
  },
110
126
  "SetIamPolicy": {
111
127
  "timeout_millis": 60000,
112
128
  "retry_codes_name": "non_idempotent",
113
- "retry_params_name": "default"
129
+ "retry_params_name": "non_idempotent_params"
114
130
  },
115
131
  "TestIamPermissions": {
116
132
  "timeout_millis": 60000,
117
133
  "retry_codes_name": "idempotent",
118
- "retry_params_name": "default"
134
+ "retry_params_name": "idempotent_params"
119
135
  }
120
136
  }
121
137
  }
@@ -9,81 +9,108 @@
9
9
  "non_idempotent": []
10
10
  },
11
11
  "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
12
+ "idempotent_params": {
13
+ "initial_retry_delay_millis": 1000,
14
+ "retry_delay_multiplier": 2.0,
15
15
  "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 20000,
16
+ "initial_rpc_timeout_millis": 60000,
17
17
  "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 20000,
18
+ "max_rpc_timeout_millis": 60000,
19
19
  "total_timeout_millis": 600000
20
+ },
21
+ "non_idempotent_params": {
22
+ "initial_retry_delay_millis": 0,
23
+ "retry_delay_multiplier": 1.0,
24
+ "max_retry_delay_millis": 0,
25
+ "initial_rpc_timeout_millis": 60000,
26
+ "rpc_timeout_multiplier": 1.0,
27
+ "max_rpc_timeout_millis": 60000,
28
+ "total_timeout_millis": 60000
29
+ },
30
+ "non_idempotent_heavy_params": {
31
+ "initial_retry_delay_millis": 0,
32
+ "retry_delay_multiplier": 1.0,
33
+ "max_retry_delay_millis": 0,
34
+ "initial_rpc_timeout_millis": 300000,
35
+ "rpc_timeout_multiplier": 1.0,
36
+ "max_rpc_timeout_millis": 300000,
37
+ "total_timeout_millis": 300000
38
+ },
39
+ "drop_row_range_params": {
40
+ "initial_retry_delay_millis": 0,
41
+ "retry_delay_multiplier": 1.0,
42
+ "max_retry_delay_millis": 0,
43
+ "initial_rpc_timeout_millis": 3600000,
44
+ "rpc_timeout_multiplier": 1.0,
45
+ "max_rpc_timeout_millis": 3600000,
46
+ "total_timeout_millis": 3600000
20
47
  }
21
48
  },
22
49
  "methods": {
23
50
  "CreateTable": {
24
51
  "timeout_millis": 130000,
25
52
  "retry_codes_name": "non_idempotent",
26
- "retry_params_name": "default"
53
+ "retry_params_name": "non_idempotent_heavy_params"
27
54
  },
28
55
  "CreateTableFromSnapshot": {
29
56
  "timeout_millis": 60000,
30
57
  "retry_codes_name": "non_idempotent",
31
- "retry_params_name": "default"
58
+ "retry_params_name": "non_idempotent_params"
32
59
  },
33
60
  "ListTables": {
34
61
  "timeout_millis": 60000,
35
62
  "retry_codes_name": "idempotent",
36
- "retry_params_name": "default"
63
+ "retry_params_name": "idempotent_params"
37
64
  },
38
65
  "GetTable": {
39
66
  "timeout_millis": 60000,
40
67
  "retry_codes_name": "idempotent",
41
- "retry_params_name": "default"
68
+ "retry_params_name": "idempotent_params"
42
69
  },
43
70
  "DeleteTable": {
44
71
  "timeout_millis": 60000,
45
72
  "retry_codes_name": "non_idempotent",
46
- "retry_params_name": "default"
73
+ "retry_params_name": "non_idempotent_params"
47
74
  },
48
75
  "ModifyColumnFamilies": {
49
76
  "timeout_millis": 60000,
50
77
  "retry_codes_name": "non_idempotent",
51
- "retry_params_name": "default"
78
+ "retry_params_name": "non_idempotent_heavy_params"
52
79
  },
53
80
  "DropRowRange": {
54
81
  "timeout_millis": 900000,
55
82
  "retry_codes_name": "non_idempotent",
56
- "retry_params_name": "default"
83
+ "retry_params_name": "drop_row_range_params"
57
84
  },
58
85
  "GenerateConsistencyToken": {
59
86
  "timeout_millis": 60000,
60
87
  "retry_codes_name": "idempotent",
61
- "retry_params_name": "default"
88
+ "retry_params_name": "idempotent_params"
62
89
  },
63
90
  "CheckConsistency": {
64
91
  "timeout_millis": 60000,
65
92
  "retry_codes_name": "idempotent",
66
- "retry_params_name": "default"
93
+ "retry_params_name": "idempotent_params"
67
94
  },
68
95
  "SnapshotTable": {
69
96
  "timeout_millis": 60000,
70
97
  "retry_codes_name": "non_idempotent",
71
- "retry_params_name": "default"
98
+ "retry_params_name": "non_idempotent_params"
72
99
  },
73
100
  "GetSnapshot": {
74
101
  "timeout_millis": 60000,
75
102
  "retry_codes_name": "idempotent",
76
- "retry_params_name": "default"
103
+ "retry_params_name": "idempotent_params"
77
104
  },
78
105
  "ListSnapshots": {
79
106
  "timeout_millis": 60000,
80
107
  "retry_codes_name": "idempotent",
81
- "retry_params_name": "default"
108
+ "retry_params_name": "idempotent_params"
82
109
  },
83
110
  "DeleteSnapshot": {
84
111
  "timeout_millis": 60000,
85
112
  "retry_codes_name": "non_idempotent",
86
- "retry_params_name": "default"
113
+ "retry_params_name": "non_idempotent_params"
87
114
  }
88
115
  }
89
116
  }
@@ -34,7 +34,7 @@ module Google
34
34
  #
35
35
  # # Create
36
36
  # gc_rule = Google::Cloud::Bigtable::GcRule.max_versions(5)
37
- # column_family = table.column_families.create("cf1", gc_rule: gc_rule)
37
+ # column_family = table.column_families.add("cf1", gc_rule)
38
38
  #
39
39
  # # Update
40
40
  # column_family = table.column_families.find_by_name("cf2")
@@ -74,10 +74,11 @@ module Google
74
74
 
75
75
  # Set Column Family garbage collection rules
76
76
  #
77
- # @param rule [Google::Cloud::Bigtable::GcRule]
77
+ # @param rule [Google::Cloud::Bigtable::GcRule, nil] the new rule, or
78
+ # `nil` for the service default value.
78
79
  #
79
80
  def gc_rule= rule
80
- @grpc.gc_rule = rule.to_grpc
81
+ @grpc.gc_rule = rule.nil? ? nil : rule.to_grpc
81
82
  end
82
83
 
83
84
  # Get garbage collection rule
@@ -151,7 +152,9 @@ module Google
151
152
  # Create gPRC instance to create column family modification
152
153
  #
153
154
  # @param name [String] Column family name
154
- # @param gc_rule [Google::Cloud::Bigtable::GcRule] GC Rule
155
+ # @param gc_rule [Google::Cloud::Bigtable::GcRule] The garbage
156
+ # collection rule to be used for the column family. Optional. The
157
+ # service default value will be used when not specified.
155
158
  # @return [Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification]
156
159
  #
157
160
  # @example
@@ -168,7 +171,9 @@ module Google
168
171
  # Create update column family modification gPRC instance
169
172
  #
170
173
  # @param name [String] Column family name
171
- # @param gc_rule [Google::Cloud::Bigtable::GcRule] GC Rule
174
+ # @param gc_rule [Google::Cloud::Bigtable::GcRule] The garbage
175
+ # collection rule to be used for the column family. Optional. The
176
+ # service default value will be used when not specified.
172
177
  # @return [Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification]
173
178
  #
174
179
  # @example
@@ -227,8 +232,9 @@ module Google
227
232
  # @param type [Symbol] Type of modification.
228
233
  # Valid values are `:create`, `:update`, `drop`
229
234
  # @param family_name [String] Column family name
230
- # @param gc_rule [Google::Cloud::Bigtable::GcRule]
231
- # Required for only create and update modification type.
235
+ # @param gc_rule [Google::Cloud::Bigtable::GcRule] The garbage
236
+ # collection rule to be used for the column family. Optional. The
237
+ # service default value will be used when not specified.
232
238
  # @return [Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification]
233
239
  #
234
240
  def self.column_modification_grpc type, family_name, gc_rule = nil
@@ -237,9 +243,9 @@ module Google
237
243
  attrs[type] = if type == :drop
238
244
  true
239
245
  else
240
- Google::Bigtable::Admin::V2::ColumnFamily.new(
241
- gc_rule: gc_rule.to_grpc
242
- )
246
+ cf = Google::Bigtable::Admin::V2::ColumnFamily.new
247
+ cf.gc_rule = gc_rule.to_grpc if gc_rule
248
+ cf
243
249
  end
244
250
 
245
251
  Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest:: \
@@ -486,7 +486,7 @@ module Google
486
486
  # "cf-1",
487
487
  # "field-1",
488
488
  # "XYZ",
489
- # timestamp: Time.now.to_i * 1000 # Time stamp in milli seconds.
489
+ # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
490
490
  # ).delete_cells("cf2", "field02")
491
491
  #
492
492
  # table.mutate_row(entry)
@@ -31,13 +31,14 @@ module Google
31
31
  #
32
32
  # @example
33
33
  # entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
34
+ # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
34
35
  # entry.set_cell(
35
- # "cf1", "fiel01", "XYZ", timestamp: Time.now.to_i * 1000
36
+ # "cf1", "fiel01", "XYZ", timestamp: timestamp_micros
36
37
  # ).delete_cells(
37
38
  # "cf2",
38
39
  # "field02",
39
- # timestamp_from: (Time.now.to_i - 1800) * 1000,
40
- # timestamp_to: (Time.now.to_i * 1000)
40
+ # timestamp_from: timestamp_micros - 5000000,
41
+ # timestamp_to: timestamp_micros
41
42
  # ).delete_from_family("cf3").delete_from_row
42
43
  #
43
44
  # @example Using table
@@ -47,8 +48,9 @@ module Google
47
48
  # table = bigtable.table("my-instance", "my-table")
48
49
  #
49
50
  # entry = table.new_mutation_entry("user-1")
51
+ # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
50
52
  # entry.set_cell(
51
- # "cf1", "fiel01", "XYZ", timestamp: Time.now.to_i * 1000
53
+ # "cf1", "fiel01", "XYZ", timestamp: timestamp_micros
52
54
  # )
53
55
  #
54
56
  class MutationEntry
@@ -79,12 +81,15 @@ module Google
79
81
  # Can be any byte string, including an empty string.
80
82
  # @param value [String, Integer] Cell value data.
81
83
  # The value to be written into the specified cell.
82
- # @param timestamp [Time, Integer] Timestamp value.
84
+ # @param timestamp [Integer] Timestamp value in microseconds.
83
85
  # The timestamp of the cell into which new data should be written.
84
86
  # Use -1 for current Bigtable server time.
85
87
  # Otherwise, the client should set this value itself, noting that the
86
88
  # default value is a timestamp of zero if the field is left unspecified.
87
- # Values must match the granularity of the table (micros or millis, for example).
89
+ # Values are in microseconds but must match the granularity of the
90
+ # table. Therefore, if {Table#granularity} is `MILLIS` (the default),
91
+ # the given value must be a multiple of 1000 (millisecond
92
+ # granularity). For example: `1564257960168000`.
88
93
  # @return [MutationEntry] `self` object of entry for chaining.
89
94
  #
90
95
  # @example
@@ -97,7 +102,7 @@ module Google
97
102
  # "cf-1",
98
103
  # "field-1",
99
104
  # "XYZ",
100
- # timestamp: Time.now.to_i * 1000 # Time stamp in millis seconds.
105
+ # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
101
106
  # )
102
107
  #
103
108
  def set_cell family, qualifier, value, timestamp: nil
@@ -128,10 +133,18 @@ module Google
128
133
  # @param qualifier [String] Column qualifier name.
129
134
  # The qualifier of the column from which cells should be deleted.
130
135
  # 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.
136
+ # @param timestamp_from [Integer] Timestamp lower boundary in
137
+ # microseconds. Optional. Begins the range of timestamps from which
138
+ # cells should be deleted. Values are in microseconds but must match
139
+ # the granularity of the table. Therefore, if {Table#granularity} is
140
+ # `MILLIS` (the default), the given value must be a multiple of 1000
141
+ # (millisecond granularity). For example: `1564257960168000`.
142
+ # @param timestamp_to [Integer] Timestamp upper boundary in
143
+ # microseconds. Optional. Ends the range of timestamps from which
144
+ # cells should be deleted. Values are in microseconds but must match
145
+ # the granularity of the table. Therefore, if {Table#granularity} is
146
+ # `MILLIS` (the default), the given value must be a multiple of 1000
147
+ # (millisecond granularity). For example: `1564257960168000`.
135
148
  # @return [MutationEntry] `self` object of entry for chaining.
136
149
  #
137
150
  # @example Without timestamp range
@@ -140,18 +153,20 @@ module Google
140
153
  #
141
154
  # @example With timestamp range
142
155
  # entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
156
+ # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
143
157
  # entry.delete_cells(
144
158
  # "cf1",
145
159
  # "field-1",
146
- # timestamp_from: (Time.now.to_i - 1800) * 1000,
147
- # timestamp_to: (Time.now.to_i * 1000)
160
+ # timestamp_from: timestamp_micros - 5000000,
161
+ # timestamp_to: timestamp_micros
148
162
  # )
149
163
  # @example With timestamp range with lower boundary only
150
164
  # entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
165
+ # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
151
166
  # entry.delete_cells(
152
167
  # "cf1",
153
168
  # "field-1",
154
- # timestamp_from: (Time.now.to_i - 1800) * 1000
169
+ # timestamp_from: timestamp_micros - 5000000
155
170
  # )
156
171
  #
157
172
  def delete_cells \
@@ -67,7 +67,7 @@ module Google
67
67
  # "cf-1",
68
68
  # "field-1",
69
69
  # "XYZ",
70
- # timestamp: Time.now.to_i * 1000 # Time stamp in milli seconds.
70
+ # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
71
71
  # ).delete_cells("cf2", "field02")
72
72
  #
73
73
  # table.mutate_row(entry)
@@ -216,7 +216,7 @@ module Google
216
216
  # "cf-1",
217
217
  # "field-1",
218
218
  # "XYZ",
219
- # timestamp: Time.now.to_i * 1000 # Time stamp in micro seconds.
219
+ # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
220
220
  # ).delete_cells("cf2", "field02")
221
221
  #
222
222
  # otherwise_mutations = Google::Cloud::Bigtable::MutationEntry.new
@@ -360,7 +360,7 @@ module Google
360
360
  # "cf-1",
361
361
  # "field-1",
362
362
  # "XYZ",
363
- # timestamp: Time.now.to_i * 1000 # Timestamp in milliseconds.
363
+ # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
364
364
  # ).delete_cells("cf2", "field02")
365
365
  #
366
366
  # table.mutate_row(entry)
@@ -32,7 +32,7 @@ module Google
32
32
  #
33
33
  # @param family [String] Column family name
34
34
  # @param qualifier [String] Column cell qualifier name
35
- # @param timestamp [Integer] Timestamp in micro seconds
35
+ # @param timestamp [Integer] Timestamp in microseconds
36
36
  # @param value [String] Cell value
37
37
  # @param labels [Array<String>] List of label array
38
38
 
@@ -527,8 +527,9 @@ module Google
527
527
  #
528
528
  # @example
529
529
  #
530
- # from = (Time.now - 300).to_i * 1000
531
- # to = Time.now.to_f * 1000
530
+ # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
531
+ # from = timestamp_micros - 300000000
532
+ # to = timestamp_micros
532
533
  #
533
534
  # filter = Google::Cloud::Bigtable::RowFilter.timestamp_range(from: from, to: to)
534
535
  #
@@ -433,8 +433,9 @@ module Google
433
433
  #
434
434
  # @example
435
435
  #
436
- # from = (Time.now - 300).to_i * 1000 # 300 seconds ago
437
- # to = Time.now.to_f * 1000
436
+ # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
437
+ # from = timestamp_micros - 300000000
438
+ # to = timestamp_micros
438
439
  #
439
440
  # filter = Google::Cloud::Bigtable::RowFilter.chain.timestamp_range(from: from, to: to)
440
441
  #
@@ -465,8 +465,9 @@ module Google
465
465
  #
466
466
  # @example
467
467
  #
468
- # from = (Time.now - 300).to_f * 1000
469
- # to = Time.now.to_f * 1000
468
+ # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
469
+ # from = timestamp_micros - 300000000
470
+ # to = timestamp_micros
470
471
  #
471
472
  # filter = Google::Cloud::Bigtable::RowFilter.interleave.timestamp_range(from: from, to: to)
472
473
  #
@@ -238,8 +238,9 @@ module Google
238
238
  # update, or delete operations.
239
239
  #
240
240
  # @param name [String] Name of the column family
241
- # @param gc_rule [Google::Cloud::Bigtable::GcRule] Optional.
242
- # Required for create and update operations.
241
+ # @param gc_rule [Google::Cloud::Bigtable::GcRule] The garbage
242
+ # collection rule to be used for the column family. Optional. The
243
+ # service default value will be used when not specified.
243
244
  #
244
245
  # @example Create column family
245
246
  # require "google/cloud/bigtable"
@@ -37,7 +37,9 @@ module Google
37
37
  # Adds a column family.
38
38
  #
39
39
  # @param name [String] Column family name
40
- # @param gc_rule [Google::Bigtable::GcRule] GC Rule
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.
41
43
  # @example
42
44
  # column_families = Google::Cloud::Bigtable::Instance::ColumnFamilyMap.new
43
45
  #
@@ -47,10 +49,10 @@ module Google
47
49
  # gc_rule = Google::Cloud::Bigtable::GcRule.max_age(1800)
48
50
  # column_families.add('cf2', gc_rule)
49
51
 
50
- def add name, gc_rule
51
- self[name] = Google::Bigtable::Admin::V2::ColumnFamily.new(
52
- gc_rule: gc_rule.to_grpc
53
- )
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
54
56
  end
55
57
 
56
58
  # Removes a column family from the map.
@@ -35,7 +35,7 @@ module Google
35
35
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
36
36
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
37
37
  # 3. [Enable the Cloud Bigtable API.](https://console.cloud.google.com/apis/library/bigtable.googleapis.com)
38
- # 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
38
+ # 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigtable/latest/file.AUTHENTICATION.html)
39
39
  #
40
40
  # ### Installation
41
41
  # ```
@@ -54,7 +54,7 @@ module Google
54
54
  #
55
55
  # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
56
56
  # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
57
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
57
+ # or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
58
58
  # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
59
59
  # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
60
60
  #
@@ -9,55 +9,73 @@
9
9
  "non_idempotent": []
10
10
  },
11
11
  "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
12
+ "idempotent_params": {
13
+ "initial_retry_delay_millis": 10,
14
+ "retry_delay_multiplier": 2.0,
15
15
  "max_retry_delay_millis": 60000,
16
16
  "initial_rpc_timeout_millis": 20000,
17
17
  "rpc_timeout_multiplier": 1.0,
18
18
  "max_rpc_timeout_millis": 20000,
19
19
  "total_timeout_millis": 600000
20
20
  },
21
- "streaming": {
22
- "initial_retry_delay_millis": 100,
23
- "retry_delay_multiplier": 1.3,
21
+ "non_idempotent_params": {
22
+ "initial_retry_delay_millis": 10,
23
+ "retry_delay_multiplier": 2.0,
24
24
  "max_retry_delay_millis": 60000,
25
25
  "initial_rpc_timeout_millis": 20000,
26
26
  "rpc_timeout_multiplier": 1.0,
27
27
  "max_rpc_timeout_millis": 20000,
28
- "total_timeout_millis": 3600000
28
+ "total_timeout_millis": 20000
29
+ },
30
+ "read_rows_params": {
31
+ "initial_retry_delay_millis": 10,
32
+ "retry_delay_multiplier": 2.0,
33
+ "max_retry_delay_millis": 60000,
34
+ "initial_rpc_timeout_millis": 300000,
35
+ "rpc_timeout_multiplier": 1.0,
36
+ "max_rpc_timeout_millis": 300000,
37
+ "total_timeout_millis": 43200000
38
+ },
39
+ "mutate_rows_params": {
40
+ "initial_retry_delay_millis": 10,
41
+ "retry_delay_multiplier": 2.0,
42
+ "max_retry_delay_millis": 60000,
43
+ "initial_rpc_timeout_millis": 60000,
44
+ "rpc_timeout_multiplier": 1.0,
45
+ "max_rpc_timeout_millis": 60000,
46
+ "total_timeout_millis": 600000
29
47
  }
30
48
  },
31
49
  "methods": {
32
50
  "ReadRows": {
33
- "timeout_millis": 3600000,
51
+ "timeout_millis": 43200000,
34
52
  "retry_codes_name": "idempotent",
35
- "retry_params_name": "streaming"
53
+ "retry_params_name": "read_rows_params"
36
54
  },
37
55
  "SampleRowKeys": {
38
- "timeout_millis": 60000,
56
+ "timeout_millis": 20000,
39
57
  "retry_codes_name": "idempotent",
40
- "retry_params_name": "default"
58
+ "retry_params_name": "idempotent_params"
41
59
  },
42
60
  "MutateRow": {
43
- "timeout_millis": 60000,
61
+ "timeout_millis": 20000,
44
62
  "retry_codes_name": "idempotent",
45
- "retry_params_name": "default"
63
+ "retry_params_name": "idempotent_params"
46
64
  },
47
65
  "MutateRows": {
48
66
  "timeout_millis": 60000,
49
67
  "retry_codes_name": "idempotent",
50
- "retry_params_name": "default"
68
+ "retry_params_name": "mutate_rows_params"
51
69
  },
52
70
  "CheckAndMutateRow": {
53
- "timeout_millis": 60000,
71
+ "timeout_millis": 20000,
54
72
  "retry_codes_name": "non_idempotent",
55
- "retry_params_name": "default"
73
+ "retry_params_name": "non_idempotent_params"
56
74
  },
57
75
  "ReadModifyWriteRow": {
58
- "timeout_millis": 60000,
76
+ "timeout_millis": 20000,
59
77
  "retry_codes_name": "non_idempotent",
60
- "retry_params_name": "default"
78
+ "retry_params_name": "non_idempotent_params"
61
79
  }
62
80
  }
63
81
  }
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigtable
19
- VERSION = "0.4.3".freeze
19
+ VERSION = "0.5.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
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-07-12 00:00:00.000000000 Z
11
+ date: 2019-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  - !ruby/object:Gem::Version
285
285
  version: '0'
286
286
  requirements: []
287
- rubygems_version: 3.0.3
287
+ rubygems_version: 3.0.4
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: API Client library for Cloud Bigtable API