google-cloud-bigtable-admin-v2 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51f4a626f785e699393c2700bc86993e8144c23a0ff90f9dfa1f56277117b474
4
- data.tar.gz: 7608be0bfdc048ca02d8ea8956803875406ae5e9bfeb56564740c5a2ef4200d6
3
+ metadata.gz: 45eeaf71ba8faefde2f2a52ab796329a34c201a0eea5bc1f896cce55a9a20740
4
+ data.tar.gz: e9d8b2de77dd4e0f14d39819c3a7b3a82d107ce3ab919d9755f2e7624fa0fffa
5
5
  SHA512:
6
- metadata.gz: ddea900bdaadc1c8429f84861347edf7cf40a7dbb6782f92d7439085372f6af38e454922c060a6c4bd963a4090ae1a8857e1aa2a2be70743fb992dcdde8d930f
7
- data.tar.gz: 428a46c00c62bd2342296ee21edb33e7da3728c4f56a349eb0dda37b59672cea917259a4597ce6b5a51418e052ea36f529407f5a67f662945864f6821df8864c
6
+ metadata.gz: 9616e9674ebbd0505f5c94f96c9d7a813eb6d6947728c2c1a6181e92f7b1a63a799686009fb64f938d796ed6502336f4bffd98dc9977bfbb916afa50bc9ab573
7
+ data.tar.gz: e5fb3cd64bb7c8fe90979b68002f7656bf32b84ea27af57dde206edb8678a2e29f9a7913b32b8087b32c77c37cb69729a97ef8cff4335803b3f4da3711864e58
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Bigtable::Admin::V2::CreateInstanceRequest.new # (req
37
37
  response = client.create_instance request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-bigtable-admin-v2/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigtable-admin-v2/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/bigtable)
@@ -120,6 +120,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
120
120
  end
121
121
  add_message "google.bigtable.admin.v2.UpdateAppProfileMetadata" do
122
122
  end
123
+ add_message "google.bigtable.admin.v2.ListHotTabletsRequest" do
124
+ optional :parent, :string, 1
125
+ optional :start_time, :message, 2, "google.protobuf.Timestamp"
126
+ optional :end_time, :message, 3, "google.protobuf.Timestamp"
127
+ optional :page_size, :int32, 4
128
+ optional :page_token, :string, 5
129
+ end
130
+ add_message "google.bigtable.admin.v2.ListHotTabletsResponse" do
131
+ repeated :hot_tablets, :message, 1, "google.bigtable.admin.v2.HotTablet"
132
+ optional :next_page_token, :string, 2
133
+ end
123
134
  end
124
135
  end
125
136
 
@@ -152,6 +163,8 @@ module Google
152
163
  UpdateAppProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateAppProfileRequest").msgclass
153
164
  DeleteAppProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.DeleteAppProfileRequest").msgclass
154
165
  UpdateAppProfileMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateAppProfileMetadata").msgclass
166
+ ListHotTabletsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ListHotTabletsRequest").msgclass
167
+ ListHotTabletsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ListHotTabletsResponse").msgclass
155
168
  end
156
169
  end
157
170
  end
@@ -108,6 +108,9 @@ module Google
108
108
  rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
109
109
  # Returns permissions that the caller has on the specified instance resource.
110
110
  rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
111
+ # Lists hot tablets in a cluster, within the time range provided. Hot
112
+ # tablets are ordered based on CPU usage.
113
+ rpc :ListHotTablets, ::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest, ::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsResponse
111
114
  end
112
115
 
113
116
  Stub = Service.rpc_stub_class
@@ -79,6 +79,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
79
79
  optional :cluster_id, :string, 1
80
80
  optional :allow_transactional_writes, :bool, 2
81
81
  end
82
+ add_message "google.bigtable.admin.v2.HotTablet" do
83
+ optional :name, :string, 1
84
+ optional :table_name, :string, 2
85
+ optional :start_time, :message, 3, "google.protobuf.Timestamp"
86
+ optional :end_time, :message, 4, "google.protobuf.Timestamp"
87
+ optional :start_key, :string, 5
88
+ optional :end_key, :string, 6
89
+ optional :node_cpu_usage_percent, :float, 7
90
+ end
82
91
  end
