#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SstableInfo {
#[prost(uint64, tag = "1")]
pub object_id: u64,
#[prost(uint64, tag = "2")]
pub sst_id: u64,
#[prost(message, optional, tag = "3")]
pub key_range: ::core::option::Option<KeyRange>,
#[prost(uint64, tag = "4")]
pub file_size: u64,
#[prost(uint32, repeated, tag = "5")]
pub table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint64, tag = "6")]
pub meta_offset: u64,
#[prost(uint64, tag = "7")]
pub stale_key_count: u64,
#[prost(uint64, tag = "8")]
pub total_key_count: u64,
#[prost(uint64, tag = "9")]
pub min_epoch: u64,
#[prost(uint64, tag = "10")]
pub max_epoch: u64,
#[prost(uint64, tag = "11")]
pub uncompressed_file_size: u64,
#[prost(uint64, tag = "12")]
pub range_tombstone_count: u64,
#[prost(enumeration = "BloomFilterType", tag = "13")]
pub bloom_filter_kind: i32,
#[prost(uint64, tag = "14")]
pub sst_size: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OverlappingLevel {
#[prost(message, repeated, tag = "1")]
pub sub_levels: ::prost::alloc::vec::Vec<Level>,
#[prost(uint64, tag = "2")]
pub total_file_size: u64,
#[prost(uint64, tag = "3")]
pub uncompressed_file_size: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Level {
#[prost(uint32, tag = "1")]
pub level_idx: u32,
#[prost(enumeration = "LevelType", tag = "2")]
pub level_type: i32,
#[prost(message, repeated, tag = "3")]
pub table_infos: ::prost::alloc::vec::Vec<SstableInfo>,
#[prost(uint64, tag = "4")]
pub total_file_size: u64,
#[prost(uint64, tag = "5")]
pub sub_level_id: u64,
#[prost(uint64, tag = "6")]
pub uncompressed_file_size: u64,
#[prost(uint32, tag = "7")]
pub vnode_partition_count: u32,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputLevel {
#[prost(uint32, tag = "1")]
pub level_idx: u32,
#[prost(enumeration = "LevelType", tag = "2")]
pub level_type: i32,
#[prost(message, repeated, tag = "3")]
pub table_infos: ::prost::alloc::vec::Vec<SstableInfo>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewL0SubLevel {
#[prost(message, repeated, tag = "1")]
pub inserted_table_infos: ::prost::alloc::vec::Vec<SstableInfo>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntraLevelDelta {
#[prost(uint32, tag = "1")]
pub level_idx: u32,
#[prost(uint64, tag = "2")]
pub l0_sub_level_id: u64,
#[prost(uint64, repeated, tag = "3")]
pub removed_table_ids: ::prost::alloc::vec::Vec<u64>,
#[prost(message, repeated, tag = "4")]
pub inserted_table_infos: ::prost::alloc::vec::Vec<SstableInfo>,
#[prost(uint32, tag = "5")]
pub vnode_partition_count: u32,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroupConstruct {
#[prost(message, optional, tag = "1")]
pub group_config: ::core::option::Option<CompactionConfig>,
#[prost(uint64, tag = "2")]
pub parent_group_id: u64,
#[deprecated]
#[prost(uint32, repeated, packed = "false", tag = "3")]
pub table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint64, tag = "4")]
pub group_id: u64,
#[prost(uint64, tag = "5")]
pub new_sst_start_id: u64,
#[prost(enumeration = "CompatibilityVersion", tag = "6")]
pub version: i32,
#[prost(bytes = "vec", optional, tag = "7")]
pub split_key: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GroupDestroy {}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GroupMerge {
#[prost(uint64, tag = "1")]
pub left_group_id: u64,
#[prost(uint64, tag = "2")]
pub right_group_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroupDelta {
#[prost(oneof = "group_delta::DeltaType", tags = "1, 2, 3, 6, 7")]
pub delta_type: ::core::option::Option<group_delta::DeltaType>,
}
pub mod group_delta {
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DeltaType {
#[prost(message, tag = "1")]
IntraLevel(super::IntraLevelDelta),
#[prost(message, tag = "2")]
GroupConstruct(super::GroupConstruct),
#[prost(message, tag = "3")]
GroupDestroy(super::GroupDestroy),
#[prost(message, tag = "6")]
GroupMerge(super::GroupMerge),
#[prost(message, tag = "7")]
NewL0SubLevel(super::NewL0SubLevel),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UncommittedEpoch {
#[prost(uint64, tag = "1")]
pub epoch: u64,
#[prost(message, repeated, tag = "2")]
pub tables: ::prost::alloc::vec::Vec<SstableInfo>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VnodeWatermark {
#[prost(bytes = "vec", tag = "1")]
pub watermark: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub vnode_bitmap: ::core::option::Option<super::common::Buffer>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableWatermarks {
#[prost(message, repeated, tag = "1")]
pub epoch_watermarks: ::prost::alloc::vec::Vec<table_watermarks::EpochNewWatermarks>,
#[prost(bool, tag = "2")]
pub is_ascending: bool,
}
pub mod table_watermarks {
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpochNewWatermarks {
#[prost(message, repeated, tag = "1")]
pub watermarks: ::prost::alloc::vec::Vec<super::VnodeWatermark>,
#[prost(uint64, tag = "2")]
pub epoch: u64,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpochNewChangeLog {
#[prost(message, repeated, tag = "1")]
pub old_value: ::prost::alloc::vec::Vec<SstableInfo>,
#[prost(message, repeated, tag = "2")]
pub new_value: ::prost::alloc::vec::Vec<SstableInfo>,
#[prost(uint64, repeated, tag = "3")]
pub epochs: ::prost::alloc::vec::Vec<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableChangeLog {
#[prost(message, repeated, tag = "1")]
pub change_logs: ::prost::alloc::vec::Vec<EpochNewChangeLog>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StateTableInfo {
#[prost(uint64, tag = "1")]
pub committed_epoch: u64,
#[prost(uint64, tag = "3")]
pub compaction_group_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StateTableInfoDelta {
#[prost(uint64, tag = "1")]
pub committed_epoch: u64,
#[prost(uint64, tag = "3")]
pub compaction_group_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HummockVersion {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(map = "uint64, message", tag = "2")]
pub levels: ::std::collections::HashMap<u64, hummock_version::Levels>,
#[deprecated]
#[prost(uint64, tag = "3")]
pub max_committed_epoch: u64,
#[prost(map = "uint32, message", tag = "5")]
pub table_watermarks: ::std::collections::HashMap<u32, TableWatermarks>,
#[prost(map = "uint32, message", tag = "6")]
pub table_change_logs: ::std::collections::HashMap<u32, TableChangeLog>,
#[prost(map = "uint32, message", tag = "7")]
pub state_table_info: ::std::collections::HashMap<u32, StateTableInfo>,
}
pub mod hummock_version {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Levels {
#[prost(message, repeated, tag = "1")]
pub levels: ::prost::alloc::vec::Vec<super::Level>,
#[prost(message, optional, tag = "2")]
pub l0: ::core::option::Option<super::OverlappingLevel>,
#[prost(uint64, tag = "3")]
pub group_id: u64,
#[prost(uint64, tag = "4")]
pub parent_group_id: u64,
#[deprecated]
#[prost(uint32, repeated, packed = "false", tag = "5")]
pub member_table_ids: ::prost::alloc::vec::Vec<u32>,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HummockVersionDelta {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(uint64, tag = "2")]
pub prev_id: u64,
#[prost(map = "uint64, message", tag = "3")]
pub group_deltas: ::std::collections::HashMap<
u64,
hummock_version_delta::GroupDeltas,
>,
#[deprecated]
#[prost(uint64, tag = "4")]
pub max_committed_epoch: u64,
#[prost(bool, tag = "6")]
pub trivial_move: bool,
#[prost(map = "uint32, message", tag = "8")]
pub new_table_watermarks: ::std::collections::HashMap<u32, TableWatermarks>,
#[prost(uint32, repeated, tag = "9")]
pub removed_table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(map = "uint32, message", tag = "10")]
pub change_log_delta: ::std::collections::HashMap<
u32,
hummock_version_delta::ChangeLogDelta,
>,
#[prost(map = "uint32, message", tag = "11")]
pub state_table_info_delta: ::std::collections::HashMap<u32, StateTableInfoDelta>,
}
pub mod hummock_version_delta {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroupDeltas {
#[prost(message, repeated, tag = "1")]
pub group_deltas: ::prost::alloc::vec::Vec<super::GroupDelta>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeLogDelta {
#[prost(message, optional, tag = "1")]
pub new_log: ::core::option::Option<super::EpochNewChangeLog>,
#[prost(uint64, tag = "2")]
pub truncate_epoch: u64,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HummockVersionDeltas {
#[prost(message, repeated, tag = "1")]
pub version_deltas: ::prost::alloc::vec::Vec<HummockVersionDelta>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HummockVersionCheckpoint {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<HummockVersion>,
#[prost(map = "uint64, message", tag = "2")]
pub stale_objects: ::std::collections::HashMap<
u64,
hummock_version_checkpoint::StaleObjects,
>,
}
pub mod hummock_version_checkpoint {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StaleObjects {
#[prost(uint64, repeated, tag = "1")]
pub id: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, tag = "2")]
pub total_file_size: u64,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HummockVersionArchive {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<HummockVersion>,
#[prost(message, repeated, tag = "2")]
pub version_deltas: ::prost::alloc::vec::Vec<HummockVersionDelta>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VersionUpdatePayload {
#[prost(oneof = "version_update_payload::Payload", tags = "1, 2")]
pub payload: ::core::option::Option<version_update_payload::Payload>,
}
pub mod version_update_payload {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag = "1")]
VersionDeltas(super::HummockVersionDeltas),
#[prost(message, tag = "2")]
PinnedVersion(super::HummockVersion),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UnpinVersionBeforeRequest {
#[prost(uint32, tag = "1")]
pub context_id: u32,
#[prost(uint64, tag = "2")]
pub unpin_version_before: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnpinVersionBeforeResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetCurrentVersionRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCurrentVersionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub current_version: ::core::option::Option<HummockVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UnpinVersionRequest {
#[prost(uint32, tag = "1")]
pub context_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnpinVersionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetAssignedCompactTaskNumRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetAssignedCompactTaskNumResponse {
#[prost(uint32, tag = "1")]
pub num_tasks: u32,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyRange {
#[prost(bytes = "vec", tag = "1")]
pub left: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub right: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "3")]
pub right_exclusive: bool,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TableOption {
#[prost(uint32, optional, tag = "2")]
pub retention_seconds: ::core::option::Option<u32>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableSchema {
#[prost(int32, repeated, tag = "1")]
pub column_ids: ::prost::alloc::vec::Vec<i32>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactTask {
#[prost(message, repeated, tag = "1")]
pub input_ssts: ::prost::alloc::vec::Vec<InputLevel>,
#[prost(message, repeated, tag = "2")]
pub splits: ::prost::alloc::vec::Vec<KeyRange>,
#[prost(message, repeated, tag = "4")]
pub sorted_output_ssts: ::prost::alloc::vec::Vec<SstableInfo>,
#[prost(uint64, tag = "5")]
pub task_id: u64,
#[prost(uint32, tag = "6")]
pub target_level: u32,
#[prost(bool, tag = "7")]
pub gc_delete_keys: bool,
#[prost(uint32, tag = "8")]
pub base_level: u32,
#[prost(enumeration = "compact_task::TaskStatus", tag = "9")]
pub task_status: i32,
#[prost(uint64, tag = "12")]
pub compaction_group_id: u64,
#[prost(uint32, repeated, tag = "13")]
pub existing_table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "14")]
pub compression_algorithm: u32,
#[prost(uint64, tag = "15")]
pub target_file_size: u64,
#[prost(uint32, tag = "16")]
pub compaction_filter_mask: u32,
#[prost(btree_map = "uint32, message", tag = "17")]
pub table_options: ::prost::alloc::collections::BTreeMap<u32, TableOption>,
#[prost(uint64, tag = "18")]
pub current_epoch_time: u64,
#[prost(uint64, tag = "19")]
pub target_sub_level_id: u64,
#[prost(enumeration = "compact_task::TaskType", tag = "20")]
pub task_type: i32,
#[deprecated]
#[prost(bool, tag = "21")]
pub split_by_state_table: bool,
#[prost(uint32, tag = "22")]
pub split_weight_by_vnode: u32,
#[prost(btree_map = "uint32, uint32", tag = "23")]
pub table_vnode_partition: ::prost::alloc::collections::BTreeMap<u32, u32>,
#[prost(btree_map = "uint32, message", tag = "24")]
pub table_watermarks: ::prost::alloc::collections::BTreeMap<u32, TableWatermarks>,
#[prost(btree_map = "uint32, message", tag = "25")]
pub table_schemas: ::prost::alloc::collections::BTreeMap<u32, TableSchema>,
#[prost(uint32, tag = "26")]
pub max_sub_compaction: u32,
}
pub mod compact_task {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TaskStatus {
Unspecified = 0,
Pending = 1,
Success = 2,
HeartbeatCanceled = 3,
NoAvailMemoryResourceCanceled = 4,
AssignFailCanceled = 5,
SendFailCanceled = 6,
ManualCanceled = 7,
InvalidGroupCanceled = 8,
InputOutdatedCanceled = 9,
ExecuteFailed = 10,
JoinHandleFailed = 11,
TrackSstObjectIdFailed = 12,
NoAvailCpuResourceCanceled = 13,
HeartbeatProgressCanceled = 14,
RetentionTimeRejected = 17,
ServerlessSendFailCanceled = 15,
ServerlessTableNotFoundCanceled = 16,
}
impl TaskStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
TaskStatus::Unspecified => "UNSPECIFIED",
TaskStatus::Pending => "PENDING",
TaskStatus::Success => "SUCCESS",
TaskStatus::HeartbeatCanceled => "HEARTBEAT_CANCELED",
TaskStatus::NoAvailMemoryResourceCanceled => {
"NO_AVAIL_MEMORY_RESOURCE_CANCELED"
}
TaskStatus::AssignFailCanceled => "ASSIGN_FAIL_CANCELED",
TaskStatus::SendFailCanceled => "SEND_FAIL_CANCELED",
TaskStatus::ManualCanceled => "MANUAL_CANCELED",
TaskStatus::InvalidGroupCanceled => "INVALID_GROUP_CANCELED",
TaskStatus::InputOutdatedCanceled => "INPUT_OUTDATED_CANCELED",
TaskStatus::ExecuteFailed => "EXECUTE_FAILED",
TaskStatus::JoinHandleFailed => "JOIN_HANDLE_FAILED",
TaskStatus::TrackSstObjectIdFailed => "TRACK_SST_OBJECT_ID_FAILED",
TaskStatus::NoAvailCpuResourceCanceled => {
"NO_AVAIL_CPU_RESOURCE_CANCELED"
}
TaskStatus::HeartbeatProgressCanceled => "HEARTBEAT_PROGRESS_CANCELED",
TaskStatus::RetentionTimeRejected => "RETENTION_TIME_REJECTED",
TaskStatus::ServerlessSendFailCanceled => "SERVERLESS_SEND_FAIL_CANCELED",
TaskStatus::ServerlessTableNotFoundCanceled => {
"SERVERLESS_TABLE_NOT_FOUND_CANCELED"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"SUCCESS" => Some(Self::Success),
"HEARTBEAT_CANCELED" => Some(Self::HeartbeatCanceled),
"NO_AVAIL_MEMORY_RESOURCE_CANCELED" => {
Some(Self::NoAvailMemoryResourceCanceled)
}
"ASSIGN_FAIL_CANCELED" => Some(Self::AssignFailCanceled),
"SEND_FAIL_CANCELED" => Some(Self::SendFailCanceled),
"MANUAL_CANCELED" => Some(Self::ManualCanceled),
"INVALID_GROUP_CANCELED" => Some(Self::InvalidGroupCanceled),
"INPUT_OUTDATED_CANCELED" => Some(Self::InputOutdatedCanceled),
"EXECUTE_FAILED" => Some(Self::ExecuteFailed),
"JOIN_HANDLE_FAILED" => Some(Self::JoinHandleFailed),
"TRACK_SST_OBJECT_ID_FAILED" => Some(Self::TrackSstObjectIdFailed),
"NO_AVAIL_CPU_RESOURCE_CANCELED" => {
Some(Self::NoAvailCpuResourceCanceled)
}
"HEARTBEAT_PROGRESS_CANCELED" => Some(Self::HeartbeatProgressCanceled),
"RETENTION_TIME_REJECTED" => Some(Self::RetentionTimeRejected),
"SERVERLESS_SEND_FAIL_CANCELED" => Some(Self::ServerlessSendFailCanceled),
"SERVERLESS_TABLE_NOT_FOUND_CANCELED" => {
Some(Self::ServerlessTableNotFoundCanceled)
}
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TaskType {
TypeUnspecified = 0,
Dynamic = 1,
SpaceReclaim = 2,
Manual = 3,
SharedBuffer = 4,
Ttl = 5,
Tombstone = 6,
Emergency = 7,
VnodeWatermark = 8,
}
impl TaskType {
pub fn as_str_name(&self) -> &'static str {
match self {
TaskType::TypeUnspecified => "TYPE_UNSPECIFIED",
TaskType::Dynamic => "DYNAMIC",
TaskType::SpaceReclaim => "SPACE_RECLAIM",
TaskType::Manual => "MANUAL",
TaskType::SharedBuffer => "SHARED_BUFFER",
TaskType::Ttl => "TTL",
TaskType::Tombstone => "TOMBSTONE",
TaskType::Emergency => "EMERGENCY",
TaskType::VnodeWatermark => "VNODE_WATERMARK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::TypeUnspecified),
"DYNAMIC" => Some(Self::Dynamic),
"SPACE_RECLAIM" => Some(Self::SpaceReclaim),
"MANUAL" => Some(Self::Manual),
"SHARED_BUFFER" => Some(Self::SharedBuffer),
"TTL" => Some(Self::Ttl),
"TOMBSTONE" => Some(Self::Tombstone),
"EMERGENCY" => Some(Self::Emergency),
"VNODE_WATERMARK" => Some(Self::VnodeWatermark),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LevelHandler {
#[prost(uint32, tag = "1")]
pub level: u32,
#[prost(message, repeated, tag = "3")]
pub tasks: ::prost::alloc::vec::Vec<level_handler::RunningCompactTask>,
}
pub mod level_handler {
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunningCompactTask {
#[prost(uint64, tag = "1")]
pub task_id: u64,
#[prost(uint64, repeated, tag = "2")]
pub ssts: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, tag = "3")]
pub total_file_size: u64,
#[prost(uint32, tag = "4")]
pub target_level: u32,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactStatus {
#[prost(uint64, tag = "1")]
pub compaction_group_id: u64,
#[prost(message, repeated, tag = "2")]
pub level_handlers: ::prost::alloc::vec::Vec<LevelHandler>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactionGroup {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(message, optional, tag = "4")]
pub compaction_config: ::core::option::Option<CompactionConfig>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactionGroupInfo {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(uint64, tag = "2")]
pub parent_id: u64,
#[prost(uint32, repeated, tag = "3")]
pub member_table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(message, optional, tag = "4")]
pub compaction_config: ::core::option::Option<CompactionConfig>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactTaskAssignment {
#[prost(message, optional, tag = "1")]
pub compact_task: ::core::option::Option<CompactTask>,
#[prost(uint32, tag = "2")]
pub context_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HummockPinnedVersion {
#[prost(uint32, tag = "1")]
pub context_id: u32,
#[prost(uint64, tag = "2")]
pub min_pinned_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HummockPinnedSnapshot {
#[prost(uint32, tag = "1")]
pub context_id: u32,
#[prost(uint64, tag = "2")]
pub minimal_pinned_snapshot: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNewSstIdsRequest {
#[prost(uint32, tag = "1")]
pub number: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNewSstIdsResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(uint64, tag = "2")]
pub start_id: u64,
#[prost(uint64, tag = "3")]
pub end_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CompactTaskProgress {
#[prost(uint64, tag = "1")]
pub task_id: u64,
#[prost(uint32, tag = "2")]
pub num_ssts_sealed: u32,
#[prost(uint32, tag = "3")]
pub num_ssts_uploaded: u32,
#[prost(uint64, tag = "4")]
pub num_progress_key: u64,
#[prost(uint64, tag = "5")]
pub num_pending_read_io: u64,
#[prost(uint64, tag = "6")]
pub num_pending_write_io: u64,
#[prost(uint64, optional, tag = "7")]
pub compaction_group_id: ::core::option::Option<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeCompactionEventRequest {
#[prost(uint64, tag = "7")]
pub create_at: u64,
#[prost(oneof = "subscribe_compaction_event_request::Event", tags = "1, 2, 3, 4")]
pub event: ::core::option::Option<subscribe_compaction_event_request::Event>,
}
pub mod subscribe_compaction_event_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Register {
#[prost(uint32, tag = "1")]
pub context_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PullTask {
#[prost(uint32, tag = "4")]
pub pull_task_count: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportTask {
#[prost(map = "uint32, message", tag = "3")]
pub table_stats_change: ::std::collections::HashMap<u32, super::TableStats>,
#[prost(uint64, tag = "4")]
pub task_id: u64,
#[prost(enumeration = "super::compact_task::TaskStatus", tag = "5")]
pub task_status: i32,
#[prost(message, repeated, tag = "6")]
pub sorted_output_ssts: ::prost::alloc::vec::Vec<super::SstableInfo>,
#[prost(map = "uint64, uint64", tag = "7")]
pub object_timestamps: ::std::collections::HashMap<u64, u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeartBeat {
#[prost(message, repeated, tag = "2")]
pub progress: ::prost::alloc::vec::Vec<super::CompactTaskProgress>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "1")]
Register(Register),
#[prost(message, tag = "2")]
PullTask(PullTask),
#[prost(message, tag = "3")]
ReportTask(ReportTask),
#[prost(message, tag = "4")]
HeartBeat(HeartBeat),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeCompactionEventResponse {
#[prost(uint64, tag = "7")]
pub create_at: u64,
#[prost(
oneof = "subscribe_compaction_event_response::Event",
tags = "1, 2, 3, 4, 5, 6"
)]
pub event: ::core::option::Option<subscribe_compaction_event_response::Event>,
}
pub mod subscribe_compaction_event_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PullTaskAck {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "1")]
CompactTask(super::CompactTask),
#[prost(message, tag = "2")]
VacuumTask(super::VacuumTask),
#[prost(message, tag = "3")]
FullScanTask(super::FullScanTask),
#[prost(message, tag = "4")]
ValidationTask(super::ValidationTask),
#[prost(message, tag = "5")]
CancelCompactTask(super::CancelCompactTask),
#[prost(message, tag = "6")]
PullTaskAck(PullTaskAck),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportCompactionTaskRequest {
#[prost(oneof = "report_compaction_task_request::Event", tags = "1, 2")]
pub event: ::core::option::Option<report_compaction_task_request::Event>,
}
pub mod report_compaction_task_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportTask {
#[prost(message, optional, tag = "2")]
pub compact_task: ::core::option::Option<super::CompactTask>,
#[prost(map = "uint32, message", tag = "3")]
pub table_stats_change: ::std::collections::HashMap<u32, super::TableStats>,
#[prost(map = "uint64, uint64", tag = "4")]
pub object_timestamps: ::std::collections::HashMap<u64, u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeartBeat {
#[prost(message, repeated, tag = "2")]
pub progress: ::prost::alloc::vec::Vec<super::CompactTaskProgress>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "1")]
ReportTask(ReportTask),
#[prost(message, tag = "2")]
HeartBeat(HeartBeat),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportCompactionTaskResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidationTask {
#[prost(message, repeated, tag = "1")]
pub sst_infos: ::prost::alloc::vec::Vec<SstableInfo>,
#[prost(map = "uint64, uint32", tag = "2")]
pub sst_id_to_worker_id: ::std::collections::HashMap<u64, u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VacuumTask {
#[prost(uint64, repeated, tag = "1")]
pub sstable_object_ids: ::prost::alloc::vec::Vec<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FullScanTask {
#[prost(uint64, tag = "1")]
pub sst_retention_watermark: u64,
#[prost(string, optional, tag = "2")]
pub prefix: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub start_after: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, optional, tag = "4")]
pub limit: ::core::option::Option<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CancelCompactTask {
#[prost(uint32, tag = "1")]
pub context_id: u32,
#[prost(uint64, tag = "2")]
pub task_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerManualCompactionRequest {
#[prost(uint64, tag = "1")]
pub compaction_group_id: u64,
#[prost(message, optional, tag = "2")]
pub key_range: ::core::option::Option<KeyRange>,
#[prost(uint32, tag = "3")]
pub table_id: u32,
#[prost(uint32, tag = "4")]
pub level: u32,
#[prost(uint64, repeated, tag = "5")]
pub sst_ids: ::prost::alloc::vec::Vec<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerManualCompactionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerFullGcRequest {
#[prost(uint64, tag = "1")]
pub sst_retention_time_sec: u64,
#[prost(string, optional, tag = "2")]
pub prefix: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerFullGcResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListVersionDeltasRequest {
#[prost(uint64, tag = "1")]
pub start_id: u64,
#[prost(uint32, tag = "2")]
pub num_limit: u32,
#[prost(uint64, tag = "3")]
pub committed_epoch_limit: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVersionDeltasResponse {
#[prost(message, optional, tag = "1")]
pub version_deltas: ::core::option::Option<HummockVersionDeltas>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PinnedVersionsSummary {
#[prost(message, repeated, tag = "1")]
pub pinned_versions: ::prost::alloc::vec::Vec<HummockPinnedVersion>,
#[prost(map = "uint32, message", tag = "2")]
pub workers: ::std::collections::HashMap<u32, super::common::WorkerNode>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlGetPinnedVersionsSummaryRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiseCtlGetPinnedVersionsSummaryResponse {
#[prost(message, optional, tag = "1")]
pub summary: ::core::option::Option<PinnedVersionsSummary>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitMetadataForReplayRequest {
#[prost(message, repeated, tag = "1")]
pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
#[prost(message, repeated, tag = "2")]
pub compaction_groups: ::prost::alloc::vec::Vec<CompactionGroupInfo>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct InitMetadataForReplayResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplayVersionDeltaRequest {
#[prost(message, optional, tag = "1")]
pub version_delta: ::core::option::Option<HummockVersionDelta>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplayVersionDeltaResponse {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<HummockVersion>,
#[prost(uint64, repeated, tag = "2")]
pub modified_compaction_groups: ::prost::alloc::vec::Vec<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerCompactionDeterministicRequest {
#[prost(uint64, tag = "1")]
pub version_id: u64,
#[prost(uint64, repeated, tag = "2")]
pub compaction_groups: ::prost::alloc::vec::Vec<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TriggerCompactionDeterministicResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DisableCommitEpochRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableCommitEpochResponse {
#[prost(message, optional, tag = "1")]
pub current_version: ::core::option::Option<HummockVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlListCompactionGroupRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiseCtlListCompactionGroupResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag = "2")]
pub compaction_groups: ::prost::alloc::vec::Vec<CompactionGroupInfo>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiseCtlUpdateCompactionConfigRequest {
#[prost(uint64, repeated, tag = "1")]
pub compaction_group_ids: ::prost::alloc::vec::Vec<u64>,
#[prost(message, repeated, tag = "2")]
pub configs: ::prost::alloc::vec::Vec<
rise_ctl_update_compaction_config_request::MutableConfig,
>,
}
pub mod rise_ctl_update_compaction_config_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompressionAlgorithm {
#[prost(uint32, tag = "1")]
pub level: u32,
#[prost(string, tag = "2")]
pub compression_algorithm: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutableConfig {
#[prost(
oneof = "mutable_config::MutableConfig",
tags = "1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21"
)]
pub mutable_config: ::core::option::Option<mutable_config::MutableConfig>,
}
pub mod mutable_config {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum MutableConfig {
#[prost(uint64, tag = "1")]
MaxBytesForLevelBase(u64),
#[prost(uint64, tag = "2")]
MaxBytesForLevelMultiplier(u64),
#[prost(uint64, tag = "3")]
MaxCompactionBytes(u64),
#[prost(uint64, tag = "4")]
SubLevelMaxCompactionBytes(u64),
#[prost(uint64, tag = "6")]
Level0TierCompactFileNumber(u64),
#[prost(uint64, tag = "7")]
TargetFileSizeBase(u64),
#[prost(uint32, tag = "8")]
CompactionFilterMask(u32),
#[prost(uint32, tag = "9")]
MaxSubCompaction(u32),
#[prost(uint64, tag = "10")]
Level0StopWriteThresholdSubLevelNumber(u64),
#[prost(uint32, tag = "11")]
Level0SubLevelCompactLevelCount(u32),
#[prost(uint32, tag = "12")]
Level0OverlappingSubLevelCompactLevelCount(u32),
#[prost(uint64, tag = "13")]
MaxSpaceReclaimBytes(u64),
#[prost(uint64, tag = "14")]
Level0MaxCompactFileNumber(u64),
#[prost(bool, tag = "15")]
EnableEmergencyPicker(bool),
#[prost(uint32, tag = "16")]
TombstoneReclaimRatio(u32),
#[prost(message, tag = "17")]
CompressionAlgorithm(super::CompressionAlgorithm),
#[prost(uint32, tag = "18")]
MaxL0CompactLevelCount(u32),
#[prost(uint64, tag = "19")]
SstAllowedTrivialMoveMinSize(u64),
#[prost(uint32, tag = "20")]
SplitWeightByVnode(u32),
#[prost(bool, tag = "21")]
DisableAutoGroupScheduling(bool),
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiseCtlUpdateCompactionConfigResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PinVersionRequest {
#[prost(uint32, tag = "1")]
pub context_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PinVersionResponse {
#[prost(message, optional, tag = "1")]
pub pinned_version: ::core::option::Option<HummockVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitCompactionGroupRequest {
#[prost(uint64, tag = "1")]
pub group_id: u64,
#[prost(uint32, repeated, tag = "2")]
pub table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "3")]
pub partition_vnode_count: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SplitCompactionGroupResponse {
#[prost(uint64, tag = "1")]
pub new_group_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlPauseVersionCheckpointRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlPauseVersionCheckpointResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlResumeVersionCheckpointRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlResumeVersionCheckpointResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlGetCheckpointVersionRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiseCtlGetCheckpointVersionResponse {
#[prost(message, optional, tag = "1")]
pub checkpoint_version: ::core::option::Option<HummockVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlListCompactionStatusRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiseCtlListCompactionStatusResponse {
#[prost(message, repeated, tag = "1")]
pub compaction_statuses: ::prost::alloc::vec::Vec<CompactStatus>,
#[prost(message, repeated, tag = "2")]
pub task_assignment: ::prost::alloc::vec::Vec<CompactTaskAssignment>,
#[prost(message, repeated, tag = "3")]
pub task_progress: ::prost::alloc::vec::Vec<CompactTaskProgress>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListBranchedObjectRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBranchedObjectResponse {
#[prost(message, repeated, tag = "1")]
pub branched_objects: ::prost::alloc::vec::Vec<BranchedObject>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListActiveWriteLimitRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListActiveWriteLimitResponse {
#[prost(map = "uint64, message", tag = "1")]
pub write_limits: ::std::collections::HashMap<u64, write_limits::WriteLimit>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListHummockMetaConfigRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHummockMetaConfigResponse {
#[prost(map = "string, string", tag = "1")]
pub configs: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlRebuildTableStatsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RiseCtlRebuildTableStatsResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetCompactionScoreRequest {
#[prost(uint64, tag = "1")]
pub compaction_group_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCompactionScoreResponse {
#[prost(uint64, tag = "1")]
pub compaction_group_id: u64,
#[prost(message, repeated, tag = "2")]
pub scores: ::prost::alloc::vec::Vec<get_compaction_score_response::PickerInfo>,
}
pub mod get_compaction_score_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PickerInfo {
#[prost(uint64, tag = "1")]
pub score: u64,
#[prost(uint64, tag = "2")]
pub select_level: u64,
#[prost(uint64, tag = "3")]
pub target_level: u64,
#[prost(string, tag = "4")]
pub picker_type: ::prost::alloc::string::String,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListCompactTaskAssignmentRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCompactTaskAssignmentResponse {
#[prost(message, repeated, tag = "1")]
pub task_assignment: ::prost::alloc::vec::Vec<CompactTaskAssignment>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListCompactTaskProgressRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCompactTaskProgressResponse {
#[prost(message, repeated, tag = "1")]
pub task_progress: ::prost::alloc::vec::Vec<CompactTaskProgress>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CancelCompactTaskRequest {
#[prost(uint64, tag = "1")]
pub task_id: u64,
#[prost(enumeration = "compact_task::TaskStatus", tag = "2")]
pub task_status: i32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CancelCompactTaskResponse {
#[prost(bool, tag = "1")]
pub ret: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetVersionByEpochRequest {
#[prost(uint64, tag = "1")]
pub epoch: u64,
#[prost(uint32, tag = "2")]
pub table_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVersionByEpochResponse {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<HummockVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MergeCompactionGroupRequest {
#[prost(uint64, tag = "1")]
pub left_group_id: u64,
#[prost(uint64, tag = "2")]
pub right_group_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MergeCompactionGroupResponse {}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactionConfig {
#[prost(uint64, tag = "1")]
pub max_bytes_for_level_base: u64,
#[prost(uint64, tag = "2")]
pub max_level: u64,
#[prost(uint64, tag = "3")]
pub max_bytes_for_level_multiplier: u64,
#[prost(uint64, tag = "4")]
pub max_compaction_bytes: u64,
#[prost(uint64, tag = "5")]
pub sub_level_max_compaction_bytes: u64,
#[prost(uint64, tag = "7")]
pub level0_tier_compact_file_number: u64,
#[prost(enumeration = "compaction_config::CompactionMode", tag = "8")]
pub compaction_mode: i32,
#[prost(string, repeated, tag = "9")]
pub compression_algorithm: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "10")]
pub target_file_size_base: u64,
#[prost(uint32, tag = "11")]
pub compaction_filter_mask: u32,
#[prost(uint32, tag = "12")]
pub max_sub_compaction: u32,
#[prost(uint64, tag = "13")]
pub max_space_reclaim_bytes: u64,
#[prost(bool, tag = "14")]
pub split_by_state_table: bool,
#[prost(uint32, tag = "6")]
pub split_weight_by_vnode: u32,
#[prost(uint64, tag = "15")]
pub level0_stop_write_threshold_sub_level_number: u64,
#[prost(uint64, tag = "16")]
pub level0_max_compact_file_number: u64,
#[prost(uint32, tag = "17")]
pub level0_sub_level_compact_level_count: u32,
#[prost(uint32, tag = "18")]
pub level0_overlapping_sub_level_compact_level_count: u32,
#[prost(uint32, tag = "19")]
pub tombstone_reclaim_ratio: u32,
#[prost(bool, tag = "20")]
pub enable_emergency_picker: bool,
#[prost(uint32, optional, tag = "21")]
pub max_l0_compact_level_count: ::core::option::Option<u32>,
#[prost(uint64, optional, tag = "22")]
pub sst_allowed_trivial_move_min_size: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "23")]
pub disable_auto_group_scheduling: ::core::option::Option<bool>,
}
pub mod compaction_config {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CompactionMode {
Unspecified = 0,
Range = 1,
}
impl CompactionMode {
pub fn as_str_name(&self) -> &'static str {
match self {
CompactionMode::Unspecified => "UNSPECIFIED",
CompactionMode::Range => "RANGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"RANGE" => Some(Self::Range),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TableStats {
#[prost(int64, tag = "1")]
pub total_key_size: i64,
#[prost(int64, tag = "2")]
pub total_value_size: i64,
#[prost(int64, tag = "3")]
pub total_key_count: i64,
#[prost(uint64, tag = "4")]
pub total_compressed_size: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HummockVersionStats {
#[prost(uint64, tag = "1")]
pub hummock_version_id: u64,
#[prost(map = "uint32, message", tag = "2")]
pub table_stats: ::std::collections::HashMap<u32, TableStats>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteLimits {
#[prost(map = "uint64, message", tag = "1")]
pub write_limits: ::std::collections::HashMap<u64, write_limits::WriteLimit>,
}
pub mod write_limits {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteLimit {
#[prost(uint32, repeated, tag = "1")]
pub table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BranchedObject {
#[prost(uint64, tag = "1")]
pub object_id: u64,
#[prost(uint64, repeated, tag = "2")]
pub sst_id: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, tag = "3")]
pub compaction_group_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BloomFilterType {
BloomFilterUnspecified = 0,
Sstable = 1,
Blocked = 2,
}
impl BloomFilterType {
pub fn as_str_name(&self) -> &'static str {
match self {
BloomFilterType::BloomFilterUnspecified => "BLOOM_FILTER_UNSPECIFIED",
BloomFilterType::Sstable => "SSTABLE",
BloomFilterType::Blocked => "BLOCKED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BLOOM_FILTER_UNSPECIFIED" => Some(Self::BloomFilterUnspecified),
"SSTABLE" => Some(Self::Sstable),
"BLOCKED" => Some(Self::Blocked),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LevelType {
Unspecified = 0,
Nonoverlapping = 1,
Overlapping = 2,
}
impl LevelType {
pub fn as_str_name(&self) -> &'static str {
match self {
LevelType::Unspecified => "LEVEL_TYPE_UNSPECIFIED",
LevelType::Nonoverlapping => "LEVEL_TYPE_NONOVERLAPPING",
LevelType::Overlapping => "LEVEL_TYPE_OVERLAPPING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LEVEL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"LEVEL_TYPE_NONOVERLAPPING" => Some(Self::Nonoverlapping),
"LEVEL_TYPE_OVERLAPPING" => Some(Self::Overlapping),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CompatibilityVersion {
VersionUnspecified = 0,
NoTrivialSplit = 1,
NoMemberTableIds = 2,
SplitGroupByTableId = 3,
}
impl CompatibilityVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
CompatibilityVersion::VersionUnspecified => "VERSION_UNSPECIFIED",
CompatibilityVersion::NoTrivialSplit => "NO_TRIVIAL_SPLIT",
CompatibilityVersion::NoMemberTableIds => "NO_MEMBER_TABLE_IDS",
CompatibilityVersion::SplitGroupByTableId => "SPLIT_GROUP_BY_TABLE_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VERSION_UNSPECIFIED" => Some(Self::VersionUnspecified),
"NO_TRIVIAL_SPLIT" => Some(Self::NoTrivialSplit),
"NO_MEMBER_TABLE_IDS" => Some(Self::NoMemberTableIds),
"SPLIT_GROUP_BY_TABLE_ID" => Some(Self::SplitGroupByTableId),
_ => None,
}
}
}
pub mod hummock_manager_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct HummockManagerServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl HummockManagerServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> HummockManagerServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> HummockManagerServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
HummockManagerServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn unpin_version_before(
&mut self,
request: impl tonic::IntoRequest<super::UnpinVersionBeforeRequest>,
) -> std::result::Result<
tonic::Response<super::UnpinVersionBeforeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/UnpinVersionBefore",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"UnpinVersionBefore",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_current_version(
&mut self,
request: impl tonic::IntoRequest<super::GetCurrentVersionRequest>,
) -> std::result::Result<
tonic::Response<super::GetCurrentVersionResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/GetCurrentVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("hummock.HummockManagerService", "GetCurrentVersion"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_version_deltas(
&mut self,
request: impl tonic::IntoRequest<super::ListVersionDeltasRequest>,
) -> std::result::Result<
tonic::Response<super::ListVersionDeltasResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ListVersionDeltas",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("hummock.HummockManagerService", "ListVersionDeltas"),
);
self.inner.unary(req, path, codec).await
}
pub async fn replay_version_delta(
&mut self,
request: impl tonic::IntoRequest<super::ReplayVersionDeltaRequest>,
) -> std::result::Result<
tonic::Response<super::ReplayVersionDeltaResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ReplayVersionDelta",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"ReplayVersionDelta",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_assigned_compact_task_num(
&mut self,
request: impl tonic::IntoRequest<super::GetAssignedCompactTaskNumRequest>,
) -> std::result::Result<
tonic::Response<super::GetAssignedCompactTaskNumResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/GetAssignedCompactTaskNum",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"GetAssignedCompactTaskNum",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn trigger_compaction_deterministic(
&mut self,
request: impl tonic::IntoRequest<
super::TriggerCompactionDeterministicRequest,
>,
) -> std::result::Result<
tonic::Response<super::TriggerCompactionDeterministicResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/TriggerCompactionDeterministic",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"TriggerCompactionDeterministic",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn disable_commit_epoch(
&mut self,
request: impl tonic::IntoRequest<super::DisableCommitEpochRequest>,
) -> std::result::Result<
tonic::Response<super::DisableCommitEpochResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/DisableCommitEpoch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"DisableCommitEpoch",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_new_sst_ids(
&mut self,
request: impl tonic::IntoRequest<super::GetNewSstIdsRequest>,
) -> std::result::Result<
tonic::Response<super::GetNewSstIdsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/GetNewSstIds",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("hummock.HummockManagerService", "GetNewSstIds"),
);
self.inner.unary(req, path, codec).await
}
pub async fn trigger_manual_compaction(
&mut self,
request: impl tonic::IntoRequest<super::TriggerManualCompactionRequest>,
) -> std::result::Result<
tonic::Response<super::TriggerManualCompactionResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/TriggerManualCompaction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"TriggerManualCompaction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn trigger_full_gc(
&mut self,
request: impl tonic::IntoRequest<super::TriggerFullGcRequest>,
) -> std::result::Result<
tonic::Response<super::TriggerFullGcResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/TriggerFullGC",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("hummock.HummockManagerService", "TriggerFullGC"),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_get_pinned_versions_summary(
&mut self,
request: impl tonic::IntoRequest<
super::RiseCtlGetPinnedVersionsSummaryRequest,
>,
) -> std::result::Result<
tonic::Response<super::RiseCtlGetPinnedVersionsSummaryResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlGetPinnedVersionsSummary",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlGetPinnedVersionsSummary",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_list_compaction_group(
&mut self,
request: impl tonic::IntoRequest<super::RiseCtlListCompactionGroupRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlListCompactionGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlListCompactionGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlListCompactionGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_update_compaction_config(
&mut self,
request: impl tonic::IntoRequest<super::RiseCtlUpdateCompactionConfigRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlUpdateCompactionConfigResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlUpdateCompactionConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlUpdateCompactionConfig",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_pause_version_checkpoint(
&mut self,
request: impl tonic::IntoRequest<super::RiseCtlPauseVersionCheckpointRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlPauseVersionCheckpointResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlPauseVersionCheckpoint",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlPauseVersionCheckpoint",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_resume_version_checkpoint(
&mut self,
request: impl tonic::IntoRequest<
super::RiseCtlResumeVersionCheckpointRequest,
>,
) -> std::result::Result<
tonic::Response<super::RiseCtlResumeVersionCheckpointResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlResumeVersionCheckpoint",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlResumeVersionCheckpoint",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_get_checkpoint_version(
&mut self,
request: impl tonic::IntoRequest<super::RiseCtlGetCheckpointVersionRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlGetCheckpointVersionResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlGetCheckpointVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlGetCheckpointVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_rebuild_table_stats(
&mut self,
request: impl tonic::IntoRequest<super::RiseCtlRebuildTableStatsRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlRebuildTableStatsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlRebuildTableStats",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlRebuildTableStats",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn init_metadata_for_replay(
&mut self,
request: impl tonic::IntoRequest<super::InitMetadataForReplayRequest>,
) -> std::result::Result<
tonic::Response<super::InitMetadataForReplayResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/InitMetadataForReplay",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"InitMetadataForReplay",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn pin_version(
&mut self,
request: impl tonic::IntoRequest<super::PinVersionRequest>,
) -> std::result::Result<
tonic::Response<super::PinVersionResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/PinVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("hummock.HummockManagerService", "PinVersion"));
self.inner.unary(req, path, codec).await
}
pub async fn split_compaction_group(
&mut self,
request: impl tonic::IntoRequest<super::SplitCompactionGroupRequest>,
) -> std::result::Result<
tonic::Response<super::SplitCompactionGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/SplitCompactionGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"SplitCompactionGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rise_ctl_list_compaction_status(
&mut self,
request: impl tonic::IntoRequest<super::RiseCtlListCompactionStatusRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlListCompactionStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/RiseCtlListCompactionStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"RiseCtlListCompactionStatus",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn subscribe_compaction_event(
&mut self,
request: impl tonic::IntoStreamingRequest<
Message = super::SubscribeCompactionEventRequest,
>,
) -> std::result::Result<
tonic::Response<
tonic::codec::Streaming<super::SubscribeCompactionEventResponse>,
>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/SubscribeCompactionEvent",
);
let mut req = request.into_streaming_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"SubscribeCompactionEvent",
),
);
self.inner.streaming(req, path, codec).await
}
pub async fn report_compaction_task(
&mut self,
request: impl tonic::IntoRequest<super::ReportCompactionTaskRequest>,
) -> std::result::Result<
tonic::Response<super::ReportCompactionTaskResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ReportCompactionTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"ReportCompactionTask",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_branched_object(
&mut self,
request: impl tonic::IntoRequest<super::ListBranchedObjectRequest>,
) -> std::result::Result<
tonic::Response<super::ListBranchedObjectResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ListBranchedObject",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"ListBranchedObject",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_active_write_limit(
&mut self,
request: impl tonic::IntoRequest<super::ListActiveWriteLimitRequest>,
) -> std::result::Result<
tonic::Response<super::ListActiveWriteLimitResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ListActiveWriteLimit",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"ListActiveWriteLimit",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_hummock_meta_config(
&mut self,
request: impl tonic::IntoRequest<super::ListHummockMetaConfigRequest>,
) -> std::result::Result<
tonic::Response<super::ListHummockMetaConfigResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ListHummockMetaConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"ListHummockMetaConfig",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_compaction_score(
&mut self,
request: impl tonic::IntoRequest<super::GetCompactionScoreRequest>,
) -> std::result::Result<
tonic::Response<super::GetCompactionScoreResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/GetCompactionScore",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"GetCompactionScore",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_compact_task_assignment(
&mut self,
request: impl tonic::IntoRequest<super::ListCompactTaskAssignmentRequest>,
) -> std::result::Result<
tonic::Response<super::ListCompactTaskAssignmentResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ListCompactTaskAssignment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"ListCompactTaskAssignment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_compact_task_progress(
&mut self,
request: impl tonic::IntoRequest<super::ListCompactTaskProgressRequest>,
) -> std::result::Result<
tonic::Response<super::ListCompactTaskProgressResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/ListCompactTaskProgress",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"ListCompactTaskProgress",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn cancel_compact_task(
&mut self,
request: impl tonic::IntoRequest<super::CancelCompactTaskRequest>,
) -> std::result::Result<
tonic::Response<super::CancelCompactTaskResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/CancelCompactTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("hummock.HummockManagerService", "CancelCompactTask"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_version_by_epoch(
&mut self,
request: impl tonic::IntoRequest<super::GetVersionByEpochRequest>,
) -> std::result::Result<
tonic::Response<super::GetVersionByEpochResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/GetVersionByEpoch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("hummock.HummockManagerService", "GetVersionByEpoch"),
);
self.inner.unary(req, path, codec).await
}
pub async fn merge_compaction_group(
&mut self,
request: impl tonic::IntoRequest<super::MergeCompactionGroupRequest>,
) -> std::result::Result<
tonic::Response<super::MergeCompactionGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/hummock.HummockManagerService/MergeCompactionGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"hummock.HummockManagerService",
"MergeCompactionGroup",
),
);
self.inner.unary(req, path, codec).await
}
}
}
pub mod hummock_manager_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait HummockManagerService: std::marker::Send + std::marker::Sync + 'static {
async fn unpin_version_before(
&self,
request: tonic::Request<super::UnpinVersionBeforeRequest>,
) -> std::result::Result<
tonic::Response<super::UnpinVersionBeforeResponse>,
tonic::Status,
>;
async fn get_current_version(
&self,
request: tonic::Request<super::GetCurrentVersionRequest>,
) -> std::result::Result<
tonic::Response<super::GetCurrentVersionResponse>,
tonic::Status,
>;
async fn list_version_deltas(
&self,
request: tonic::Request<super::ListVersionDeltasRequest>,
) -> std::result::Result<
tonic::Response<super::ListVersionDeltasResponse>,
tonic::Status,
>;
async fn replay_version_delta(
&self,
request: tonic::Request<super::ReplayVersionDeltaRequest>,
) -> std::result::Result<
tonic::Response<super::ReplayVersionDeltaResponse>,
tonic::Status,
>;
async fn get_assigned_compact_task_num(
&self,
request: tonic::Request<super::GetAssignedCompactTaskNumRequest>,
) -> std::result::Result<
tonic::Response<super::GetAssignedCompactTaskNumResponse>,
tonic::Status,
>;
async fn trigger_compaction_deterministic(
&self,
request: tonic::Request<super::TriggerCompactionDeterministicRequest>,
) -> std::result::Result<
tonic::Response<super::TriggerCompactionDeterministicResponse>,
tonic::Status,
>;
async fn disable_commit_epoch(
&self,
request: tonic::Request<super::DisableCommitEpochRequest>,
) -> std::result::Result<
tonic::Response<super::DisableCommitEpochResponse>,
tonic::Status,
>;
async fn get_new_sst_ids(
&self,
request: tonic::Request<super::GetNewSstIdsRequest>,
) -> std::result::Result<
tonic::Response<super::GetNewSstIdsResponse>,
tonic::Status,
>;
async fn trigger_manual_compaction(
&self,
request: tonic::Request<super::TriggerManualCompactionRequest>,
) -> std::result::Result<
tonic::Response<super::TriggerManualCompactionResponse>,
tonic::Status,
>;
async fn trigger_full_gc(
&self,
request: tonic::Request<super::TriggerFullGcRequest>,
) -> std::result::Result<
tonic::Response<super::TriggerFullGcResponse>,
tonic::Status,
>;
async fn rise_ctl_get_pinned_versions_summary(
&self,
request: tonic::Request<super::RiseCtlGetPinnedVersionsSummaryRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlGetPinnedVersionsSummaryResponse>,
tonic::Status,
>;
async fn rise_ctl_list_compaction_group(
&self,
request: tonic::Request<super::RiseCtlListCompactionGroupRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlListCompactionGroupResponse>,
tonic::Status,
>;
async fn rise_ctl_update_compaction_config(
&self,
request: tonic::Request<super::RiseCtlUpdateCompactionConfigRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlUpdateCompactionConfigResponse>,
tonic::Status,
>;
async fn rise_ctl_pause_version_checkpoint(
&self,
request: tonic::Request<super::RiseCtlPauseVersionCheckpointRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlPauseVersionCheckpointResponse>,
tonic::Status,
>;
async fn rise_ctl_resume_version_checkpoint(
&self,
request: tonic::Request<super::RiseCtlResumeVersionCheckpointRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlResumeVersionCheckpointResponse>,
tonic::Status,
>;
async fn rise_ctl_get_checkpoint_version(
&self,
request: tonic::Request<super::RiseCtlGetCheckpointVersionRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlGetCheckpointVersionResponse>,
tonic::Status,
>;
async fn rise_ctl_rebuild_table_stats(
&self,
request: tonic::Request<super::RiseCtlRebuildTableStatsRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlRebuildTableStatsResponse>,
tonic::Status,
>;
async fn init_metadata_for_replay(
&self,
request: tonic::Request<super::InitMetadataForReplayRequest>,
) -> std::result::Result<
tonic::Response<super::InitMetadataForReplayResponse>,
tonic::Status,
>;
async fn pin_version(
&self,
request: tonic::Request<super::PinVersionRequest>,
) -> std::result::Result<
tonic::Response<super::PinVersionResponse>,
tonic::Status,
>;
async fn split_compaction_group(
&self,
request: tonic::Request<super::SplitCompactionGroupRequest>,
) -> std::result::Result<
tonic::Response<super::SplitCompactionGroupResponse>,
tonic::Status,
>;
async fn rise_ctl_list_compaction_status(
&self,
request: tonic::Request<super::RiseCtlListCompactionStatusRequest>,
) -> std::result::Result<
tonic::Response<super::RiseCtlListCompactionStatusResponse>,
tonic::Status,
>;
type SubscribeCompactionEventStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::SubscribeCompactionEventResponse,
tonic::Status,
>,
>
+ std::marker::Send
+ 'static;
async fn subscribe_compaction_event(
&self,
request: tonic::Request<
tonic::Streaming<super::SubscribeCompactionEventRequest>,
>,
) -> std::result::Result<
tonic::Response<Self::SubscribeCompactionEventStream>,
tonic::Status,
>;
async fn report_compaction_task(
&self,
request: tonic::Request<super::ReportCompactionTaskRequest>,
) -> std::result::Result<
tonic::Response<super::ReportCompactionTaskResponse>,
tonic::Status,
>;
async fn list_branched_object(
&self,
request: tonic::Request<super::ListBranchedObjectRequest>,
) -> std::result::Result<
tonic::Response<super::ListBranchedObjectResponse>,
tonic::Status,
>;
async fn list_active_write_limit(
&self,
request: tonic::Request<super::ListActiveWriteLimitRequest>,
) -> std::result::Result<
tonic::Response<super::ListActiveWriteLimitResponse>,
tonic::Status,
>;
async fn list_hummock_meta_config(
&self,
request: tonic::Request<super::ListHummockMetaConfigRequest>,
) -> std::result::Result<
tonic::Response<super::ListHummockMetaConfigResponse>,
tonic::Status,
>;
async fn get_compaction_score(
&self,
request: tonic::Request<super::GetCompactionScoreRequest>,
) -> std::result::Result<
tonic::Response<super::GetCompactionScoreResponse>,
tonic::Status,
>;
async fn list_compact_task_assignment(
&self,
request: tonic::Request<super::ListCompactTaskAssignmentRequest>,
) -> std::result::Result<
tonic::Response<super::ListCompactTaskAssignmentResponse>,
tonic::Status,
>;
async fn list_compact_task_progress(
&self,
request: tonic::Request<super::ListCompactTaskProgressRequest>,
) -> std::result::Result<
tonic::Response<super::ListCompactTaskProgressResponse>,
tonic::Status,
>;
async fn cancel_compact_task(
&self,
request: tonic::Request<super::CancelCompactTaskRequest>,
) -> std::result::Result<
tonic::Response<super::CancelCompactTaskResponse>,
tonic::Status,
>;
async fn get_version_by_epoch(
&self,
request: tonic::Request<super::GetVersionByEpochRequest>,
) -> std::result::Result<
tonic::Response<super::GetVersionByEpochResponse>,
tonic::Status,
>;
async fn merge_compaction_group(
&self,
request: tonic::Request<super::MergeCompactionGroupRequest>,
) -> std::result::Result<
tonic::Response<super::MergeCompactionGroupResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct HummockManagerServiceServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> HummockManagerServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>>
for HummockManagerServiceServer<T>
where
T: HummockManagerService,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/hummock.HummockManagerService/UnpinVersionBefore" => {
#[allow(non_camel_case_types)]
struct UnpinVersionBeforeSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::UnpinVersionBeforeRequest>
for UnpinVersionBeforeSvc<T> {
type Response = super::UnpinVersionBeforeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UnpinVersionBeforeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::unpin_version_before(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = UnpinVersionBeforeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/GetCurrentVersion" => {
#[allow(non_camel_case_types)]
struct GetCurrentVersionSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::GetCurrentVersionRequest>
for GetCurrentVersionSvc<T> {
type Response = super::GetCurrentVersionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetCurrentVersionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::get_current_version(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetCurrentVersionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ListVersionDeltas" => {
#[allow(non_camel_case_types)]
struct ListVersionDeltasSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::ListVersionDeltasRequest>
for ListVersionDeltasSvc<T> {
type Response = super::ListVersionDeltasResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListVersionDeltasRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::list_version_deltas(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListVersionDeltasSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ReplayVersionDelta" => {
#[allow(non_camel_case_types)]
struct ReplayVersionDeltaSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::ReplayVersionDeltaRequest>
for ReplayVersionDeltaSvc<T> {
type Response = super::ReplayVersionDeltaResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReplayVersionDeltaRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::replay_version_delta(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ReplayVersionDeltaSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/GetAssignedCompactTaskNum" => {
#[allow(non_camel_case_types)]
struct GetAssignedCompactTaskNumSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::GetAssignedCompactTaskNumRequest,
> for GetAssignedCompactTaskNumSvc<T> {
type Response = super::GetAssignedCompactTaskNumResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::GetAssignedCompactTaskNumRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::get_assigned_compact_task_num(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetAssignedCompactTaskNumSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/TriggerCompactionDeterministic" => {
#[allow(non_camel_case_types)]
struct TriggerCompactionDeterministicSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::TriggerCompactionDeterministicRequest,
> for TriggerCompactionDeterministicSvc<T> {
type Response = super::TriggerCompactionDeterministicResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::TriggerCompactionDeterministicRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::trigger_compaction_deterministic(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TriggerCompactionDeterministicSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/DisableCommitEpoch" => {
#[allow(non_camel_case_types)]
struct DisableCommitEpochSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::DisableCommitEpochRequest>
for DisableCommitEpochSvc<T> {
type Response = super::DisableCommitEpochResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DisableCommitEpochRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::disable_commit_epoch(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DisableCommitEpochSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/GetNewSstIds" => {
#[allow(non_camel_case_types)]
struct GetNewSstIdsSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::GetNewSstIdsRequest>
for GetNewSstIdsSvc<T> {
type Response = super::GetNewSstIdsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetNewSstIdsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::get_new_sst_ids(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetNewSstIdsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/TriggerManualCompaction" => {
#[allow(non_camel_case_types)]
struct TriggerManualCompactionSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::TriggerManualCompactionRequest>
for TriggerManualCompactionSvc<T> {
type Response = super::TriggerManualCompactionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::TriggerManualCompactionRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::trigger_manual_compaction(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TriggerManualCompactionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/TriggerFullGC" => {
#[allow(non_camel_case_types)]
struct TriggerFullGCSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::TriggerFullGcRequest>
for TriggerFullGCSvc<T> {
type Response = super::TriggerFullGcResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TriggerFullGcRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::trigger_full_gc(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TriggerFullGCSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlGetPinnedVersionsSummary" => {
#[allow(non_camel_case_types)]
struct RiseCtlGetPinnedVersionsSummarySvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::RiseCtlGetPinnedVersionsSummaryRequest,
> for RiseCtlGetPinnedVersionsSummarySvc<T> {
type Response = super::RiseCtlGetPinnedVersionsSummaryResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlGetPinnedVersionsSummaryRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_get_pinned_versions_summary(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlGetPinnedVersionsSummarySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlListCompactionGroup" => {
#[allow(non_camel_case_types)]
struct RiseCtlListCompactionGroupSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::RiseCtlListCompactionGroupRequest,
> for RiseCtlListCompactionGroupSvc<T> {
type Response = super::RiseCtlListCompactionGroupResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlListCompactionGroupRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_list_compaction_group(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlListCompactionGroupSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlUpdateCompactionConfig" => {
#[allow(non_camel_case_types)]
struct RiseCtlUpdateCompactionConfigSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::RiseCtlUpdateCompactionConfigRequest,
> for RiseCtlUpdateCompactionConfigSvc<T> {
type Response = super::RiseCtlUpdateCompactionConfigResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlUpdateCompactionConfigRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_update_compaction_config(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlUpdateCompactionConfigSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlPauseVersionCheckpoint" => {
#[allow(non_camel_case_types)]
struct RiseCtlPauseVersionCheckpointSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::RiseCtlPauseVersionCheckpointRequest,
> for RiseCtlPauseVersionCheckpointSvc<T> {
type Response = super::RiseCtlPauseVersionCheckpointResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlPauseVersionCheckpointRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_pause_version_checkpoint(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlPauseVersionCheckpointSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlResumeVersionCheckpoint" => {
#[allow(non_camel_case_types)]
struct RiseCtlResumeVersionCheckpointSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::RiseCtlResumeVersionCheckpointRequest,
> for RiseCtlResumeVersionCheckpointSvc<T> {
type Response = super::RiseCtlResumeVersionCheckpointResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlResumeVersionCheckpointRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_resume_version_checkpoint(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlResumeVersionCheckpointSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlGetCheckpointVersion" => {
#[allow(non_camel_case_types)]
struct RiseCtlGetCheckpointVersionSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::RiseCtlGetCheckpointVersionRequest,
> for RiseCtlGetCheckpointVersionSvc<T> {
type Response = super::RiseCtlGetCheckpointVersionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlGetCheckpointVersionRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_get_checkpoint_version(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlGetCheckpointVersionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlRebuildTableStats" => {
#[allow(non_camel_case_types)]
struct RiseCtlRebuildTableStatsSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::RiseCtlRebuildTableStatsRequest>
for RiseCtlRebuildTableStatsSvc<T> {
type Response = super::RiseCtlRebuildTableStatsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlRebuildTableStatsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_rebuild_table_stats(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlRebuildTableStatsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/InitMetadataForReplay" => {
#[allow(non_camel_case_types)]
struct InitMetadataForReplaySvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::InitMetadataForReplayRequest>
for InitMetadataForReplaySvc<T> {
type Response = super::InitMetadataForReplayResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::InitMetadataForReplayRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::init_metadata_for_replay(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = InitMetadataForReplaySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/PinVersion" => {
#[allow(non_camel_case_types)]
struct PinVersionSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::PinVersionRequest>
for PinVersionSvc<T> {
type Response = super::PinVersionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::PinVersionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::pin_version(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = PinVersionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/SplitCompactionGroup" => {
#[allow(non_camel_case_types)]
struct SplitCompactionGroupSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::SplitCompactionGroupRequest>
for SplitCompactionGroupSvc<T> {
type Response = super::SplitCompactionGroupResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SplitCompactionGroupRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::split_compaction_group(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SplitCompactionGroupSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/RiseCtlListCompactionStatus" => {
#[allow(non_camel_case_types)]
struct RiseCtlListCompactionStatusSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::RiseCtlListCompactionStatusRequest,
> for RiseCtlListCompactionStatusSvc<T> {
type Response = super::RiseCtlListCompactionStatusResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::RiseCtlListCompactionStatusRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::rise_ctl_list_compaction_status(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RiseCtlListCompactionStatusSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/SubscribeCompactionEvent" => {
#[allow(non_camel_case_types)]
struct SubscribeCompactionEventSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::StreamingService<
super::SubscribeCompactionEventRequest,
> for SubscribeCompactionEventSvc<T> {
type Response = super::SubscribeCompactionEventResponse;
type ResponseStream = T::SubscribeCompactionEventStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
tonic::Streaming<super::SubscribeCompactionEventRequest>,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::subscribe_compaction_event(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SubscribeCompactionEventSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ReportCompactionTask" => {
#[allow(non_camel_case_types)]
struct ReportCompactionTaskSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::ReportCompactionTaskRequest>
for ReportCompactionTaskSvc<T> {
type Response = super::ReportCompactionTaskResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReportCompactionTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::report_compaction_task(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ReportCompactionTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ListBranchedObject" => {
#[allow(non_camel_case_types)]
struct ListBranchedObjectSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::ListBranchedObjectRequest>
for ListBranchedObjectSvc<T> {
type Response = super::ListBranchedObjectResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListBranchedObjectRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::list_branched_object(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListBranchedObjectSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ListActiveWriteLimit" => {
#[allow(non_camel_case_types)]
struct ListActiveWriteLimitSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::ListActiveWriteLimitRequest>
for ListActiveWriteLimitSvc<T> {
type Response = super::ListActiveWriteLimitResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListActiveWriteLimitRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::list_active_write_limit(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListActiveWriteLimitSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ListHummockMetaConfig" => {
#[allow(non_camel_case_types)]
struct ListHummockMetaConfigSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::ListHummockMetaConfigRequest>
for ListHummockMetaConfigSvc<T> {
type Response = super::ListHummockMetaConfigResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListHummockMetaConfigRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::list_hummock_meta_config(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListHummockMetaConfigSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/GetCompactionScore" => {
#[allow(non_camel_case_types)]
struct GetCompactionScoreSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::GetCompactionScoreRequest>
for GetCompactionScoreSvc<T> {
type Response = super::GetCompactionScoreResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetCompactionScoreRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::get_compaction_score(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetCompactionScoreSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ListCompactTaskAssignment" => {
#[allow(non_camel_case_types)]
struct ListCompactTaskAssignmentSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<
super::ListCompactTaskAssignmentRequest,
> for ListCompactTaskAssignmentSvc<T> {
type Response = super::ListCompactTaskAssignmentResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::ListCompactTaskAssignmentRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::list_compact_task_assignment(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListCompactTaskAssignmentSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/ListCompactTaskProgress" => {
#[allow(non_camel_case_types)]
struct ListCompactTaskProgressSvc<T: HummockManagerService>(
pub Arc<T>,
);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::ListCompactTaskProgressRequest>
for ListCompactTaskProgressSvc<T> {
type Response = super::ListCompactTaskProgressResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::ListCompactTaskProgressRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::list_compact_task_progress(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListCompactTaskProgressSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/CancelCompactTask" => {
#[allow(non_camel_case_types)]
struct CancelCompactTaskSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::CancelCompactTaskRequest>
for CancelCompactTaskSvc<T> {
type Response = super::CancelCompactTaskResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CancelCompactTaskRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::cancel_compact_task(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CancelCompactTaskSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/GetVersionByEpoch" => {
#[allow(non_camel_case_types)]
struct GetVersionByEpochSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::GetVersionByEpochRequest>
for GetVersionByEpochSvc<T> {
type Response = super::GetVersionByEpochResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetVersionByEpochRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::get_version_by_epoch(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetVersionByEpochSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/hummock.HummockManagerService/MergeCompactionGroup" => {
#[allow(non_camel_case_types)]
struct MergeCompactionGroupSvc<T: HummockManagerService>(pub Arc<T>);
impl<
T: HummockManagerService,
> tonic::server::UnaryService<super::MergeCompactionGroupRequest>
for MergeCompactionGroupSvc<T> {
type Response = super::MergeCompactionGroupResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MergeCompactionGroupRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HummockManagerService>::merge_compaction_group(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = MergeCompactionGroupSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", tonic::Code::Unimplemented as i32)
.header(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
)
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T> Clone for HummockManagerServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "hummock.HummockManagerService";
impl<T> tonic::server::NamedService for HummockManagerServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}