refactor: Use CompactorHandlerImpl::new_with_compactor in service

pull/24376/head
Jake Goulding 2022-08-05 11:08:01 -04:00 committed by Carol (Nichols || Goulding)
parent cc061b6ce9
commit ce908c8678
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
3 changed files with 8 additions and 3 deletions

1
Cargo.lock generated
View File

@ -2373,6 +2373,7 @@ name = "ioxd_compactor"
version = "0.1.0"
dependencies = [
"async-trait",
"backoff",
"clap_blocks",
"compactor",
"data_types",

View File

@ -7,6 +7,7 @@ edition = "2021"
[dependencies]
# Workspace dependencies, in alphabetical order
backoff = { path = "../backoff" }
clap_blocks = { path = "../clap_blocks" }
compactor = { path = "../compactor" }
data_types = { path = "../data_types" }

View File

@ -176,16 +176,19 @@ pub async fn create_compactor_server_type(
compactor_config.input_file_count_threshold,
compactor_config.hot_multiple,
);
let compactor_handler = Arc::new(CompactorHandlerImpl::new(
let compactor = compactor::compact::Compactor::new(
sequencers,
catalog,
parquet_store,
exec,
time_provider,
Arc::clone(&metric_registry),
backoff::BackoffConfig::default(),
compactor_config,
));
Arc::clone(&metric_registry),
);
let compactor_handler = Arc::new(CompactorHandlerImpl::new_with_compactor(compactor));
let compactor = CompactorServer::new(metric_registry, compactor_handler);
Ok(Arc::new(CompactorServerType::new(compactor, common_state)))
}