83
92
  end
84
93
 
@@ -100,6 +109,7 @@ module Google
100
109
  AppProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AppProfile").msgclass
101
110
  AppProfile::MultiClusterRoutingUseAny = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny").msgclass
102
111
  AppProfile::SingleClusterRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AppProfile.SingleClusterRouting").msgclass
112
+ HotTablet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.HotTablet").msgclass
103
113
  end
104
114
  end
105
115
  end
@@ -146,6 +146,11 @@ module Google
146
146
  initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
147
147
  }
148
148
 
149
+ default_config.rpcs.list_hot_tablets.timeout = 60.0
150
+ default_config.rpcs.list_hot_tablets.retry_policy = {
151
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
152
+ }
153
+
149
154
  default_config
150
155
  end
151
156
  yield @configure if block_given?
@@ -2153,6 +2158,122 @@ module Google
2153
2158
  raise ::Google::Cloud::Error.from_error(e)
2154
2159
  end
2155
2160
 
2161
+ ##
2162
+ # Lists hot tablets in a cluster, within the time range provided. Hot
2163
+ # tablets are ordered based on CPU usage.
2164
+ #
2165
+ # @overload list_hot_tablets(request, options = nil)
2166
+ # Pass arguments to `list_hot_tablets` via a request object, either of type
2167
+ # {::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest} or an equivalent Hash.
2168
+ #
2169
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest, ::Hash]
2170
+ # A request object representing the call parameters. Required. To specify no
2171
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2172
+ # @param options [::Gapic::CallOptions, ::Hash]
2173
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2174
+ #
2175
+ # @overload list_hot_tablets(parent: nil, start_time: nil, end_time: nil, page_size: nil, page_token: nil)
2176
+ # Pass arguments to `list_hot_tablets` via keyword arguments. Note that at
2177
+ # least one keyword argument is required. To specify no parameters, or to keep all
2178
+ # the default parameter values, pass an empty Hash as a request object (see above).
2179
+ #
2180
+ # @param parent [::String]
2181
+ # Required. The cluster name to list hot tablets.
2182
+ # Value is in the following form:
2183
+ # `projects/{project}/instances/{instance}/clusters/{cluster}`.
2184
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
2185
+ # The start time to list hot tablets. The hot tablets in the response will
2186
+ # have start times between the requested start time and end time. Start time
2187
+ # defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2188
+ # it is unset. The start time should be less than the end time, and the
2189
+ # maximum allowed time range between start time and end time is 48 hours.
2190
+ # Start time and end time should have values between Now and Now - 14 days.
2191
+ # @param end_time [::Google::Protobuf::Timestamp, ::Hash]
2192
+ # The end time to list hot tablets.
2193
+ # @param page_size [::Integer]
2194
+ # Maximum number of results per page.
2195
+ #
2196
+ # A page_size that is empty or zero lets the server choose the number of
2197
+ # items to return. A page_size which is strictly positive will return at most
2198
+ # that many items. A negative page_size will cause an error.
2199
+ #
2200
+ # Following the first request, subsequent paginated calls do not need a
2201
+ # page_size field. If a page_size is set in subsequent calls, it must match
2202
+ # the page_size given in the first request.
2203
+ # @param page_token [::String]
2204
+ # The value of `next_page_token` returned by a previous call.
2205
+ #
2206
+ # @yield [response, operation] Access the result along with the RPC operation
2207
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::HotTablet>]
2208
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2209
+ #
2210
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::HotTablet>]
2211
+ #
2212
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2213
+ #
2214
+ # @example Basic example
2215
+ # require "google/cloud/bigtable/admin/v2"
2216
+ #
2217
+ # # Create a client object. The client can be reused for multiple calls.
2218
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2219
+ #
2220
+ # # Create a request. To set request fields, pass in keyword arguments.
2221
+ # request = Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest.new
2222
+ #
2223
+ # # Call the list_hot_tablets method.
2224
+ # result = client.list_hot_tablets request
2225
+ #
2226
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2227
+ # # iterate over all elements by calling #each, and the enumerable
2228
+ # # will lazily make API calls to fetch subsequent pages. Other
2229
+ # # methods are also available for managing paging directly.
2230
+ # result.each do |response|
2231
+ # # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::HotTablet.
2232
+ # p response
2233
+ # end
2234
+ #
2235
+ def list_hot_tablets request, options = nil
2236
+ raise ::ArgumentError, "request must be provided" if request.nil?
2237
+
2238
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest
2239
+
2240
+ # Converts hash and nil to an options object
2241
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2242
+
2243
+ # Customize the options with defaults
2244
+ metadata = @config.rpcs.list_hot_tablets.metadata.to_h
2245
+
2246
+ # Set x-goog-api-client and x-goog-user-project headers
2247
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2248
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2249
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2250
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2251
+
2252
+ header_params = {}
2253
+ if request.parent
2254
+ header_params["parent"] = request.parent
2255
+ end
2256
+
2257
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2258
+ metadata[:"x-goog-request-params"] ||= request_params_header
2259
+
2260
+ options.apply_defaults timeout: @config.rpcs.list_hot_tablets.timeout,
2261
+ metadata: metadata,
2262
+ retry_policy: @config.rpcs.list_hot_tablets.retry_policy
2263
+
2264
+ options.apply_defaults timeout: @config.timeout,
2265
+ metadata: @config.metadata,
2266
+ retry_policy: @config.retry_policy
2267
+
2268
+ @bigtable_instance_admin_stub.call_rpc :list_hot_tablets, request, options: options do |response, operation|
2269
+ response = ::Gapic::PagedEnumerable.new @bigtable_instance_admin_stub, :list_hot_tablets, request, response, operation, options
2270
+ yield response, operation if block_given?
2271
+ return response
2272
+ end
2273
+ rescue ::GRPC::BadStatus => e
2274
+ raise ::Google::Cloud::Error.from_error(e)
2275
+ end
2276
+
2156
2277
  ##
