|
1 |
| -// Copyright 2021 Google LLC |
| 1 | +// Copyright 2022 Google LLC |
2 | 2 | //
|
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License");
|
4 | 4 | // you may not use this file except in compliance with the License.
|
@@ -274,6 +274,15 @@ service BigtableInstanceAdmin {
|
274 | 274 | };
|
275 | 275 | option (google.api.method_signature) = "resource,permissions";
|
276 | 276 | }
|
| 277 | + |
| 278 | + // Lists hot tablets in a cluster, within the time range provided. Hot |
| 279 | + // tablets are ordered based on CPU usage. |
| 280 | + rpc ListHotTablets(ListHotTabletsRequest) returns (ListHotTabletsResponse) { |
| 281 | + option (google.api.http) = { |
| 282 | + get: "/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets" |
| 283 | + }; |
| 284 | + option (google.api.method_signature) = "parent"; |
| 285 | + } |
277 | 286 | }
|
278 | 287 |
|
279 | 288 | // Request message for BigtableInstanceAdmin.CreateInstance.
|
@@ -634,3 +643,56 @@ message DeleteAppProfileRequest {
|
634 | 643 | message UpdateAppProfileMetadata {
|
635 | 644 |
|
636 | 645 | }
|
| 646 | + |
| 647 | +// Request message for BigtableInstanceAdmin.ListHotTablets. |
| 648 | +message ListHotTabletsRequest { |
| 649 | + // Required. The cluster name to list hot tablets. |
| 650 | + // Value is in the following form: |
| 651 | + // `projects/{project}/instances/{instance}/clusters/{cluster}`. |
| 652 | + string parent = 1 [ |
| 653 | + (google.api.field_behavior) = REQUIRED, |
| 654 | + (google.api.resource_reference) = { |
| 655 | + type: "bigtableadmin.googleapis.com/Cluster" |
| 656 | + } |
| 657 | + ]; |
| 658 | + |
| 659 | + // The start time to list hot tablets. The hot tablets in the response will |
| 660 | + // have start times between the requested start time and end time. Start time |
| 661 | + // defaults to Now if it is unset, and end time defaults to Now - 24 hours if |
| 662 | + // it is unset. The start time should be less than the end time, and the |
| 663 | + // maximum allowed time range between start time and end time is 48 hours. |
| 664 | + // Start time and end time should have values between Now and Now - 14 days. |
| 665 | + google.protobuf.Timestamp start_time = 2; |
| 666 | + |
| 667 | + // The end time to list hot tablets. |
| 668 | + google.protobuf.Timestamp end_time = 3; |
| 669 | + |
| 670 | + // Maximum number of results per page. |
| 671 | + // |
| 672 | + // A page_size that is empty or zero lets the server choose the number of |
| 673 | + // items to return. A page_size which is strictly positive will return at most |
| 674 | + // that many items. A negative page_size will cause an error. |
| 675 | + // |
| 676 | + // Following the first request, subsequent paginated calls do not need a |
| 677 | + // page_size field. If a page_size is set in subsequent calls, it must match |
| 678 | + // the page_size given in the first request. |
| 679 | + int32 page_size = 4; |
| 680 | + |
| 681 | + // The value of `next_page_token` returned by a previous call. |
| 682 | + string page_token = 5; |
| 683 | +} |
| 684 | + |
| 685 | +// Response message for BigtableInstanceAdmin.ListHotTablets. |
| 686 | +message ListHotTabletsResponse { |
| 687 | + // List of hot tablets in the tables of the requested cluster that fall |
| 688 | + // within the requested time range. Hot tablets are ordered by node cpu usage |
| 689 | + // percent. If there are multiple hot tablets that correspond to the same |
| 690 | + // tablet within a 15-minute interval, only the hot tablet with the highest |
| 691 | + // node cpu usage will be included in the response. |
| 692 | + repeated HotTablet hot_tablets = 1; |
| 693 | + |
| 694 | + // Set if not all hot tablets could be returned in a single response. |
| 695 | + // Pass this value to `page_token` in another request to get the next |
| 696 | + // page of results. |
| 697 | + string next_page_token = 2; |
| 698 | +} |
0 commit comments