aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/core/viewer/protos/viewer.proto
blob: 9b8ca6324bb462a23388369718490d7aaa68541d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
syntax = "proto3";

import "ydb/core/protos/tablet_counters.proto";
import "ydb/core/protos/node_whiteboard.proto";
import "ydb/core/protos/flat_scheme_op.proto";
import "ydb/core/protos/tablet.proto";
import "ydb/core/protos/hive.proto";
import "ydb/public/api/protos/ydb_cms.proto";

package NKikimrViewer;
option java_package = "ru.yandex.kikimr.proto";

enum EObjectType {
    Unknown = 0;
    Root = 1;
    Directory = 2;
    Table = 3;
    Topic = 4;
    Consumers = 5;
    Operations = 6;
    Consumer = 7;
    RtmrTables = 8;
    RtmrOperations = 9; // flat list of operations
    RtmrTable = 10;
    RtmrOperation = 11;
    RtmrTasks = 12; // flat list of tasks
    RtmrTask = 13; // task is the group of operations, associated tables and some metadata
    RtmrVolume = 14;
    BlockStoreVolume = 15;
    Kesus = 16;
    SolomonVolume = 17;
    SubDomain = 18;
    FileStore = 19;
    CdcStream = 20;
    Sequence = 21;
    Replication = 22;
    BlobDepot = 23;
}

message TBrowseInfo {
    EObjectType Type = 1;
    string Path = 2;
    string Name = 3;
    bool Final = 4;
    repeated TBrowseInfo Children = 5;
}

message TBackupInfo {
    NKikimrSchemeOp.TBackupProgress Progress = 1;
    repeated NKikimrSchemeOp.TLastBackupResult LastResults = 2;
}

message TResources {
    uint64 CPU = 1;
    uint64 Memory = 2;
    uint64 Network = 3;
    uint64 Storage = 5;
    uint64 ReadThroughput = 6;
    uint64 WriteThroughput = 7;
}

message TMetaCommonInfo {
    message TACE {
        string AccessType = 1;
        repeated string AccessRights = 2;
        string Subject = 3;
        repeated string InheritanceType = 4;
        string AccessRule = 5;
    }

    EObjectType Type = 1;
    string Path = 2;
    uint64 DataSize = 3;
    uint32 Tablets = 4;
    uint32 Partitions = 5;
    string Owner = 6;
    uint64 MemorySize = 7;
    uint64 RowCount = 8;
    uint64 CreateTime = 9;
    uint64 AccessTime = 10;
    uint64 UpdateTime = 11;
    repeated string ErasureSpecies = 12;
    repeated string VDiskKind = 13;
    repeated string PDiskKind = 14;
    repeated uint32 Nodes = 15;
    repeated uint32 Disks = 16;
    repeated TACE ACL = 17;
    TBackupInfo Backup = 18;
    TResources Resources = 19;

    // RTMR-specific table stats
    uint64 DistinctKeysCount = 20;
    uint64 UpdatesCount = 21;
    string LastKey = 22;
    string TopKey = 23;
    uint64 TopKeyBytesCount = 24;
    string MinSubKey = 25;
    string MaxSubKey = 26;
    uint64 MinTimestamp = 27; // timestamp of the oldest entry in the table, milliseconds since epoch

    // Datashard-specific stats
    uint64 ImmediateTxCompleted = 30;
    uint64 PlannedTxCompleted = 31;
    uint64 TxRejectedByOverload = 32;
    uint64 TxRejectedBySpace = 33;

    uint64 RowUpdates = 34;
    uint64 RowDeletes = 35;
    uint64 RowReads = 36;
    uint64 RangeReads = 37;
    uint64 RangeReadRows = 38;
}

message TMetaColumnInfo {
    string Name = 1;
    string Type = 2;
    bool Key = 3;
}

message TMetaTableInfo {
    repeated TMetaColumnInfo Schema = 1;

    // RTMR-specific table information
    /// Lifetime in seconds
    uint32 Lifetime = 2;
    /// Min absolute timestamp allowed
    uint64 MinTimestamp = 3;
    /// Keep last n records per key
    uint32 MaxRecords = 4;
    /// Keep only one last record per (key, subkey) pair
    bool Unique = 5;
    /// Specifies if table belongs to specific task; read-only
    string TaskId = 6;
    /// Arbitrary data associated with the table
    map<string, string> Attrs = 7;

    // RTMR-specific view information
    repeated string SrcTables = 8;
}

