1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, ::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, ::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, ::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, ::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, ::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")]
99 pub resource: ::core::option::Option<worker_node::Resource>,
100 #[prost(uint64, optional, tag = "9")]
104 pub started_at: ::core::option::Option<u64>,
105}
106pub mod worker_node {
108 #[derive(prost_helpers::AnyPB)]
110 #[derive(Clone, PartialEq, ::prost::Message)]
111 pub struct Property {
112 #[prost(bool, tag = "1")]
113 pub is_streaming: bool,
114 #[prost(bool, tag = "2")]
115 pub is_serving: bool,
116 #[prost(bool, tag = "3")]
117 pub is_unschedulable: bool,
118 #[prost(string, tag = "4")]
120 pub internal_rpc_host_addr: ::prost::alloc::string::String,
121 #[prost(uint32, tag = "6")]
122 pub parallelism: u32,
123 #[prost(string, optional, tag = "7")]
125 pub resource_group: ::core::option::Option<::prost::alloc::string::String>,
126 #[prost(bool, tag = "8")]
128 pub is_iceberg_compactor: bool,
129 }
130 #[derive(prost_helpers::AnyPB)]
131 #[derive(Clone, PartialEq, ::prost::Message)]
132 pub struct Resource {
133 #[prost(string, tag = "1")]
134 pub rw_version: ::prost::alloc::string::String,
135 #[prost(uint64, tag = "2")]
136 pub total_memory_bytes: u64,
137 #[prost(uint64, tag = "3")]
138 pub total_cpu_cores: u64,
139 #[prost(string, tag = "4")]
142 pub hostname: ::prost::alloc::string::String,
143 }
144 #[derive(prost_helpers::AnyPB)]
145 #[derive(
146 Clone,
147 Copy,
148 Debug,
149 PartialEq,
150 Eq,
151 Hash,
152 PartialOrd,
153 Ord,
154 ::prost::Enumeration
155 )]
156 #[repr(i32)]
157 pub enum State {
158 Unspecified = 0,
159 Starting = 1,
160 Running = 2,
161 }
162 impl State {
163 pub fn as_str_name(&self) -> &'static str {
168 match self {
169 Self::Unspecified => "UNSPECIFIED",
170 Self::Starting => "STARTING",
171 Self::Running => "RUNNING",
172 }
173 }
174 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
176 match value {
177 "UNSPECIFIED" => Some(Self::Unspecified),
178 "STARTING" => Some(Self::Starting),
179 "RUNNING" => Some(Self::Running),
180 _ => None,
181 }
182 }
183 }
184}
185#[derive(prost_helpers::AnyPB)]
186#[derive(Clone, Copy, PartialEq, ::prost::Message)]
187pub struct ClusterResource {
188 #[prost(uint64, tag = "1")]
189 pub total_memory_bytes: u64,
190 #[prost(uint64, tag = "2")]
191 pub total_cpu_cores: u64,
192}
193#[derive(prost_helpers::AnyPB)]
194#[derive(Eq)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct Buffer {
197 #[prost(enumeration = "buffer::CompressionType", tag = "1")]
198 pub compression: i32,
199 #[prost(bytes = "vec", tag = "2")]
200 pub body: ::prost::alloc::vec::Vec<u8>,
201}
202pub mod buffer {
204 #[derive(prost_helpers::AnyPB)]
205 #[derive(
206 Clone,
207 Copy,
208 Debug,
209 PartialEq,
210 Eq,
211 Hash,
212 PartialOrd,
213 Ord,
214 ::prost::Enumeration
215 )]
216 #[repr(i32)]
217 pub enum CompressionType {
218 Unspecified = 0,
219 None = 1,
220 }
221 impl CompressionType {
222 pub fn as_str_name(&self) -> &'static str {
227 match self {
228 Self::Unspecified => "UNSPECIFIED",
229 Self::None => "NONE",
230 }
231 }
232 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
234 match value {
235 "UNSPECIFIED" => Some(Self::Unspecified),
236 "NONE" => Some(Self::None),
237 _ => None,
238 }
239 }
240 }
241}
242#[derive(prost_helpers::AnyPB)]
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct WorkerSlotMapping {
246 #[prost(uint32, repeated, tag = "1")]
247 pub original_indices: ::prost::alloc::vec::Vec<u32>,
248 #[prost(uint64, repeated, tag = "2")]
249 pub data: ::prost::alloc::vec::Vec<u64>,
250}
251#[derive(prost_helpers::AnyPB)]
252#[derive(Clone, Copy, PartialEq, ::prost::Message)]
253pub struct BatchQueryCommittedEpoch {
254 #[prost(uint64, tag = "1")]
255 pub epoch: u64,
256 #[prost(uint64, tag = "2")]
257 pub hummock_version_id: u64,
258}
259#[derive(prost_helpers::AnyPB)]
260#[derive(Clone, Copy, PartialEq, ::prost::Message)]
261pub struct BatchQueryEpoch {
262 #[prost(oneof = "batch_query_epoch::Epoch", tags = "1, 2, 3, 4")]
263 pub epoch: ::core::option::Option<batch_query_epoch::Epoch>,
264}
265pub mod batch_query_epoch {
267 #[derive(prost_helpers::AnyPB)]
268 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
269 pub enum Epoch {
270 #[prost(message, tag = "1")]
271 Committed(super::BatchQueryCommittedEpoch),
272 #[prost(uint64, tag = "2")]
273 Current(u64),
274 #[prost(uint64, tag = "3")]
275 Backup(u64),
276 #[prost(uint64, tag = "4")]
277 TimeTravel(u64),
278 }
279}
280#[derive(prost_helpers::AnyPB)]
281#[derive(Eq, Hash)]
282#[derive(Clone, Copy, PartialEq, ::prost::Message)]
283pub struct OrderType {
284 #[prost(enumeration = "Direction", tag = "1")]
285 pub direction: i32,
286 #[prost(enumeration = "NullsAre", tag = "2")]
287 pub nulls_are: i32,
288}
289#[derive(prost_helpers::AnyPB)]
291#[derive(Eq, Hash)]
292#[derive(Clone, Copy, PartialEq, ::prost::Message)]
293pub struct ColumnOrder {
294 #[prost(uint32, tag = "1")]
295 pub column_index: u32,
296 #[prost(message, optional, tag = "2")]
297 pub order_type: ::core::option::Option<OrderType>,
298}
299#[derive(prost_helpers::AnyPB)]
300#[derive(Clone, PartialEq, ::prost::Message)]
301pub struct Uint32Vector {
302 #[prost(uint32, repeated, tag = "1")]
303 pub data: ::prost::alloc::vec::Vec<u32>,
304}
305#[derive(prost_helpers::AnyPB)]
306#[derive(Clone, Copy, PartialEq, ::prost::Message)]
307pub struct OptionalUint32 {
308 #[prost(uint32, optional, tag = "1")]
309 pub value: ::core::option::Option<u32>,
310}
311#[derive(prost_helpers::AnyPB)]
312#[derive(Clone, Copy, PartialEq, ::prost::Message)]
313pub struct OptionalUint64 {
314 #[prost(uint64, optional, tag = "1")]
315 pub value: ::core::option::Option<u64>,
316}
317#[derive(prost_helpers::AnyPB)]
318#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
319#[repr(i32)]
320pub enum WorkerType {
321 Unspecified = 0,
322 Frontend = 1,
323 ComputeNode = 2,
324 RiseCtl = 3,
325 Compactor = 4,
326 Meta = 5,
327}
328impl WorkerType {
329 pub fn as_str_name(&self) -> &'static str {
334 match self {
335 Self::Unspecified => "WORKER_TYPE_UNSPECIFIED",
336 Self::Frontend => "WORKER_TYPE_FRONTEND",
337 Self::ComputeNode => "WORKER_TYPE_COMPUTE_NODE",
338 Self::RiseCtl => "WORKER_TYPE_RISE_CTL",
339 Self::Compactor => "WORKER_TYPE_COMPACTOR",
340 Self::Meta => "WORKER_TYPE_META",
341 }
342 }
343 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
345 match value {
346 "WORKER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
347 "WORKER_TYPE_FRONTEND" => Some(Self::Frontend),
348 "WORKER_TYPE_COMPUTE_NODE" => Some(Self::ComputeNode),
349 "WORKER_TYPE_RISE_CTL" => Some(Self::RiseCtl),
350 "WORKER_TYPE_COMPACTOR" => Some(Self::Compactor),
351 "WORKER_TYPE_META" => Some(Self::Meta),
352 _ => None,
353 }
354 }
355}
356#[derive(prost_helpers::AnyPB)]
357#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
358#[repr(i32)]
359pub enum Direction {
360 Unspecified = 0,
361 Ascending = 1,
362 Descending = 2,
363}
364impl Direction {
365 pub fn as_str_name(&self) -> &'static str {
370 match self {
371 Self::Unspecified => "DIRECTION_UNSPECIFIED",
372 Self::Ascending => "DIRECTION_ASCENDING",
373 Self::Descending => "DIRECTION_DESCENDING",
374 }
375 }
376 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
378 match value {
379 "DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
380 "DIRECTION_ASCENDING" => Some(Self::Ascending),
381 "DIRECTION_DESCENDING" => Some(Self::Descending),
382 _ => None,
383 }
384 }
385}
386#[derive(prost_helpers::AnyPB)]
387#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
388#[repr(i32)]
389pub enum NullsAre {
390 Unspecified = 0,
391 Largest = 1,
392 Smallest = 2,
393}
394impl NullsAre {
395 pub fn as_str_name(&self) -> &'static str {
400 match self {
401 Self::Unspecified => "NULLS_ARE_UNSPECIFIED",
402 Self::Largest => "NULLS_ARE_LARGEST",
403 Self::Smallest => "NULLS_ARE_SMALLEST",
404 }
405 }
406 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
408 match value {
409 "NULLS_ARE_UNSPECIFIED" => Some(Self::Unspecified),
410 "NULLS_ARE_LARGEST" => Some(Self::Largest),
411 "NULLS_ARE_SMALLEST" => Some(Self::Smallest),
412 _ => None,
413 }
414 }
415}
416#[derive(prost_helpers::AnyPB)]
417#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
418#[repr(i32)]
419pub enum ObjectType {
420 Unspecified = 0,
421 Database = 1,
422 Schema = 2,
423 Table = 3,
424 Mview = 4,
425 Source = 5,
426 Sink = 6,
427 View = 7,
428 Index = 8,
429 Function = 9,
430 Connection = 10,
431 Subscription = 11,
432 Secret = 12,
433}
434impl ObjectType {
435 pub fn as_str_name(&self) -> &'static str {
440 match self {
441 Self::Unspecified => "UNSPECIFIED",
442 Self::Database => "DATABASE",
443 Self::Schema => "SCHEMA",
444 Self::Table => "TABLE",
445 Self::Mview => "MVIEW",
446 Self::Source => "SOURCE",
447 Self::Sink => "SINK",
448 Self::View => "VIEW",
449 Self::Index => "INDEX",
450 Self::Function => "FUNCTION",
451 Self::Connection => "CONNECTION",
452 Self::Subscription => "SUBSCRIPTION",
453 Self::Secret => "SECRET",
454 }
455 }
456 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
458 match value {
459 "UNSPECIFIED" => Some(Self::Unspecified),
460 "DATABASE" => Some(Self::Database),
461 "SCHEMA" => Some(Self::Schema),
462 "TABLE" => Some(Self::Table),
463 "MVIEW" => Some(Self::Mview),
464 "SOURCE" => Some(Self::Source),
465 "SINK" => Some(Self::Sink),
466 "VIEW" => Some(Self::View),
467 "INDEX" => Some(Self::Index),
468 "FUNCTION" => Some(Self::Function),
469 "CONNECTION" => Some(Self::Connection),
470 "SUBSCRIPTION" => Some(Self::Subscription),
471 "SECRET" => Some(Self::Secret),
472 _ => None,
473 }
474 }
475}
476#[derive(prost_helpers::AnyPB)]
477#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
478#[repr(i32)]
479pub enum DistanceType {
480 Unspecified = 0,
481 L1 = 1,
482 L2Sqr = 2,
483 Cosine = 3,
484 InnerProduct = 4,
485}
486impl DistanceType {
487 pub fn as_str_name(&self) -> &'static str {
492 match self {
493 Self::Unspecified => "DISTANCE_TYPE_UNSPECIFIED",
494 Self::L1 => "DISTANCE_TYPE_L1",
495 Self::L2Sqr => "DISTANCE_TYPE_L2_SQR",
496 Self::Cosine => "DISTANCE_TYPE_COSINE",
497 Self::InnerProduct => "DISTANCE_TYPE_INNER_PRODUCT",
498 }
499 }
500 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
502 match value {
503 "DISTANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
504 "DISTANCE_TYPE_L1" => Some(Self::L1),
505 "DISTANCE_TYPE_L2_SQR" => Some(Self::L2Sqr),
506 "DISTANCE_TYPE_COSINE" => Some(Self::Cosine),
507 "DISTANCE_TYPE_INNER_PRODUCT" => Some(Self::InnerProduct),
508 _ => None,
509 }
510 }
511}