1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct Status {
5 #[prost(enumeration = "status::Code", tag = "1")]
6 pub code: i32,
7 #[prost(string, tag = "2")]
8 pub message: ::prost::alloc::string::String,
9}
10pub mod status {
12 #[derive(prost_helpers::AnyPB)]
13 #[derive(
14 Clone,
15 Copy,
16 Debug,
17 PartialEq,
18 Eq,
19 Hash,
20 PartialOrd,
21 Ord,
22 ::prost::Enumeration
23 )]
24 #[repr(i32)]
25 pub enum Code {
26 Unspecified = 0,
27 Ok = 1,
28 UnknownWorker = 2,
29 }
30 impl Code {
31 pub fn as_str_name(&self) -> &'static str {
36 match self {
37 Self::Unspecified => "UNSPECIFIED",
38 Self::Ok => "OK",
39 Self::UnknownWorker => "UNKNOWN_WORKER",
40 }
41 }
42 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
44 match value {
45 "UNSPECIFIED" => Some(Self::Unspecified),
46 "OK" => Some(Self::Ok),
47 "UNKNOWN_WORKER" => Some(Self::UnknownWorker),
48 _ => None,
49 }
50 }
51 }
52}
53#[derive(prost_helpers::AnyPB)]
54#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
55pub struct HostAddress {
56 #[prost(string, tag = "1")]
57 pub host: ::prost::alloc::string::String,
58 #[prost(int32, tag = "2")]
59 pub port: i32,
60}
61#[derive(prost_helpers::AnyPB)]
63#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
64pub struct ActorInfo {
65 #[prost(uint32, tag = "1", wrapper = "crate::id::ActorId")]
66 pub actor_id: crate::id::ActorId,
67 #[prost(message, optional, tag = "2")]
68 pub host: ::core::option::Option<HostAddress>,
69 #[prost(uint64, tag = "3", wrapper = "crate::id::PartialGraphId")]
70 pub partial_graph_id: crate::id::PartialGraphId,
71}
72#[derive(prost_helpers::AnyPB)]
74#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
75pub struct ActorLocation {
76 #[prost(uint32, tag = "2", wrapper = "crate::id::WorkerId")]
77 pub worker_node_id: crate::id::WorkerId,
78}
79#[derive(prost_helpers::AnyPB)]
80#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
81pub struct WorkerNode {
82 #[prost(uint32, tag = "1", wrapper = "crate::id::WorkerId")]
83 pub id: crate::id::WorkerId,
84 #[prost(enumeration = "WorkerType", tag = "2")]
85 pub r#type: i32,
86 #[prost(message, optional, tag = "3")]
87 pub host: ::core::option::Option<HostAddress>,
88 #[prost(enumeration = "worker_node::State", tag = "4")]
89 pub state: i32,
90 #[prost(message, optional, tag = "6")]
91 pub property: ::core::option::Option<worker_node::Property>,
92 #[prost(uint32, optional, tag = "7")]
94 pub transactional_id: ::core::option::Option<u32>,
95 #[prost(message, optional, tag = "8")]
98 pub resource: ::core::option::Option<worker_node::Resource>,
99 #[prost(uint64, optional, tag = "9")]
103 pub started_at: ::core::option::Option<u64>,
104}
105pub mod worker_node {
107 #[derive(prost_helpers::AnyPB)]
109 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
110 pub struct Property {
111 #[prost(bool, tag = "1")]
112 pub is_streaming: bool,
113 #[prost(bool, tag = "2")]
114 pub is_serving: bool,
115 #[prost(string, tag = "4")]
117 pub internal_rpc_host_addr: ::prost::alloc::string::String,
118 #[prost(uint32, tag = "6")]
119 pub parallelism: u32,
120 #[prost(string, optional, tag = "7")]
122 pub resource_group: ::core::option::Option<::prost::alloc::string::String>,
123 #[prost(bool, tag = "8")]
125 pub is_iceberg_compactor: bool,
126 }
127 #[derive(prost_helpers::AnyPB)]
128 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
129 pub struct Resource {
130 #[prost(string, tag = "1")]
131 pub rw_version: ::prost::alloc::string::String,
132 #[prost(uint64, tag = "2")]
133 pub total_memory_bytes: u64,
134 #[prost(uint64, tag = "3")]
135 pub total_cpu_cores: u64,
136 #[prost(string, tag = "4")]
139 pub hostname: ::prost::alloc::string::String,
140 }
141 #[derive(prost_helpers::AnyPB)]
142 #[derive(
143 Clone,
144 Copy,
145 Debug,
146 PartialEq,
147 Eq,
148 Hash,
149 PartialOrd,
150 Ord,
151 ::prost::Enumeration
152 )]
153 #[repr(i32)]
154 pub enum State {
155 Unspecified = 0,
156 Starting = 1,
157 Running = 2,
158 }
159 impl State {
160 pub fn as_str_name(&self) -> &'static str {
165 match self {
166 Self::Unspecified => "UNSPECIFIED",
167 Self::Starting => "STARTING",
168 Self::Running => "RUNNING",
169 }
170 }
171 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
173 match value {
174 "UNSPECIFIED" => Some(Self::Unspecified),
175 "STARTING" => Some(Self::Starting),
176 "RUNNING" => Some(Self::Running),
177 _ => None,
178 }
179 }
180 }
181}
182#[derive(prost_helpers::AnyPB)]
183#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
184pub struct ClusterResource {
185 #[prost(uint64, tag = "1")]
186 pub total_memory_bytes: u64,
187 #[prost(uint64, tag = "2")]
188 pub total_cpu_cores: u64,
189}
190#[derive(prost_helpers::AnyPB)]
191#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
192pub struct Buffer {
193 #[prost(enumeration = "buffer::CompressionType", tag = "1")]
194 pub compression: i32,
195 #[prost(bytes = "vec", tag = "2")]
196 pub body: ::prost::alloc::vec::Vec<u8>,
197}
198pub mod buffer {
200 #[derive(prost_helpers::AnyPB)]
201 #[derive(
202 Clone,
203 Copy,
204 Debug,
205 PartialEq,
206 Eq,
207 Hash,
208 PartialOrd,
209 Ord,
210 ::prost::Enumeration
211 )]
212 #[repr(i32)]
213 pub enum CompressionType {
214 Unspecified = 0,
215 None = 1,
216 }
217 impl CompressionType {
218 pub fn as_str_name(&self) -> &'static str {
223 match self {
224 Self::Unspecified => "UNSPECIFIED",
225 Self::None => "NONE",
226 }
227 }
228 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
230 match value {
231 "UNSPECIFIED" => Some(Self::Unspecified),
232 "NONE" => Some(Self::None),
233 _ => None,
234 }
235 }
236 }
237}
238#[derive(prost_helpers::AnyPB)]
240#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
241pub struct WorkerSlotMapping {
242 #[prost(uint32, repeated, tag = "1")]
243 pub original_indices: ::prost::alloc::vec::Vec<u32>,
244 #[prost(uint64, repeated, tag = "2")]
245 pub data: ::prost::alloc::vec::Vec<u64>,
246}
247#[derive(prost_helpers::AnyPB)]
248#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
249pub struct BatchQueryCommittedEpoch {
250 #[prost(uint64, tag = "1")]
251 pub epoch: u64,
252 #[prost(uint64, tag = "2", wrapper = "crate::id::HummockVersionId")]
253 pub hummock_version_id: crate::id::HummockVersionId,
254}
255#[derive(prost_helpers::AnyPB)]
257#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
258pub struct BatchQueryLatestCommittedEpoch {
259 #[prost(uint64, tag = "1", wrapper = "crate::id::HummockVersionId")]
261 pub hummock_version_id: crate::id::HummockVersionId,
262}
263#[derive(prost_helpers::AnyPB)]
264#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
265pub struct BatchQueryEpoch {
266 #[prost(oneof = "batch_query_epoch::Epoch", tags = "1, 2, 3, 4, 5")]
267 pub epoch: ::core::option::Option<batch_query_epoch::Epoch>,
268}
269pub mod batch_query_epoch {
271 #[derive(prost_helpers::AnyPB)]
272 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
273 pub enum Epoch {
274 #[prost(message, tag = "1")]
275 Committed(super::BatchQueryCommittedEpoch),
276 #[prost(uint64, tag = "2")]
277 Current(u64),
278 #[prost(uint64, tag = "3")]
279 Backup(u64),
280 #[prost(uint64, tag = "4")]
281 TimeTravel(u64),
282 #[prost(message, tag = "5")]
283 LatestCommitted(super::BatchQueryLatestCommittedEpoch),
284 }
285}
286#[derive(prost_helpers::AnyPB)]
287#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
288pub struct OrderType {
289 #[prost(enumeration = "Direction", tag = "1")]
290 pub direction: i32,
291 #[prost(enumeration = "NullsAre", tag = "2")]
292 pub nulls_are: i32,
293}
294#[derive(prost_helpers::AnyPB)]
296#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
297pub struct ColumnOrder {
298 #[prost(uint32, tag = "1")]
299 pub column_index: u32,
300 #[prost(message, optional, tag = "2")]
301 pub order_type: ::core::option::Option<OrderType>,
302}
303#[derive(prost_helpers::AnyPB)]
304#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
305pub struct Uint32Vector {
306 #[prost(uint32, repeated, tag = "1")]
307 pub data: ::prost::alloc::vec::Vec<u32>,
308}
309#[derive(prost_helpers::AnyPB)]
310#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
311pub struct OptionalUint32 {
312 #[prost(uint32, optional, tag = "1")]
313 pub value: ::core::option::Option<u32>,
314}
315#[derive(prost_helpers::AnyPB)]
316#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
317pub struct OptionalUint64 {
318 #[prost(uint64, optional, tag = "1")]
319 pub value: ::core::option::Option<u64>,
320}
321#[derive(prost_helpers::AnyPB)]
322#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
323#[repr(i32)]
324pub enum WorkerType {
325 Unspecified = 0,
326 Frontend = 1,
327 ComputeNode = 2,
328 RiseCtl = 3,
329 Compactor = 4,
330 Meta = 5,
331}
332impl WorkerType {
333 pub fn as_str_name(&self) -> &'static str {
338 match self {
339 Self::Unspecified => "WORKER_TYPE_UNSPECIFIED",
340 Self::Frontend => "WORKER_TYPE_FRONTEND",
341 Self::ComputeNode => "WORKER_TYPE_COMPUTE_NODE",
342 Self::RiseCtl => "WORKER_TYPE_RISE_CTL",
343 Self::Compactor => "WORKER_TYPE_COMPACTOR",
344 Self::Meta => "WORKER_TYPE_META",
345 }
346 }
347 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
349 match value {
350 "WORKER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
351 "WORKER_TYPE_FRONTEND" => Some(Self::Frontend),
352 "WORKER_TYPE_COMPUTE_NODE" => Some(Self::ComputeNode),
353 "WORKER_TYPE_RISE_CTL" => Some(Self::RiseCtl),
354 "WORKER_TYPE_COMPACTOR" => Some(Self::Compactor),
355 "WORKER_TYPE_META" => Some(Self::Meta),
356 _ => None,
357 }
358 }
359}
360#[derive(prost_helpers::AnyPB)]
361#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
362#[repr(i32)]
363pub enum Direction {
364 Unspecified = 0,
365 Ascending = 1,
366 Descending = 2,
367}
368impl Direction {
369 pub fn as_str_name(&self) -> &'static str {
374 match self {
375 Self::Unspecified => "DIRECTION_UNSPECIFIED",
376 Self::Ascending => "DIRECTION_ASCENDING",
377 Self::Descending => "DIRECTION_DESCENDING",
378 }
379 }
380 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
382 match value {
383 "DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
384 "DIRECTION_ASCENDING" => Some(Self::Ascending),
385 "DIRECTION_DESCENDING" => Some(Self::Descending),
386 _ => None,
387 }
388 }
389}
390#[derive(prost_helpers::AnyPB)]
391#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
392#[repr(i32)]
393pub enum NullsAre {
394 Unspecified = 0,
395 Largest = 1,
396 Smallest = 2,
397}
398impl NullsAre {
399 pub fn as_str_name(&self) -> &'static str {
404 match self {
405 Self::Unspecified => "NULLS_ARE_UNSPECIFIED",
406 Self::Largest => "NULLS_ARE_LARGEST",
407 Self::Smallest => "NULLS_ARE_SMALLEST",
408 }
409 }
410 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
412 match value {
413 "NULLS_ARE_UNSPECIFIED" => Some(Self::Unspecified),
414 "NULLS_ARE_LARGEST" => Some(Self::Largest),
415 "NULLS_ARE_SMALLEST" => Some(Self::Smallest),
416 _ => None,
417 }
418 }
419}
420#[derive(prost_helpers::AnyPB)]
421#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
422#[repr(i32)]
423pub enum ObjectType {
424 Unspecified = 0,
425 Database = 1,
426 Schema = 2,
427 Table = 3,
428 Mview = 4,
429 Source = 5,
430 Sink = 6,
431 View = 7,
432 Index = 8,
433 Function = 9,
434 Connection = 10,
435 Subscription = 11,
436 Secret = 12,
437}
438impl ObjectType {
439 pub fn as_str_name(&self) -> &'static str {
444 match self {
445 Self::Unspecified => "UNSPECIFIED",
446 Self::Database => "DATABASE",
447 Self::Schema => "SCHEMA",
448 Self::Table => "TABLE",
449 Self::Mview => "MVIEW",
450 Self::Source => "SOURCE",
451 Self::Sink => "SINK",
452 Self::View => "VIEW",
453 Self::Index => "INDEX",
454 Self::Function => "FUNCTION",
455 Self::Connection => "CONNECTION",
456 Self::Subscription => "SUBSCRIPTION",
457 Self::Secret => "SECRET",
458 }
459 }
460 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
462 match value {
463 "UNSPECIFIED" => Some(Self::Unspecified),
464 "DATABASE" => Some(Self::Database),
465 "SCHEMA" => Some(Self::Schema),
466 "TABLE" => Some(Self::Table),
467 "MVIEW" => Some(Self::Mview),
468 "SOURCE" => Some(Self::Source),
469 "SINK" => Some(Self::Sink),
470 "VIEW" => Some(Self::View),
471 "INDEX" => Some(Self::Index),
472 "FUNCTION" => Some(Self::Function),
473 "CONNECTION" => Some(Self::Connection),
474 "SUBSCRIPTION" => Some(Self::Subscription),
475 "SECRET" => Some(Self::Secret),
476 _ => None,
477 }
478 }
479}
480#[derive(prost_helpers::AnyPB)]
481#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
482#[repr(i32)]
483pub enum DistanceType {
484 Unspecified = 0,
485 L1 = 1,
486 L2Sqr = 2,
487 Cosine = 3,
488 InnerProduct = 4,
489}
490impl DistanceType {
491 pub fn as_str_name(&self) -> &'static str {
496 match self {
497 Self::Unspecified => "DISTANCE_TYPE_UNSPECIFIED",
498 Self::L1 => "DISTANCE_TYPE_L1",
499 Self::L2Sqr => "DISTANCE_TYPE_L2_SQR",
500 Self::Cosine => "DISTANCE_TYPE_COSINE",
501 Self::InnerProduct => "DISTANCE_TYPE_INNER_PRODUCT",
502 }
503 }
504 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
506 match value {
507 "DISTANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
508 "DISTANCE_TYPE_L1" => Some(Self::L1),
509 "DISTANCE_TYPE_L2_SQR" => Some(Self::L2Sqr),
510 "DISTANCE_TYPE_COSINE" => Some(Self::Cosine),
511 "DISTANCE_TYPE_INNER_PRODUCT" => Some(Self::InnerProduct),
512 _ => None,
513 }
514 }
515}
516#[derive(prost_helpers::AnyPB)]
517#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
518#[repr(i32)]
519pub enum ThrottleType {
520 Unspecified = 0,
521 Dml = 1,
522 Backfill = 2,
523 Source = 3,
524 Sink = 4,
525}
526impl ThrottleType {
527 pub fn as_str_name(&self) -> &'static str {
532 match self {
533 Self::Unspecified => "THROTTLE_TYPE_UNSPECIFIED",
534 Self::Dml => "THROTTLE_TYPE_DML",
535 Self::Backfill => "THROTTLE_TYPE_BACKFILL",
536 Self::Source => "THROTTLE_TYPE_SOURCE",
537 Self::Sink => "THROTTLE_TYPE_SINK",
538 }
539 }
540 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
542 match value {
543 "THROTTLE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
544 "THROTTLE_TYPE_DML" => Some(Self::Dml),
545 "THROTTLE_TYPE_BACKFILL" => Some(Self::Backfill),
546 "THROTTLE_TYPE_SOURCE" => Some(Self::Source),
547 "THROTTLE_TYPE_SINK" => Some(Self::Sink),
548 _ => None,
549 }
550 }
551}