message TMetaTopicLagInfo {
    uint64 WriteTime = 1;
    uint64 CreateTime = 2;
    uint64 Messages = 3;
    uint64 Size = 4;
}

message TMetaTopicConsumerInfo {
    string Name = 1;
    TMetaTopicLagInfo CommittedLags = 2;
    TMetaTopicLagInfo LastReadLags = 3;
    //map<string, TMetaTopicInfo> Topics = 4;
    repeated TMetaTopicInfo Topics = 4;
}

message TMetaTopicPartitionInfo {
    int32 Partition = 1;
    TMetaTopicLagInfo CommittedLags = 2;
    TMetaTopicLagInfo LastReadLags = 3;
}

message TMetaTopicPartitionConfig {
    uint64 MaxCountInPartition = 1;
    uint64 MaxSizeInPartition = 2;
    uint64 LifetimeSeconds = 3;
}

message TMetaTopicInfo {
    string Name = 1;
    TMetaTopicLagInfo CommittedLags = 2;
    TMetaTopicLagInfo LastReadLags = 3;
    uint64 PartitionLifeTime = 4;
    uint64 PartitionInitTime = 5;
    TMetaTopicPartitionConfig PartitionConfig = 6;

    repeated TMetaTopicConsumerInfo Consumers = 9;
    repeated TMetaTopicPartitionInfo Partitions = 10;
}

message TMetaRtmrOperationInfo {
    message TSettings {
            // Options passed to the operation instance
            string Options = 1;
            // Force pause between operation executions on one key; seconds
            uint32 PostponeTimeout = 2;
            // Pacing period for postponed keys (maximum error added to PostponeTimeout); seconds
            uint32 PostponePacePeriod = 13;
            // Force pause before first operation execution on one key; seconds
            uint32 BatchTimeout = 11;
            // Max age of data being read for operation execution; seconds
            uint32 MaxTimeBack = 3;
            // Operation instance recreation period; seconds
            uint32 RecycleTimeout = 4;
            // Importance of operation for scheduling
            uint32 Weight = 5;
            // Max data passed to operation per one execution
            uint32 MaxInputBytes = 6;
            // Discard data if there is too long queue for execution
            uint32 SkipIfMoreThanBytes = 7;
            // desired revision of dynamic library
            uint32 Revision = 8;
            // current working directory
            string WorkingDirectory = 9;
            // Dynamic library name
            string LibraryName = 10;
            // Tolerance to failures during operation execution
            uint32 SuspendThreshold = 12;
    };

    message TStats {
        uint64 In = 1;
        uint64 Count = 2;
        uint64 Out = 3;
        double ExecuteTime = 4;
        double ReadTime = 5;
        double LoadStateTime = 6;
        double SaveStateTime = 7;
    };

    message TSystemTableSummary {
        string Type = 1;
        string Name = 2;
        uint32 Lifetime = 3; // Lifetime in seconds
        uint64 DataSize = 4; // in bytes
        uint64 Entries = 5;
        uint64 UpdatesCount = 6;
        uint64 UpdateTime = 7; // milliseconds since epoch
    };

    bool Enabled = 1;

    // Unique operation name
    string Name = 2;
    // Operation instance name
    string ClassName = 3;
    // Species task to which this operation belongs; read-only
    string TaskId = 4;

    // List of tables/views to read data from; mandatory upon creation
    repeated string SrcTables = 5;
    // List of tables to write to
    repeated string DstTables = 6;

    // operation settings
    string Mode = 7;
    bool Incremental = 8;
    bool Stateful = 9;
    bool NoPreview = 10;
    repeated string Flags = 11;

    // Lifetime in seconds for operation state
    uint32 StateLifetime = 12;
    // Lifetime in seconds for operation results
    uint32 ResultLifetime = 13;

    TSettings Settings = 14;

    TStats Stats = 15;

    repeated TSystemTableSummary SystemTables = 16;
}

