risingwave_pb/
common.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
// This file is @generated by prost-build.
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Status {
    #[prost(enumeration = "status::Code", tag = "1")]
    pub code: i32,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Status`.
pub mod status {
    #[derive(prost_helpers::AnyPB)]
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Code {
        Unspecified = 0,
        Ok = 1,
        UnknownWorker = 2,
    }
    impl Code {
        /// 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 {
                Code::Unspecified => "UNSPECIFIED",
                Code::Ok => "OK",
                Code::UnknownWorker => "UNKNOWN_WORKER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNSPECIFIED" => Some(Self::Unspecified),
                "OK" => Some(Self::Ok),
                "UNKNOWN_WORKER" => Some(Self::UnknownWorker),
                _ => None,
            }
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HostAddress {
    #[prost(string, tag = "1")]
    pub host: ::prost::alloc::string::String,
    #[prost(int32, tag = "2")]
    pub port: i32,
}
/// Encode which host machine an actor resides.
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActorInfo {
    #[prost(uint32, tag = "1")]
    pub actor_id: u32,
    #[prost(message, optional, tag = "2")]
    pub host: ::core::option::Option<HostAddress>,
}
/// renamed from `ParallelUnit`
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ActorLocation {
    #[prost(uint32, tag = "2")]
    pub worker_node_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerNode {
    #[prost(uint32, tag = "1")]
    pub id: u32,
    #[prost(enumeration = "WorkerType", tag = "2")]
    pub r#type: i32,
    #[prost(message, optional, tag = "3")]
    pub host: ::core::option::Option<HostAddress>,
    #[prost(enumeration = "worker_node::State", tag = "4")]
    pub state: i32,
    #[prost(message, optional, tag = "6")]
    pub property: ::core::option::Option<worker_node::Property>,
    /// Ranges from 0 to 1023, used to generate the machine ID field in the global unique ID.
    #[prost(uint32, optional, tag = "7")]
    pub transactional_id: ::core::option::Option<u32>,
    /// Resource spec.
    /// It's populated by meta node with the value reported by worker node, when the worker node is added by meta node.
    /// It's not persistent in meta store.
    #[prost(message, optional, tag = "8")]
    pub resource: ::core::option::Option<worker_node::Resource>,
    /// Timestamp the worker node is added by meta node, in seconds.
    /// It's populated by meta node, when the worker node is added by meta node.
    /// It's not persistent in meta store.
    #[prost(uint64, optional, tag = "9")]
    pub started_at: ::core::option::Option<u64>,
    #[prost(uint32, tag = "10")]
    pub parallelism: u32,
    /// Meta may assign labels to worker nodes to partition workload by label.
    /// This is used for serverless backfilling of materialized views.
    #[prost(string, tag = "11")]
    pub node_label: ::prost::alloc::string::String,
}
/// Nested message and enum types in `WorkerNode`.
pub mod worker_node {
    /// Fields in `Property` that doesn't fit current worker type are just ignored by receiver.
    #[derive(prost_helpers::AnyPB)]
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Property {
        #[prost(bool, tag = "1")]
        pub is_streaming: bool,
        #[prost(bool, tag = "2")]
        pub is_serving: bool,
        #[prost(bool, tag = "3")]
        pub is_unschedulable: bool,
        /// This is used for frontend node to register its rpc address
        #[prost(string, tag = "4")]
        pub internal_rpc_host_addr: ::prost::alloc::string::String,
    }
    #[derive(prost_helpers::AnyPB)]
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Resource {
        #[prost(string, tag = "1")]
        pub rw_version: ::prost::alloc::string::String,
        #[prost(uint64, tag = "2")]
        pub total_memory_bytes: u64,
        #[prost(uint64, tag = "3")]
        pub total_cpu_cores: u64,
    }
    #[derive(prost_helpers::AnyPB)]
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        Unspecified = 0,
        Starting = 1,
        Running = 2,
    }
    impl State {
        /// 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 {
                State::Unspecified => "UNSPECIFIED",
                State::Starting => "STARTING",
                State::Running => "RUNNING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNSPECIFIED" => Some(Self::Unspecified),
                "STARTING" => Some(Self::Starting),
                "RUNNING" => Some(Self::Running),
                _ => None,
            }
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Buffer {
    #[prost(enumeration = "buffer::CompressionType", tag = "1")]
    pub compression: i32,
    #[prost(bytes = "vec", tag = "2")]
    pub body: ::prost::alloc::vec::Vec<u8>,
}
/// Nested message and enum types in `Buffer`.
pub mod buffer {
    #[derive(prost_helpers::AnyPB)]
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum CompressionType {
        Unspecified = 0,
        None = 1,
    }
    impl CompressionType {
        /// 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 {
                CompressionType::Unspecified => "UNSPECIFIED",
                CompressionType::None => "NONE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNSPECIFIED" => Some(Self::Unspecified),
                "NONE" => Some(Self::None),
                _ => None,
            }
        }
    }
}
/// Vnode mapping for stream fragments. Stores mapping from virtual node to (worker id, slot index).
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerSlotMapping {
    #[prost(uint32, repeated, tag = "1")]
    pub original_indices: ::prost::alloc::vec::Vec<u32>,
    #[prost(uint64, repeated, tag = "2")]
    pub data: ::prost::alloc::vec::Vec<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BatchQueryCommittedEpoch {
    #[prost(uint64, tag = "1")]
    pub epoch: u64,
    #[prost(uint64, tag = "2")]
    pub hummock_version_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BatchQueryEpoch {
    #[prost(oneof = "batch_query_epoch::Epoch", tags = "1, 2, 3, 4")]
    pub epoch: ::core::option::Option<batch_query_epoch::Epoch>,
}
/// Nested message and enum types in `BatchQueryEpoch`.
pub mod batch_query_epoch {
    #[derive(prost_helpers::AnyPB)]
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Epoch {
        #[prost(message, tag = "1")]
        Committed(super::BatchQueryCommittedEpoch),
        #[prost(uint64, tag = "2")]
        Current(u64),
        #[prost(uint64, tag = "3")]
        Backup(u64),
        #[prost(uint64, tag = "4")]
        TimeTravel(u64),
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OrderType {
    #[prost(enumeration = "Direction", tag = "1")]
    pub direction: i32,
    #[prost(enumeration = "NullsAre", tag = "2")]
    pub nulls_are: i32,
}
/// Column index with an order type (ASC or DESC). Used to represent a sort key (`repeated ColumnOrder`).
#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ColumnOrder {
    #[prost(uint32, tag = "1")]
    pub column_index: u32,
    #[prost(message, optional, tag = "2")]
    pub order_type: ::core::option::Option<OrderType>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WorkerType {
    Unspecified = 0,
    Frontend = 1,
    ComputeNode = 2,
    RiseCtl = 3,
    Compactor = 4,
    Meta = 5,
}
impl WorkerType {
    /// 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 {
            WorkerType::Unspecified => "WORKER_TYPE_UNSPECIFIED",
            WorkerType::Frontend => "WORKER_TYPE_FRONTEND",
            WorkerType::ComputeNode => "WORKER_TYPE_COMPUTE_NODE",
            WorkerType::RiseCtl => "WORKER_TYPE_RISE_CTL",
            WorkerType::Compactor => "WORKER_TYPE_COMPACTOR",
            WorkerType::Meta => "WORKER_TYPE_META",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "WORKER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "WORKER_TYPE_FRONTEND" => Some(Self::Frontend),
            "WORKER_TYPE_COMPUTE_NODE" => Some(Self::ComputeNode),
            "WORKER_TYPE_RISE_CTL" => Some(Self::RiseCtl),
            "WORKER_TYPE_COMPACTOR" => Some(Self::Compactor),
            "WORKER_TYPE_META" => Some(Self::Meta),
            _ => None,
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Direction {
    Unspecified = 0,
    Ascending = 1,
    Descending = 2,
}
impl Direction {
    /// 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 {
            Direction::Unspecified => "DIRECTION_UNSPECIFIED",
            Direction::Ascending => "DIRECTION_ASCENDING",
            Direction::Descending => "DIRECTION_DESCENDING",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
            "DIRECTION_ASCENDING" => Some(Self::Ascending),
            "DIRECTION_DESCENDING" => Some(Self::Descending),
            _ => None,
        }
    }
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NullsAre {
    Unspecified = 0,
    Largest = 1,
    Smallest = 2,
}
impl NullsAre {
    /// 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 {
            NullsAre::Unspecified => "NULLS_ARE_UNSPECIFIED",
            NullsAre::Largest => "NULLS_ARE_LARGEST",
            NullsAre::Smallest => "NULLS_ARE_SMALLEST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NULLS_ARE_UNSPECIFIED" => Some(Self::Unspecified),
            "NULLS_ARE_LARGEST" => Some(Self::Largest),
            "NULLS_ARE_SMALLEST" => Some(Self::Smallest),
            _ => None,
        }
    }
}