risingwave_pb/sim/
telemetry.rs

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
// This file is @generated by prost-build.
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SystemMemory {
    #[prost(uint64, tag = "1")]
    pub used: u64,
    #[prost(uint64, tag = "2")]
    pub total: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemOs {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub kernel_version: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SystemCpu {
    #[prost(float, tag = "1")]
    pub available: f32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemData {
    #[prost(message, optional, tag = "1")]
    pub memory: ::core::option::Option<SystemMemory>,
    #[prost(message, optional, tag = "2")]
    pub os: ::core::option::Option<SystemOs>,
    #[prost(message, optional, tag = "3")]
    pub cpu: ::core::option::Option<SystemCpu>,
}
/// NodeCount represents how many nodes in this cluster
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NodeCount {
    #[prost(uint32, tag = "1")]
    pub meta: u32,
    #[prost(uint32, tag = "2")]
    pub compute: u32,
    #[prost(uint32, tag = "3")]
    pub frontend: u32,
    #[prost(uint32, tag = "4")]
    pub compactor: u32,
}
/// RwVersion represents the version of RisingWave
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RwVersion {
    /// Version is the Cargo package version of RisingWave
    #[prost(string, tag = "1")]
    pub rw_version: ::prost::alloc::string::String,
    /// GitSHA is the Git commit SHA of RisingWave
    #[prost(string, tag = "2")]
    pub git_sha: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportBase {
    /// tracking_id is persistent in meta data
    #[prost(string, tag = "1")]
    pub tracking_id: ::prost::alloc::string::String,
    /// session_id is reset every time node restarts
    #[prost(string, tag = "2")]
    pub session_id: ::prost::alloc::string::String,
    /// system_data is hardware and os info
    #[prost(message, optional, tag = "3")]
    pub system_data: ::core::option::Option<SystemData>,
    /// up_time is how long the node has been running
    #[prost(uint64, tag = "4")]
    pub up_time: u64,
    /// report_time is when the report is created
    #[prost(uint64, tag = "5")]
    pub report_time: u64,
    /// node_type is the node that creates the report
    #[prost(enumeration = "TelemetryNodeType", tag = "6")]
    pub node_type: i32,
    /// mark the report is a test message
    /// if so, the backend do validations but not store it
    #[prost(bool, tag = "7")]
    pub is_test: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetaReport {
    #[prost(message, optional, tag = "1")]
    pub base: ::core::option::Option<ReportBase>,
    /// meta_backend is the backend of meta data
    #[prost(enumeration = "MetaBackend", tag = "2")]
    pub meta_backend: i32,
    /// node_count is the count of each node type
    #[prost(message, optional, tag = "3")]
    pub node_count: ::core::option::Option<NodeCount>,
    /// rw_version is the version of RisingWave
    #[prost(message, optional, tag = "4")]
    pub rw_version: ::core::option::Option<RwVersion>,
    /// This field represents the "number of running streaming jobs"
    /// and is used to indicate whether the cluster is active.
    #[prost(uint32, tag = "5")]
    pub stream_job_count: u32,
    /// stream_jobs is the list of running streaming jobs
    /// and is used to collect the table_id, connector_name and table_optimizations
    #[prost(message, repeated, tag = "6")]
    pub stream_jobs: ::prost::alloc::vec::Vec<StreamJobDesc>,
    /// How the cluster is deployed
    #[prost(enumeration = "TelemetryClusterType", tag = "7")]
    pub cluster_type: i32,
    /// The object store media type obtained from ObjectStore::store_media_type
    #[prost(string, tag = "8")]
    pub object_store_media_type: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamJobDesc {
    #[prost(int32, tag = "1")]
    pub table_id: i32,
    #[prost(string, optional, tag = "2")]
    pub connector_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration = "PlanOptimization", repeated, tag = "3")]
    pub plan_optimizations: ::prost::alloc::vec::Vec<i32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeReport {
    #[prost(message, optional, tag = "1")]
    pub base: ::core::option::Option<ReportBase>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FrontendReport {
    #[prost(message, optional, tag = "1")]
    pub base: ::core::option::Option<ReportBase>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactorReport {
    #[prost(message, optional, tag = "1")]
    pub base: ::core::option::Option<ReportBase>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMessage {
    /// tracking_id is persistent in meta data
    #[prost(string, tag = "1")]
    pub tracking_id: ::prost::alloc::string::String,
    /// event_time is when the event is created
    #[prost(uint64, tag = "3")]
    pub event_time_sec: u64,
    /// event_stage describes in which process the event happens
    #[prost(enumeration = "TelemetryEventStage", tag = "4")]
    pub event_stage: i32,
    /// feature_name is the name of the feature triggered the event
    #[prost(string, tag = "5")]
    pub event_name: ::prost::alloc::string::String,
    /// connector_name is the name of the connector involves
    #[prost(string, optional, tag = "6")]
    pub connector_name: ::core::option::Option<::prost::alloc::string::String>,
    /// connector_direction is the direction of data flow, can be source or sink
    #[prost(enumeration = "TelemetryDatabaseObject", optional, tag = "10")]
    pub object: ::core::option::Option<i32>,
    /// catalog_id is the id of the catalog involves (table_id/source_id/...)
    #[prost(int64, tag = "7")]
    pub catalog_id: i64,
    /// attributes is the additional information of the event: json format ser to string
    #[prost(string, optional, tag = "8")]
    pub attributes: ::core::option::Option<::prost::alloc::string::String>,
    /// node is the node that creates the event
    #[prost(string, tag = "9")]
    pub node: ::prost::alloc::string::String,
    /// mark the event is a test message
    #[prost(bool, tag = "11")]
    pub is_test: bool,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MetaBackend {
    Unspecified = 0,
    Memory = 1,
    Rdb = 3,
}
impl MetaBackend {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            MetaBackend::Unspecified => "META_BACKEND_UNSPECIFIED",
            MetaBackend::Memory => "META_BACKEND_MEMORY",
            MetaBackend::Rdb => "META_BACKEND_RDB",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "META_BACKEND_UNSPECIFIED" => Some(Self::Unspecified),
            "META_BACKEND_MEMORY" => Some(Self::Memory),
            "META_BACKEND_RDB" => Some(Self::Rdb),
            _ => None,
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TelemetryNodeType {
    Unspecified = 0,
    Meta = 1,
    Compute = 2,
    Frontend = 3,
    Compactor = 4,
}
impl TelemetryNodeType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TelemetryNodeType::Unspecified => "TELEMETRY_NODE_TYPE_UNSPECIFIED",
            TelemetryNodeType::Meta => "TELEMETRY_NODE_TYPE_META",
            TelemetryNodeType::Compute => "TELEMETRY_NODE_TYPE_COMPUTE",
            TelemetryNodeType::Frontend => "TELEMETRY_NODE_TYPE_FRONTEND",
            TelemetryNodeType::Compactor => "TELEMETRY_NODE_TYPE_COMPACTOR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TELEMETRY_NODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "TELEMETRY_NODE_TYPE_META" => Some(Self::Meta),
            "TELEMETRY_NODE_TYPE_COMPUTE" => Some(Self::Compute),
            "TELEMETRY_NODE_TYPE_FRONTEND" => Some(Self::Frontend),
            "TELEMETRY_NODE_TYPE_COMPACTOR" => Some(Self::Compactor),
            _ => None,
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TelemetryClusterType {
    Unspecified = 0,
    SingleNode = 1,
    DockerCompose = 2,
    Kubernetes = 3,
    CloudHosted = 4,
}
impl TelemetryClusterType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TelemetryClusterType::Unspecified => "TELEMETRY_CLUSTER_TYPE_UNSPECIFIED",
            TelemetryClusterType::SingleNode => "TELEMETRY_CLUSTER_TYPE_SINGLE_NODE",
            TelemetryClusterType::DockerCompose => {
                "TELEMETRY_CLUSTER_TYPE_DOCKER_COMPOSE"
            }
            TelemetryClusterType::Kubernetes => "TELEMETRY_CLUSTER_TYPE_KUBERNETES",
            TelemetryClusterType::CloudHosted => "TELEMETRY_CLUSTER_TYPE_CLOUD_HOSTED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TELEMETRY_CLUSTER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "TELEMETRY_CLUSTER_TYPE_SINGLE_NODE" => Some(Self::SingleNode),
            "TELEMETRY_CLUSTER_TYPE_DOCKER_COMPOSE" => Some(Self::DockerCompose),
            "TELEMETRY_CLUSTER_TYPE_KUBERNETES" => Some(Self::Kubernetes),
            "TELEMETRY_CLUSTER_TYPE_CLOUD_HOSTED" => Some(Self::CloudHosted),
            _ => None,
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PlanOptimization {
    TableOptimizationUnspecified = 0,
}
impl PlanOptimization {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PlanOptimization::TableOptimizationUnspecified => {
                "TABLE_OPTIMIZATION_UNSPECIFIED"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TABLE_OPTIMIZATION_UNSPECIFIED" => Some(Self::TableOptimizationUnspecified),
            _ => None,
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TelemetryEventStage {
    Unspecified = 0,
    CreateStreamJob = 1,
    UpdateStreamJob = 2,
    DropStreamJob = 3,
    Query = 4,
    Recovery = 5,
}
impl TelemetryEventStage {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TelemetryEventStage::Unspecified => "TELEMETRY_EVENT_STAGE_UNSPECIFIED",
            TelemetryEventStage::CreateStreamJob => {
                "TELEMETRY_EVENT_STAGE_CREATE_STREAM_JOB"
            }
            TelemetryEventStage::UpdateStreamJob => {
                "TELEMETRY_EVENT_STAGE_UPDATE_STREAM_JOB"
            }
            TelemetryEventStage::DropStreamJob => "TELEMETRY_EVENT_STAGE_DROP_STREAM_JOB",
            TelemetryEventStage::Query => "TELEMETRY_EVENT_STAGE_QUERY",
            TelemetryEventStage::Recovery => "TELEMETRY_EVENT_STAGE_RECOVERY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TELEMETRY_EVENT_STAGE_UNSPECIFIED" => Some(Self::Unspecified),
            "TELEMETRY_EVENT_STAGE_CREATE_STREAM_JOB" => Some(Self::CreateStreamJob),
            "TELEMETRY_EVENT_STAGE_UPDATE_STREAM_JOB" => Some(Self::UpdateStreamJob),
            "TELEMETRY_EVENT_STAGE_DROP_STREAM_JOB" => Some(Self::DropStreamJob),
            "TELEMETRY_EVENT_STAGE_QUERY" => Some(Self::Query),
            "TELEMETRY_EVENT_STAGE_RECOVERY" => Some(Self::Recovery),
            _ => None,
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TelemetryDatabaseObject {
    Unspecified = 0,
    Source = 1,
    Mv = 2,
    Table = 3,
    Sink = 4,
    Index = 5,
}
impl TelemetryDatabaseObject {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TelemetryDatabaseObject::Unspecified => {
                "TELEMETRY_DATABASE_OBJECT_UNSPECIFIED"
            }
            TelemetryDatabaseObject::Source => "TELEMETRY_DATABASE_OBJECT_SOURCE",
            TelemetryDatabaseObject::Mv => "TELEMETRY_DATABASE_OBJECT_MV",
            TelemetryDatabaseObject::Table => "TELEMETRY_DATABASE_OBJECT_TABLE",
            TelemetryDatabaseObject::Sink => "TELEMETRY_DATABASE_OBJECT_SINK",
            TelemetryDatabaseObject::Index => "TELEMETRY_DATABASE_OBJECT_INDEX",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TELEMETRY_DATABASE_OBJECT_UNSPECIFIED" => Some(Self::Unspecified),
            "TELEMETRY_DATABASE_OBJECT_SOURCE" => Some(Self::Source),
            "TELEMETRY_DATABASE_OBJECT_MV" => Some(Self::Mv),
            "TELEMETRY_DATABASE_OBJECT_TABLE" => Some(Self::Table),
            "TELEMETRY_DATABASE_OBJECT_SINK" => Some(Self::Sink),
            "TELEMETRY_DATABASE_OBJECT_INDEX" => Some(Self::Index),
            _ => None,
        }
    }
}