message TMetaRtmrTaskInfo {
    string TaskId = 1;
    // indicates that whole group of operations is either enabled or disabed
    bool Enabled = 2;

    // associated tables
    repeated string OwnedTables = 3;
    // associated operations
    repeated string Operations = 4;
}

message TMetaInfo {
    TMetaCommonInfo Common = 1;
    TMetaTableInfo Table = 2;
    TMetaTopicInfo Topic = 3;
    TMetaTopicConsumerInfo Consumer = 4;
    NKikimrTabletBase.TTabletCounters Counters = 9;
    TMetaRtmrOperationInfo RtmrOperation = 10;
    TMetaRtmrTaskInfo RtmrTask = 11;
}

message TTenantResource {
    string Type = 1;
    string Zone = 2;
    string Kind = 3;
    uint32 Count = 4;
}

message TTenantResources {
    repeated TTenantResource Required = 1;
    repeated TTenantResource Allocated = 2;
}

enum EFlag {
    Grey = 0;
    Green = 1;
    Blue = 2;
    Yellow = 3;
    Orange = 4;
    Red = 5;
}

message TClusterInfo {
    string Name = 1;
    EFlag Overall = 2;
    uint32 NodesTotal = 10;
    uint32 NodesAlive = 11;
    uint32 NumberOfCpus = 20;
    double LoadAverage = 21;
    uint64 MemoryTotal = 30;
    uint64 MemoryUsed = 31;
    uint64 StorageTotal = 40;
    uint64 StorageUsed = 41;
    repeated string DataCenters = 42;
    repeated string Versions = 43;
    repeated NKikimrWhiteboard.TTabletStateInfo SystemTablets = 16;
    uint64 Hosts = 44;
    uint64 Tenants = 45;
    uint64 Tablets = 46;
}

enum ETenantType {
    UnknownTenantType = 0;
    Domain = 1;
    Dedicated = 2;
    Shared = 3;
    Serverless = 4;
}

message TTenant {
    string Name = 1;
    string Id = 2;
    ETenantType Type = 3;
    Ydb.Cms.GetDatabaseStatusResult.State State = 4;
    repeated NKikimrHive.THiveDomainStatsStateCount StateStats = 5;
    NKikimrTabletBase.TMetrics Metrics = 6;
    repeated uint32 NodeIds = 7;
    uint32 AliveNodes = 8;
    TTenantResources Resources = 9;
    uint64 CreateTime = 10;
    string Owner = 11;
    repeated string Users = 12;
    repeated NKikimrWhiteboard.TSystemStateInfo.TPoolStats PoolStats = 13;
    map<string, string> UserAttributes = 14;
    EFlag Overall = 15;
    repeated NKikimrWhiteboard.TTabletStateInfo SystemTablets = 16;
    string ResourceId = 32;
    repeated TTabletStateInfo Tablets = 33;
    uint64 StorageAllocatedSize = 34;
    uint64 StorageMinAvailableSize = 35;
    repeated NKikimrWhiteboard.TSystemStateInfo Nodes = 36;
    uint64 MemoryUsed = 37;
    uint64 MemoryLimit = 38;
    double CoresUsed = 39;
    uint64 StorageGroups = 40;
}

message TTenants {
    repeated TTenant Tenants = 1;
}

message TTenantInfo {
    repeated TTenant TenantInfo = 1;
    repeated string Errors = 2;
}

message TStorageGroupInfo {
    string GroupId = 1;
}

message TStoragePoolInfo {
    EFlag Overall = 1;
    string Name = 2;
    string Kind = 3;
    repeated TStorageGroupInfo Groups = 4;
    uint64 AcquiredUnits = 5;
    float AcquiredIOPS = 6;
    uint64 AcquiredThroughput = 7;
    uint64 AcquiredSize = 8;
    float MaximumIOPS = 9;
    uint64 MaximumThroughput = 10;
    uint64 MaximumSize = 11;
}

message TStorageInfo {
    EFlag Overall = 1;
    repeated TStoragePoolInfo StoragePools = 2;
    uint64 TotalGroups = 3;
    uint64 FoundGroups = 4;
}

