risingwave_pb/
iceberg_compaction.rs

1// This file is @generated by prost-build.
2#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct SubscribeIcebergCompactionEventRequest {
5    #[prost(uint64, tag = "3")]
6    pub create_at: u64,
7    #[prost(oneof = "subscribe_iceberg_compaction_event_request::Event", tags = "1, 2")]
8    pub event: ::core::option::Option<subscribe_iceberg_compaction_event_request::Event>,
9}
10/// Nested message and enum types in `SubscribeIcebergCompactionEventRequest`.
11pub mod subscribe_iceberg_compaction_event_request {
12    /// Register provides the context_id of the corresponding Compactor.
13    #[derive(prost_helpers::AnyPB)]
14    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
15    pub struct Register {
16        #[prost(uint32, tag = "1")]
17        pub context_id: u32,
18    }
19    /// PullTask provides the number of tasks needed for the Compactor.
20    #[derive(prost_helpers::AnyPB)]
21    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
22    pub struct PullTask {
23        #[prost(uint32, tag = "1")]
24        pub pull_task_count: u32,
25    }
26    #[derive(prost_helpers::AnyPB)]
27    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
28    pub enum Event {
29        /// Compactor will register its own context_id with Meta via Register and establish a bi-directional streaming rpc.
30        #[prost(message, tag = "1")]
31        Register(Register),
32        /// Compactor will recalculate the number of tasks needed locally after receiving the PullTaskAck and get the next batch of tasks from Meta via PullTask.
33        #[prost(message, tag = "2")]
34        PullTask(PullTask),
35    }
36}
37#[derive(prost_helpers::AnyPB)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct IcebergCompactionTask {
40    #[prost(uint64, tag = "1")]
41    pub task_id: u64,
42    /// Now we only support iceberg table full compaction.
43    /// compactor will get the information of the iceberg table from the properties
44    #[prost(btree_map = "string, string", tag = "2")]
45    pub props: ::prost::alloc::collections::BTreeMap<
46        ::prost::alloc::string::String,
47        ::prost::alloc::string::String,
48    >,
49}
50#[derive(prost_helpers::AnyPB)]
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct SubscribeIcebergCompactionEventResponse {
53    #[prost(uint64, tag = "7")]
54    pub create_at: u64,
55    #[prost(oneof = "subscribe_iceberg_compaction_event_response::Event", tags = "1, 2")]
56    pub event: ::core::option::Option<
57        subscribe_iceberg_compaction_event_response::Event,
58    >,
59}
60/// Nested message and enum types in `SubscribeIcebergCompactionEventResponse`.
61pub mod subscribe_iceberg_compaction_event_response {
62    /// PullTaskAck is a response, the meta will return a PullTaskAck after distributing the task requested by the PullTask.
63    /// The Compactor receives the PullTaskAck and remakes its state and tries to initiate the next PullTask.
64    #[derive(prost_helpers::AnyPB)]
65    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
66    pub struct PullTaskAck {}
67    #[derive(prost_helpers::AnyPB)]
68    #[derive(Clone, PartialEq, ::prost::Oneof)]
69    pub enum Event {
70        #[prost(message, tag = "1")]
71        CompactTask(super::IcebergCompactionTask),
72        #[prost(message, tag = "2")]
73        PullTaskAck(PullTaskAck),
74    }
75}