Skip to content

Commit

Permalink
refactor(idpe-17789): rename PartitionStream to CompactionJobStream
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedld committed Jul 25, 2023
1 parent 5afc6e6 commit 2f51333
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions compactor/src/components/hardcoded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use super::{
metrics::MetricsPartitionSourceWrapper,
},
partition_stream::{
endless::EndlessPartititionStream, once::OncePartititionStream, PartitionStream,
endless::EndlessPartititionStream, once::OncePartititionStream, CompactionJobStream,
},
post_classification_partition_filter::{
logging::LoggingPostClassificationFilterWrapper,
Expand Down Expand Up @@ -184,7 +184,7 @@ fn make_jobs_source_commit_partition_sink(
fn make_partition_stream(
config: &Config,
compaction_jobs_source: Arc<dyn CompactionJobsSource>,
) -> Arc<dyn PartitionStream> {
) -> Arc<dyn CompactionJobStream> {
if config.process_once {
Arc::new(OncePartititionStream::new(compaction_jobs_source))
} else {
Expand Down
4 changes: 2 additions & 2 deletions compactor/src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use self::{
file_classifier::FileClassifier, ir_planner::IRPlanner, parquet_files_sink::ParquetFilesSink,
partition_done_sink::PartitionDoneSink, partition_files_source::PartitionFilesSource,
partition_filter::PartitionFilter, partition_info_source::PartitionInfoSource,
partition_stream::PartitionStream,
partition_stream::CompactionJobStream,
post_classification_partition_filter::PostClassificationPartitionFilter,
round_info_source::RoundInfoSource, round_split::RoundSplit, scratchpad::ScratchpadGen,
};
Expand Down Expand Up @@ -47,7 +47,7 @@ pub mod timeout;
#[derive(Debug, Clone)]
pub struct Components {
/// Source of partitions for the compactor to compact
pub partition_stream: Arc<dyn PartitionStream>,
pub partition_stream: Arc<dyn CompactionJobStream>,
/// Source of information about a partition neededed for compaction
pub partition_info_source: Arc<dyn PartitionInfoSource>,
/// Source of files in a partition for compaction
Expand Down
4 changes: 2 additions & 2 deletions compactor/src/components/partition_stream/endless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use futures::{stream::BoxStream, StreamExt};
use super::super::{
compaction_jobs_source::CompactionJobsSource, partition_files_source::rate_limit::RateLimit,
};
use super::PartitionStream;
use super::CompactionJobStream;

#[derive(Debug)]
pub struct EndlessPartititionStream<T>
Expand Down Expand Up @@ -38,7 +38,7 @@ where
}
}

impl<T> PartitionStream for EndlessPartititionStream<T>
impl<T> CompactionJobStream for EndlessPartititionStream<T>
where
T: CompactionJobsSource,
{
Expand Down
4 changes: 2 additions & 2 deletions compactor/src/components/partition_stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pub mod endless;
pub mod once;

/// Source for partitions.
pub trait PartitionStream: Debug + Display + Send + Sync {
/// Create new source stream of compaction job.
pub trait CompactionJobStream: Debug + Display + Send + Sync {
/// Create new source stream of compaction jobs.
///
/// This stream may be endless.
fn stream(&self) -> BoxStream<'_, CompactionJob>;
Expand Down
4 changes: 2 additions & 2 deletions compactor/src/components/partition_stream/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{fmt::Display, sync::Arc};
use compactor_scheduler::CompactionJob;
use futures::{stream::BoxStream, StreamExt};

use super::{super::compaction_jobs_source::CompactionJobsSource, PartitionStream};
use super::{super::compaction_jobs_source::CompactionJobsSource, CompactionJobStream};

#[derive(Debug)]
pub struct OncePartititionStream<T>
Expand Down Expand Up @@ -33,7 +33,7 @@ where
}
}

impl<T> PartitionStream for OncePartititionStream<T>
impl<T> CompactionJobStream for OncePartititionStream<T>
where
T: CompactionJobsSource,
{
Expand Down

0 comments on commit 2f51333

Please sign in to comment.