Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling ballista in standalone mode, add build to CI #1839

Merged
merged 5 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ jobs:
cd ballista/rust
# snmalloc requires cmake so build without default features
cargo test --no-default-features --features sled
# Ensure also compiles in standalone mode
cargo test --no-default-features --features standalone
env:
CARGO_HOME: "/github/home/.cargo"
CARGO_TARGET_DIR: "/github/home/target"
Expand Down
30 changes: 24 additions & 6 deletions ballista/rust/client/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ impl BallistaContextState {
concurrent_tasks: usize,
) -> ballista_core::error::Result<Self> {
use ballista_core::serde::protobuf::scheduler_grpc_client::SchedulerGrpcClient;
use ballista_core::serde::protobuf::PhysicalPlanNode;
use ballista_core::serde::BallistaCodec;

log::info!("Running in local mode. Scheduler will be run in-proc");

Expand All @@ -90,7 +92,16 @@ impl BallistaContextState {
}
};

ballista_executor::new_standalone_executor(scheduler, concurrent_tasks).await?;
let default_codec: BallistaCodec<LogicalPlanNode, PhysicalPlanNode> =
BallistaCodec::default();

ballista_executor::new_standalone_executor(
scheduler,
concurrent_tasks,
default_codec,
)
.await?;

Ok(Self {
config: config.clone(),
scheduler_host: "localhost".to_string(),
Expand Down Expand Up @@ -458,13 +469,16 @@ mod tests {

#[tokio::test]
#[cfg(feature = "standalone")]
#[ignore]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that's where I got stuck as well :). I can take a look at the failing test and fix it another PR. Thanks!

async fn test_task_stuck_when_referenced_task_failed() {
use super::*;
use datafusion::arrow::datatypes::Schema;
use datafusion::arrow::util::pretty;
use datafusion::datasource::file_format::csv::CsvFormat;
use datafusion::datasource::file_format::parquet::ParquetFormat;
use datafusion::datasource::listing::{ListingOptions, ListingTable};
use datafusion::datasource::listing::{
ListingOptions, ListingTable, ListingTableConfig,
};

use ballista_core::config::{
BallistaConfigBuilder, BALLISTA_WITH_INFORMATION_SCHEMA,
Expand Down Expand Up @@ -502,12 +516,16 @@ mod tests {
collect_stat: x.collect_stat,
target_partitions: x.target_partitions,
};
let error_table = ListingTable::new(

let config = ListingTableConfig::new(
listing_table.object_store().clone(),
listing_table.table_path().to_string(),
Arc::new(Schema::new(vec![])),
error_options,
);
)
.with_schema(Arc::new(Schema::new(vec![])))
.with_listing_options(error_options);

let error_table = ListingTable::try_new(config).unwrap();

// change the table to an error table
guard
.tables
Expand Down