2157
2278
  # Configuration class for the BigtableInstanceAdmin API.
2158
2279
  #
@@ -2388,6 +2509,11 @@ module Google
2388
2509
  # @return [::Gapic::Config::Method]
2389
2510
  #
2390
2511
  attr_reader :test_iam_permissions
2512
+ ##
2513
+ # RPC-specific configuration for `list_hot_tablets`
2514
+ # @return [::Gapic::Config::Method]
2515
+ #
2516
+ attr_reader :list_hot_tablets
2391
2517
 
2392
2518
  # @private
2393
2519
  def initialize parent_rpcs = nil
@@ -2431,6 +2557,8 @@ module Google
2431
2557
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
2432
2558
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2433
2559
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2560
+ list_hot_tablets_config = parent_rpcs.list_hot_tablets if parent_rpcs.respond_to? :list_hot_tablets
2561
+ @list_hot_tablets = ::Gapic::Config::Method.new list_hot_tablets_config
2434
2562
 
2435
2563
  yield self if block_given?
2436
2564
  end
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigtable
23
23
  module Admin
24
24
  module V2
25
- VERSION = "0.8.1"
25
+ VERSION = "0.9.0"
26
26
  end
27
27
  end
28
28
  end
@@ -27,6 +27,8 @@ module Google
27
27
  ##
28
28
  # To load this package, including all its services, and instantiate a client:
29
29
  #
30
+ # @example
31
+ #
30
32
  # require "google/cloud/bigtable/admin/v2"
31
33
  # client = ::Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
32
34
  #
@@ -399,6 +399,60 @@ module Google
399
399
  include ::Google::Protobuf::MessageExts
400
400
  extend ::Google::Protobuf::MessageExts::ClassMethods
401
401
  end