message TNodeInfo {
    uint32 NodeId = 1;
    NKikimrWhiteboard.TSystemStateInfo SystemState = 2;
    repeated NKikimrWhiteboard.TPDiskStateInfo PDisks = 3;
    repeated NKikimrWhiteboard.TVDiskStateInfo VDisks = 4;
    repeated NKikimrWhiteboard.TTabletStateInfo Tablets = 5;
}

message TNodesInfo {
    EFlag Overall = 1;
    repeated TNodeInfo Nodes = 2;
    uint64 TotalNodes = 3;
    uint64 FoundNodes = 4;
}

enum ENodeType {
    UnknownNodeType = 0;
    Static = 1;
    Dynamic = 2;
}

message TNetNodePeerInfo {
    uint32 NodeId = 1;
    string PeerName = 2;
    bool Connected = 3;
    EFlag ConnectStatus = 4;
    uint64 ChangeTime = 5;
    ENodeType NodeType = 6;
    string DataCenter = 7;
    string Rack = 8;
    string Host = 9;
    uint32 Port = 10;
}

message TNetNodeInfo {
    uint32 NodeId = 1;
    EFlag Overall = 2;
    repeated TNetNodePeerInfo Peers = 3;
    ENodeType NodeType = 4;
    string DataCenter = 5;
    string Rack = 6;
    string Host = 7;
    uint32 Port = 8;
}

message TNetTenantInfo {
    EFlag Overall = 1;
    string Name = 2;
    repeated TNetNodeInfo Nodes = 5;
}

message TNetInfo {
    EFlag Overall = 1;
    repeated TNetTenantInfo Tenants = 2;
}

message TTabletStateInfo {
    string Type = 1;
    EFlag State = 2;
    uint32 Count = 3;
}

message TComputeNodeInfo {
    uint64 StartTime = 1;
    uint64 ChangeTime = 2;
    NKikimrWhiteboard.TSystemStateInfo.TLegacyNodeLocation SystemLocation = 3;
    repeated double LoadAverage = 4;
    uint32 NumberOfCpus = 5;
    EFlag Overall = 6;
    uint32 NodeId = 9;
    string DataCenter = 16;
    string Rack = 18;
    string Host = 19;
    string Version = 20;
    repeated NKikimrWhiteboard.TSystemStateInfo.TPoolStats PoolStats = 21;
    repeated NKikimrWhiteboard.TSystemStateInfo.TEndpoint Endpoints = 22;
    repeated string Roles = 23;
    optional uint64 MemoryUsed = 26;
    optional uint64 MemoryLimit = 27;
    NKikimrTabletBase.TMetrics Metrics = 32;
    repeated TTabletStateInfo Tablets = 33;
}

message TComputeTenantInfo {
    EFlag Overall = 1;
    string Name = 2;
    repeated TComputeNodeInfo Nodes = 5;
}

message TComputeInfo {
    EFlag Overall = 1;
    repeated TComputeTenantInfo Tenants = 2;
    repeated string Errors = 3;
}

message TNodeLocation {
    repeated uint32 NodeId = 1;
}

message TEvViewerRequest {
    TNodeLocation Location = 1;
    uint32 Timeout = 2; // ms
    oneof Request {
        NKikimrWhiteboard.TEvTabletStateRequest TabletRequest = 11;
    }
}

message TEvViewerResponse {
    TNodeLocation LocationResponded = 2;
    oneof Response {
        NKikimrWhiteboard.TEvTabletStateResponse TabletResponse = 11;
    }
}

message TEvDescribeSchemeInfo {
    enum ESource {
        None = 0;
        SchemeShard = 1;
        Cache = 2;
    }

    optional string Status = 1;
    optional string Reason = 2;
    optional string Path = 3;
    optional NKikimrSchemeOp.TPathDescription PathDescription = 4;
    optional fixed64 PathOwner = 5;
    optional fixed64 PathId = 6;

    optional string LastExistedPrefixPath = 7;
    optional fixed64 LastExistedPrefixPathId = 8;
    optional NKikimrSchemeOp.TPathDescription LastExistedPrefixDescription = 9;
    optional fixed64 PathOwnerId = 10;
    optional ESource Source = 11;
}