Skip to content

Commit

Permalink
chore: Removed ScaleHorizon/Common/VerticalCmds from `src/ctl/lib.r…
Browse files Browse the repository at this point in the history
…s` (#17599)
  • Loading branch information
shanicky authored Jul 8, 2024
1 parent 9648c9f commit fb4ec6b
Showing 1 changed file with 0 additions and 75 deletions.
75 changes: 0 additions & 75 deletions src/ctl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,81 +363,6 @@ enum TableCommands {
List,
}

#[derive(clap::Args, Debug, Clone)]
pub struct ScaleHorizonCommands {
/// The worker that needs to be excluded during scheduling, `worker_id` and `worker_host:worker_port` are both
/// supported
#[clap(
long,
value_delimiter = ',',
value_name = "worker_id or worker_host:worker_port, ..."
)]
exclude_workers: Option<Vec<String>>,

/// The worker that needs to be included during scheduling, `worker_id` and `worker_host:worker_port` are both
/// supported
#[clap(
long,
value_delimiter = ',',
value_name = "all or worker_id or worker_host:worker_port, ..."
)]
include_workers: Option<Vec<String>>,

/// The target parallelism, currently, it is used to limit the target parallelism and only
/// takes effect when the actual parallelism exceeds this value. Can be used in conjunction
/// with `exclude/include_workers`.
#[clap(long)]
target_parallelism: Option<u32>,

#[command(flatten)]
common: ScaleCommon,
}

#[derive(clap::Args, Debug, Clone)]
pub struct ScaleCommon {
/// Will generate a plan supported by the `reschedule` command and save it to the provided path
/// by the `--output`.
#[clap(long, default_value_t = false)]
generate: bool,

/// The output file to write the generated plan to, standard output by default
#[clap(long)]
output: Option<String>,

/// Automatic yes to prompts
#[clap(short = 'y', long, default_value_t = false)]
yes: bool,

/// Specify the fragment ids that need to be scheduled.
/// empty by default, which means all fragments will be scheduled
#[clap(long, value_delimiter = ',')]
fragments: Option<Vec<u32>>,
}

#[derive(clap::Args, Debug, Clone)]
pub struct ScaleVerticalCommands {
#[command(flatten)]
common: ScaleCommon,

/// The worker that needs to be scheduled, `worker_id` and `worker_host:worker_port` are both
/// supported
#[clap(
long,
required = true,
value_delimiter = ',',
value_name = "all or worker_id or worker_host:worker_port, ..."
)]
workers: Option<Vec<String>>,

/// The target parallelism per worker, requires `workers` to be set.
#[clap(long, required = true)]
target_parallelism_per_worker: Option<u32>,

/// It will exclude all other workers to maintain the target parallelism only for the target workers.
#[clap(long, default_value_t = false)]
exclusive: bool,
}

#[derive(Subcommand, Debug)]
enum ScaleCommands {
/// Mark a compute node as unschedulable
Expand Down

0 comments on commit fb4ec6b

Please sign in to comment.