402
+
403
+ # Request message for BigtableInstanceAdmin.ListHotTablets.
404
+ # @!attribute [rw] parent
405
+ # @return [::String]
406
+ # Required. The cluster name to list hot tablets.
407
+ # Value is in the following form:
408
+ # `projects/{project}/instances/{instance}/clusters/{cluster}`.
409
+ # @!attribute [rw] start_time
410
+ # @return [::Google::Protobuf::Timestamp]
411
+ # The start time to list hot tablets. The hot tablets in the response will
412
+ # have start times between the requested start time and end time. Start time
413
+ # defaults to Now if it is unset, and end time defaults to Now - 24 hours if
414
+ # it is unset. The start time should be less than the end time, and the
415
+ # maximum allowed time range between start time and end time is 48 hours.
416
+ # Start time and end time should have values between Now and Now - 14 days.
417
+ # @!attribute [rw] end_time
418
+ # @return [::Google::Protobuf::Timestamp]
419
+ # The end time to list hot tablets.
420
+ # @!attribute [rw] page_size
421
+ # @return [::Integer]
422
+ # Maximum number of results per page.
423
+ #
424
+ # A page_size that is empty or zero lets the server choose the number of
425
+ # items to return. A page_size which is strictly positive will return at most
426
+ # that many items. A negative page_size will cause an error.
427
+ #
428
+ # Following the first request, subsequent paginated calls do not need a
429
+ # page_size field. If a page_size is set in subsequent calls, it must match
430
+ # the page_size given in the first request.
431
+ # @!attribute [rw] page_token
432
+ # @return [::String]
433
+ # The value of `next_page_token` returned by a previous call.
434
+ class ListHotTabletsRequest
435
+ include ::Google::Protobuf::MessageExts
436
+ extend ::Google::Protobuf::MessageExts::ClassMethods
437
+ end
438
+
439
+ # Response message for BigtableInstanceAdmin.ListHotTablets.
440
+ # @!attribute [rw] hot_tablets
441
+ # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::HotTablet>]
442
+ # List of hot tablets in the tables of the requested cluster that fall
443
+ # within the requested time range. Hot tablets are ordered by node cpu usage
444
+ # percent. If there are multiple hot tablets that correspond to the same
445
+ # tablet within a 15-minute interval, only the hot tablet with the highest
446
+ # node cpu usage will be included in the response.
447
+ # @!attribute [rw] next_page_token
448
+ # @return [::String]
449
+ # Set if not all hot tablets could be returned in a single response.
450
+ # Pass this value to `page_token` in another request to get the next
451
+ # page of results.
452
+ class ListHotTabletsResponse
453
+ include ::Google::Protobuf::MessageExts
454
+ extend ::Google::Protobuf::MessageExts::ClassMethods
455
+ end
402
456
  end
403
457
  end
404
458
  end
@@ -292,6 +292,42 @@ module Google
292
292
  extend ::Google::Protobuf::MessageExts::ClassMethods
293
293
  end
294
294
  end
295
+
296
+ # A tablet is a defined by a start and end key and is explained in
297
+ # https://cloud.google.com/bigtable/docs/overview#architecture and
298
+ # https://cloud.google.com/bigtable/docs/performance#optimization.
299
+ # A Hot tablet is a tablet that exhibits high average cpu usage during the time
300
+ # interval from start time to end time.
301
+ # @!attribute [rw] name
302
+ # @return [::String]
303
+ # The unique name of the hot tablet. Values are of the form
304
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
305
+ # @!attribute [rw] table_name
306
+ # @return [::String]
307
+ # Name of the table that contains the tablet. Values are of the form
308
+ # `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
309
+ # @!attribute [r] start_time
310
+ # @return [::Google::Protobuf::Timestamp]
311
+ # Output only. The start time of the hot tablet.
312
+ # @!attribute [r] end_time
313
+ # @return [::Google::Protobuf::Timestamp]
314
+ # Output only. The end time of the hot tablet.
315
+ # @!attribute [rw] start_key
316
+ # @return [::String]
317
+ # Tablet Start Key (inclusive).
318
+ # @!attribute [rw] end_key
319
+ # @return [::String]
320
+ # Tablet End Key (inclusive).
321
+ # @!attribute [r] node_cpu_usage_percent
322
+ # @return [::Float]
323
+ # Output only. The average CPU usage spent by a node on this tablet over the start_time to
324
+ # end_time time range. The percentage is the amount of CPU used by the node
325
+ # to serve the tablet, from 0% (tablet was not interacted with) to 100% (the
326
+ # node spent all cycles serving the hot tablet).
327
+ class HotTablet
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
295
331
  end
296
332
  end
297
333
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable-admin-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.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: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.3.4
250
+ rubygems_version: 3.3.5
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: API Client library for the Cloud Bigtable Admin V2 API