Content-Length: 545014 | pFad | https://github.com/googleapis/googleapis/commit/92ab86a79f4a9e774dfd6ee533d9376af084b376

46 feat: Add ListHotTablets API method and protobufs · googleapis/googleapis@92ab86a · GitHub
Skip to content

Commit 92ab86a

Browse files
Google APIscopybara-github
Google APIs
authored andcommitted
feat: Add ListHotTablets API method and protobufs
PiperOrigin-RevId: 436758628
1 parent 6fb9df7 commit 92ab86a

File tree

4 files changed

+118
-2
lines changed

4 files changed

+118
-2
lines changed

google/bigtable/admin/v2/bigtable_instance_admin.proto

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -274,6 +274,15 @@ service BigtableInstanceAdmin {
274274
};
275275
option (google.api.method_signature) = "resource,permissions";
276276
}
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+
}
277286
}
278287

279288
// Request message for BigtableInstanceAdmin.CreateInstance.
@@ -634,3 +643,56 @@ message DeleteAppProfileRequest {
634643
message UpdateAppProfileMetadata {
635644

636645
}
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+
}

google/bigtable/admin/v2/bigtableadmin_grpc_service_config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@
185185
{
186186
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
187187
"method": "TestIamPermissions"
188+
},
189+
{
190+
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
191+
"method": "ListHotTablets"
188192
}
189193
],
190194
"timeout": "60s",

google/bigtable/admin/v2/bigtableadmin_v2.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ authentication:
9999
https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,
100100
https://www.googleapis.com/auth/cloud-platform,
101101
https://www.googleapis.com/auth/cloud-platform.read-only
102+
- selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets
103+
oauth:
104+
canonical_scopes: |-
105+
https://www.googleapis.com/auth/bigtable.admin,
106+
https://www.googleapis.com/auth/bigtable.admin.cluster,
107+
https://www.googleapis.com/auth/bigtable.admin.instance,
108+
https://www.googleapis.com/auth/cloud-bigtable.admin,
109+
https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,
110+
https://www.googleapis.com/auth/cloud-platform,
111+
https://www.googleapis.com/auth/cloud-platform.read-only
102112
- selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances
103113
oauth:
104114
canonical_scopes: |-

google/bigtable/admin/v2/instance.proto

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -291,3 +291,43 @@ message AppProfile {
291291
SingleClusterRouting single_cluster_routing = 6;
292292
}
293293
}
294+
295+
// A tablet is a defined by a start and end key and is explained in
296+
// https://cloud.google.com/bigtable/docs/overview#architecture and
297+
// https://cloud.google.com/bigtable/docs/performance#optimization.
298+
// A Hot tablet is a tablet that exhibits high average cpu usage during the time
299+
// interval from start time to end time.
300+
message HotTablet {
301+
option (google.api.resource) = {
302+
type: "bigtableadmin.googleapis.com/HotTablet"
303+
pattern: "projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}"
304+
};
305+
306+
// The unique name of the hot tablet. Values are of the form
307+
// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
308+
string name = 1;
309+
310+
// Name of the table that contains the tablet. Values are of the form
311+
// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
312+
string table_name = 2 [(google.api.resource_reference) = {
313+
type: "bigtableadmin.googleapis.com/Table"
314+
}];
315+
316+
// Output only. The start time of the hot tablet.
317+
google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
318+
319+
// Output only. The end time of the hot tablet.
320+
google.protobuf.Timestamp end_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
321+
322+
// Tablet Start Key (inclusive).
323+
string start_key = 5;
324+
325+
// Tablet End Key (inclusive).
326+
string end_key = 6;
327+
328+
// Output only. The average CPU usage spent by a node on this tablet over the start_time to
329+
// end_time time range. The percentage is the amount of CPU used by the node
330+
// to serve the tablet, from 0% (tablet was not interacted with) to 100% (the
331+
// node spent all cycles serving the hot tablet).
332+
float node_cpu_usage_percent = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
333+
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/googleapis/commit/92ab86a79f4a9e774dfd6ee533d9376af084b376

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy