Skip to content

Commit 3c33395

Browse files
committed
Remove build-binary
1 parent c1b6a78 commit 3c33395

7 files changed

Lines changed: 23 additions & 31 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ballista/core/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ exclude = ["*.proto"]
3535
rustc-args = ["--cfg", "docsrs"]
3636

3737
[features]
38-
build-binary = ["aws-config", "aws-credential-types", "clap", "object_store"]
3938
docsrs = []
4039
# Used for testing ONLY: causes all values to hash to the same value (test for collisions)
4140
force_hash_collisions = ["datafusion/force_hash_collisions"]
@@ -45,11 +44,10 @@ vortex = ["vortex-array", "vortex-buffer", "vortex-dtype", "vortex-error", "vort
4544
[dependencies]
4645
arrow-flight = { workspace = true }
4746
async-trait = { workspace = true }
48-
aws-config = { version = "1.6.0", optional = true }
49-
aws-credential-types = { version = "1.2.0", optional = true }
47+
aws-config = { version = "1.6.0" }
48+
aws-credential-types = { version = "1.2.0" }
5049
bytes = { workspace = true }
5150
chrono = { version = "0.4", default-features = false }
52-
clap = { workspace = true, optional = true }
5351
dashmap = "6"
5452
datafusion = { workspace = true }
5553
datafusion-proto = { workspace = true }
@@ -58,7 +56,7 @@ futures = { workspace = true }
5856
itertools = "0.14"
5957
log = { workspace = true }
6058
md-5 = { version = "^0.10.0" }
61-
object_store = { workspace = true, features = ["aws", "azure", "http"], optional = true }
59+
object_store = { workspace = true, features = ["aws", "azure", "http"] }
6260
parking_lot = { workspace = true }
6361
prost = { workspace = true }
6462
prost-types = { workspace = true }

ballista/core/src/config.rs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ impl datafusion::config::ConfigExtension for BallistaConfig {
468468
/// Ballista supports both push-based and pull-based task scheduling.
469469
/// It is recommended that you try both to determine which is the best for your use case.
470470
#[derive(Clone, Copy, Debug, serde::Deserialize, Default)]
471-
#[cfg_attr(feature = "build-binary", derive(clap::ValueEnum))]
472471
pub enum TaskSchedulingPolicy {
473472
/// Pull-based scheduling works in a similar way to Apache Spark
474473
#[default]
@@ -485,18 +484,23 @@ impl Display for TaskSchedulingPolicy {
485484
}
486485
}
487486

488-
#[cfg(feature = "build-binary")]
489487
impl std::str::FromStr for TaskSchedulingPolicy {
490488
type Err = String;
491489

492490
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
493-
clap::ValueEnum::from_str(s, true)
491+
match s.to_lowercase().as_str() {
492+
"pull-staged" | "pullstaged" => Ok(TaskSchedulingPolicy::PullStaged),
493+
"push-staged" | "pushstaged" => Ok(TaskSchedulingPolicy::PushStaged),
494+
_ => Err(format!(
495+
"Invalid scheduling policy '{}'. Valid options: 'pull-staged', 'push-staged'",
496+
s
497+
)),
498+
}
494499
}
495500
}
496501

497502
/// Configures the log file rotation policy.
498503
#[derive(Clone, Copy, Debug, serde::Deserialize, Default)]
499-
#[cfg_attr(feature = "build-binary", derive(clap::ValueEnum))]
500504
pub enum LogRotationPolicy {
501505
/// Rotate log files every minute.
502506
Minutely,
@@ -520,12 +524,20 @@ impl Display for LogRotationPolicy {
520524
}
521525
}
522526

523-
#[cfg(feature = "build-binary")]
524527
impl std::str::FromStr for LogRotationPolicy {
525528
type Err = String;
526529

527530
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
528-
clap::ValueEnum::from_str(s, true)
531+
match s.to_lowercase().as_str() {
532+
"minutely" => Ok(LogRotationPolicy::Minutely),
533+
"hourly" => Ok(LogRotationPolicy::Hourly),
534+
"daily" => Ok(LogRotationPolicy::Daily),
535+
"never" => Ok(LogRotationPolicy::Never),
536+
_ => Err(format!(
537+
"Invalid rotation policy '{}'. Valid options: 'minutely', 'hourly', 'daily', 'never'",
538+
s
539+
)),
540+
}
529541
}
530542
}
531543

