1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct PkIndexCompactionResult {
5 #[prost(message, optional, tag = "1")]
6 pub output_files: ::core::option::Option<super::connector_service::SinkMetadata>,
7 #[prost(string, repeated, tag = "2")]
8 pub input_file_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
9 #[prost(int64, tag = "3")]
10 pub read_snapshot_id: i64,
11}
12#[derive(prost_helpers::AnyPB)]
13#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
14pub struct SubscribeIcebergCompactionEventRequest {
15 #[prost(uint64, tag = "3")]
16 pub create_at: u64,
17 #[prost(
18 oneof = "subscribe_iceberg_compaction_event_request::Event",
19 tags = "1, 2, 4"
20 )]
21 pub event: ::core::option::Option<subscribe_iceberg_compaction_event_request::Event>,
22}
23pub mod subscribe_iceberg_compaction_event_request {
25 #[derive(prost_helpers::AnyPB)]
27 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
28 pub struct Register {
29 #[prost(uint32, tag = "1", wrapper = "crate::id::WorkerId")]
30 pub context_id: crate::id::WorkerId,
31 }
32 #[derive(prost_helpers::AnyPB)]
34 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
35 pub struct PullTask {
36 #[prost(uint32, tag = "1")]
37 pub pull_task_count: u32,
38 }
39 #[derive(prost_helpers::AnyPB)]
40 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
41 pub struct ReportTask {
42 #[prost(uint64, tag = "1", wrapper = "crate::id::IcebergCompactionTaskId")]
43 pub task_id: crate::id::IcebergCompactionTaskId,
44 #[prost(uint32, tag = "2", wrapper = "crate::id::SinkId")]
45 pub sink_id: crate::id::SinkId,
46 #[prost(enumeration = "report_task::Status", tag = "3")]
47 pub status: i32,
48 #[prost(string, optional, tag = "6")]
49 pub error_message: ::core::option::Option<::prost::alloc::string::String>,
50 #[prost(message, optional, tag = "7")]
52 pub pk_index_result: ::core::option::Option<super::PkIndexCompactionResult>,
53 }
54 pub mod report_task {
56 #[derive(prost_helpers::AnyPB)]
57 #[derive(
58 Clone,
59 Copy,
60 Debug,
61 PartialEq,
62 Eq,
63 Hash,
64 PartialOrd,
65 Ord,
66 ::prost::Enumeration
67 )]
68 #[repr(i32)]
69 pub enum Status {
70 Unspecified = 0,
71 Success = 1,
74 Failed = 2,
75 Drained = 3,
77 BlockedCapacity = 4,
79 BlockedStatistics = 5,
81 Busy = 6,
83 }
84 impl Status {
85 pub fn as_str_name(&self) -> &'static str {
90 match self {
91 Self::Unspecified => "UNSPECIFIED",
92 Self::Success => "SUCCESS",
93 Self::Failed => "FAILED",
94 Self::Drained => "DRAINED",
95 Self::BlockedCapacity => "BLOCKED_CAPACITY",
96 Self::BlockedStatistics => "BLOCKED_STATISTICS",
97 Self::Busy => "BUSY",
98 }
99 }
100 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
102 match value {
103 "UNSPECIFIED" => Some(Self::Unspecified),
104 "SUCCESS" => Some(Self::Success),
105 "FAILED" => Some(Self::Failed),
106 "DRAINED" => Some(Self::Drained),
107 "BLOCKED_CAPACITY" => Some(Self::BlockedCapacity),
108 "BLOCKED_STATISTICS" => Some(Self::BlockedStatistics),
109 "BUSY" => Some(Self::Busy),
110 _ => None,
111 }
112 }
113 }
114 }
115 #[derive(prost_helpers::AnyPB)]
116 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
117 pub enum Event {
118 #[prost(message, tag = "1")]
120 Register(Register),
121 #[prost(message, tag = "2")]
123 PullTask(PullTask),
124 #[prost(message, tag = "4")]
126 ReportTask(ReportTask),
127 }
128}
129#[derive(prost_helpers::AnyPB)]
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct IcebergCompactionTask {
132 #[prost(uint64, tag = "1", wrapper = "crate::id::IcebergCompactionTaskId")]
133 pub task_id: crate::id::IcebergCompactionTaskId,
134 #[prost(btree_map = "string, string", tag = "2")]
136 pub props: ::prost::alloc::collections::BTreeMap<
137 ::prost::alloc::string::String,
138 ::prost::alloc::string::String,
139 >,
140 #[prost(enumeration = "iceberg_compaction_task::TaskType", tag = "3")]
141 pub task_type: i32,
142 #[prost(uint32, tag = "4")]
143 pub sink_id: u32,
144 #[prost(bool, tag = "5")]
148 pub pk_index_coordinated: bool,
149 #[prost(int64, optional, tag = "6")]
151 pub max_file_sequence_number: ::core::option::Option<i64>,
152}
153pub mod iceberg_compaction_task {
155 #[derive(prost_helpers::AnyPB)]
156 #[derive(
157 Clone,
158 Copy,
159 Debug,
160 PartialEq,
161 Eq,
162 Hash,
163 PartialOrd,
164 Ord,
165 ::prost::Enumeration
166 )]
167 #[repr(i32)]
168 pub enum TaskType {
169 Unspecified = 0,
170 Full = 1,
172 SmallFiles = 2,
174 FilesWithDelete = 3,
175 Auto = 4,
177 }
178 impl TaskType {
179 pub fn as_str_name(&self) -> &'static str {
184 match self {
185 Self::Unspecified => "UNSPECIFIED",
186 Self::Full => "FULL",
187 Self::SmallFiles => "SMALL_FILES",
188 Self::FilesWithDelete => "FILES_WITH_DELETE",
189 Self::Auto => "AUTO",
190 }
191 }
192 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
194 match value {
195 "UNSPECIFIED" => Some(Self::Unspecified),
196 "FULL" => Some(Self::Full),
197 "SMALL_FILES" => Some(Self::SmallFiles),
198 "FILES_WITH_DELETE" => Some(Self::FilesWithDelete),
199 "AUTO" => Some(Self::Auto),
200 _ => None,
201 }
202 }
203 }
204}
205#[derive(prost_helpers::AnyPB)]
206#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
207pub struct CancelCompactTask {
208 #[prost(uint64, tag = "1", wrapper = "crate::id::IcebergCompactionTaskId")]
209 pub task_id: crate::id::IcebergCompactionTaskId,
210}
211#[derive(prost_helpers::AnyPB)]
212#[derive(Clone, PartialEq, ::prost::Message)]
213pub struct SubscribeIcebergCompactionEventResponse {
214 #[prost(uint64, tag = "7")]
215 pub create_at: u64,
216 #[prost(
217 oneof = "subscribe_iceberg_compaction_event_response::Event",
218 tags = "1, 2, 3"
219 )]
220 pub event: ::core::option::Option<
221 subscribe_iceberg_compaction_event_response::Event,
222 >,
223}
224pub mod subscribe_iceberg_compaction_event_response {
226 #[derive(prost_helpers::AnyPB)]
229 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
230 pub struct PullTaskAck {}
231 #[derive(prost_helpers::AnyPB)]
232 #[derive(Clone, PartialEq, ::prost::Oneof)]
233 pub enum Event {
234 #[prost(message, tag = "1")]
235 CompactTask(super::IcebergCompactionTask),
236 #[prost(message, tag = "2")]
237 PullTaskAck(PullTaskAck),
238 #[prost(message, tag = "3")]
239 CancelCompactTask(super::CancelCompactTask),
240 }
241}