Skip to content

Commit 9524a37

Browse files
committed
Storage groups group by (ydb-platform#7480)
1 parent e48e086 commit 9524a37

File tree

6 files changed

+554
-202
lines changed

6 files changed

+554
-202
lines changed

ydb/core/viewer/json_handlers_storage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace NKikimr::NViewer {
55

66
void InitStorageGroupsJsonHandler(TJsonHandlers& jsonHandlers) {
7-
jsonHandlers.AddHandler("/storage/groups", new TJsonHandler<TStorageGroups>(TStorageGroups::GetSwagger()));
7+
jsonHandlers.AddHandler("/storage/groups", new TJsonHandler<TStorageGroups>(TStorageGroups::GetSwagger()), 2);
88
}
99

1010
void InitStorageJsonHandlers(TJsonHandlers& jsonHandlers) {

ydb/core/viewer/json_handlers_viewer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void InitViewerWhoAmIJsonHandler(TJsonHandlers& handlers) {
226226
}
227227

228228
void InitViewerQueryJsonHandler(TJsonHandlers& handlers) {
229-
handlers.AddHandler("/viewer/query", new TJsonHandler<TJsonQuery>(TJsonQuery::GetSwagger()));
229+
handlers.AddHandler("/viewer/query", new TJsonHandler<TJsonQuery>(TJsonQuery::GetSwagger()), 2);
230230
}
231231

232232
void InitViewerNetInfoJsonHandler(TJsonHandlers& handlers) {

ydb/core/viewer/json_pipe_req.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ class TViewerPipeClient : public TActorBootstrapped<TViewerPipeClient> {
220220
return Requests == 1;
221221
}
222222

223+
bool NoMoreRequests(ui32 requestsDone = 0) const {
224+
return Requests == requestsDone;
225+
}
226+
223227
TRequestState GetRequest() const;
224228
void ReplyAndPassAway(TString data, const TString& error = {});
225229

ydb/core/viewer/protos/viewer.proto

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,18 @@ message TStorageGroupInfo {
437437
uint64 Used = 13;
438438
uint64 Limit = 14;
439439
uint64 Available = 15;
440-
double Usage = 16;
440+
float Usage = 16;
441441
uint64 Read = 17;
442442
uint64 Write = 18;
443+
float DiskSpaceUsage = 19;
443444
repeated TStorageVDisk VDisks = 20;
444445
}
445446

447+
message TStorageGroupGroup {
448+
string GroupName = 1;
449+
uint64 GroupCount = 2;
450+
}
451+
446452
message TStoragePoolInfo {
447453
EFlag Overall = 1;
448454
string Name = 2;
@@ -467,15 +473,18 @@ message TStorageInfo {
467473
}
468474

469475
message TStorageGroupsInfo {
470-
uint64 Version = 1;
471-
optional uint64 TotalGroups = 2;
472-
optional uint64 FoundGroups = 3;
473-
optional uint64 FieldsAvailable = 4;
474-
optional uint64 FieldsRequired = 5;
476+
uint32 Version = 1;
477+
optional uint32 TotalGroups = 2;
478+
optional uint32 FoundGroups = 3;
479+
optional uint32 FieldsAvailable = 4;
480+
optional uint32 FieldsRequired = 5;
475481
optional bool NeedFilter = 6;
476-
optional bool NeedSort = 7;
477-
optional bool NeedLimit = 8;
478-
repeated TStorageGroupInfo StorageGroups = 10;
482+
optional bool NeedGroup = 7;
483+
optional bool NeedSort = 8;
484+
optional bool NeedLimit = 9;
485+
repeated string Problems = 10;
486+
repeated TStorageGroupInfo StorageGroups = 11;
487+
repeated TStorageGroupGroup StorageGroupGroups = 12;
479488
}
480489

481490
message TStorageUsageStats {

0 commit comments

Comments
 (0)