ballista/core/src/execution_plans/shuffle_reader.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ use std::result;
2828
use std::sync::Arc;
2929
use std::task::{Context, Poll};
3030

31-
#[cfg(feature = "build-binary")]
3231
use object_store::ObjectStore;
33-
#[cfg(feature = "build-binary")]
3432
use object_store::aws::AmazonS3Builder;
35-
#[cfg(feature = "build-binary")]
3633
use object_store::azure::MicrosoftAzureBuilder;
37-
#[cfg(feature = "build-binary")]
3834
use url::Url;
3935

4036
use crate::client::BallistaClient;
@@ -841,7 +837,6 @@ fn check_is_object_store_location(location: &PartitionLocation) -> bool {
841837
path.starts_with("s3://") || path.starts_with("abfs://") || path.starts_with("az://")
842838
}
843839

844-
#[cfg(feature = "build-binary")]
845840
async fn fetch_partition_object_store(
846841
location: &PartitionLocation,
847842
) -> result::Result<SendableRecordBatchStream, BallistaError> {
@@ -877,16 +872,6 @@ async fn fetch_partition_object_store(
877872
Ok(Box::pin(RecordBatchStreamAdapter::new(schema, stream)))
878873
}
879874

880-
#[cfg(not(feature = "build-binary"))]
881-
async fn fetch_partition_object_store(
882-
_location: &PartitionLocation,
883-
) -> result::Result<SendableRecordBatchStream, BallistaError> {
884-
Err(BallistaError::NotImplemented(
885-
"Object store support requires 'build-binary' feature".to_string(),
886-
))
887-
}
888-
889-
#[cfg(feature = "build-binary")]
890875
async fn fetch_partition_object_store_inner(
891876
path: &str,
892877
) -> result::Result<Vec<RecordBatch>, BallistaError> {

ballista/core/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ pub mod event_loop;
4545
pub mod execution_plans;
4646
/// Extension traits and utilities for DataFusion integration.
4747
pub mod extension;
48-
#[cfg(feature = "build-binary")]
4948
/// Object store configuration and utilities for distributed file access.
5049
pub mod object_store;
5150
/// Query planning utilities for distributed execution.
@@ -57,7 +56,6 @@ pub mod remote_catalog;
5756
/// Serialization and deserialization for Ballista messages and plans.
5857
pub mod serde;
5958
/// Shuffle storage abstraction for local and object store backends.
60-
#[cfg(feature = "build-binary")]
6159
pub mod shuffle_storage;
6260
/// General utility functions for Ballista operations.
6361
pub mod utils;

ballista/executor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ path = "src/bin/main.rs"
3333
required-features = ["build-binary"]
3434

3535
[features]
36-
build-binary = ["clap", "tracing-subscriber", "tracing-appender", "tracing", "ballista-core/build-binary"]
36+
build-binary = ["clap", "tracing-subscriber", "tracing-appender", "tracing"]
3737
default = ["build-binary", "mimalloc"]
3838
vortex = ["ballista-core/vortex", "vortex-array", "vortex-ipc"]
3939

ballista/scheduler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ path = "src/bin/main.rs"
3333
required-features = ["build-binary"]
3434

3535
[features]
36-
build-binary = ["clap", "tracing-subscriber", "tracing-appender", "tracing", "ballista-core/build-binary"]
36+
build-binary = ["clap", "tracing-subscriber", "tracing-appender", "tracing"]
3737
default = ["build-binary", "substrait"]
3838
# job info can cache stage plans, in some cases where
3939
# task plans can be re-computed, cache behavior may need to be disabled.

0 commit comments

Comments
 (0)