Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
default-members = ["bin/icehutd"]
default-members = ["bin/bucketd"]
members = [
"bin/icehutd",
"bin/bucketd",
"crates/catalog",
"crates/control_plane",
"crates/nexus",
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WORKDIR /app

RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/target/release/icehutd ./
COPY --from=builder /app/target/release/bucketd ./
COPY --from=builder /app/rest-catalog-open-api.yaml rest-catalog-open-api.yaml

CMD ["./icehutd"]
CMD ["./bucketd"]
2 changes: 1 addition & 1 deletion bin/icehutd/Cargo.toml → bin/bucketd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "icehutd"
name = "bucketd"
version = "0.1.0"
edition = "2021"

Expand Down
21 changes: 11 additions & 10 deletions bin/icehutd/src/cli.rs → bin/bucketd/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::path::PathBuf;

#[derive(Parser)]
#[command(version, about, long_about=None)]
pub struct IceHutOpts {
pub struct IceBucketOpts {
#[arg(
short,
long,
Expand Down Expand Up @@ -65,28 +65,29 @@ pub struct IceHutOpts {
)]
allow_http: Option<bool>,

#[arg(long, env="FILE_STORAGE_PATH",
required_if_eq("backend", "file"),
conflicts_with_all(["region", "bucket", "endpoint", "allow_http"]),
help_heading="File Backend Options",
help="Path to the directory where files will be stored"
)]
#[arg(
long,
env = "FILE_STORAGE_PATH",
required_if_eq("backend", "file"),
help_heading = "File Backend Options",
help = "Path to the directory where files will be stored"
)]
file_storage_path: Option<PathBuf>,

#[arg(short, long, env = "SLATEDB_PREFIX")]
pub slatedb_prefix: String,

#[arg(
long,
env = "ICEHUT_HOST",
env = "BUCKET_HOST",
default_value = "127.0.0.1",
help = "Host to bind to"
)]
pub host: Option<String>,

#[arg(
long,
env = "ICEHUT_PORT",
env = "BUCKET_PORT",
default_value = "3000",
help = "Port to bind to"
)]
Expand Down Expand Up @@ -119,7 +120,7 @@ enum StoreBackend {
Memory,
}

impl IceHutOpts {
impl IceBucketOpts {
#[allow(clippy::unwrap_used, clippy::as_conversions)]
pub fn object_store_backend(self) -> ObjectStoreResult<Box<dyn ObjectStore>> {
// TODO: Hacky workaround for now, need to figure out a better way to pass this
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions bin/icehutd/src/main.rs → bin/bucketd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ async fn main() {
tracing_subscriber::registry()
.with(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| "icehut=debug,nexus=debug,tower_http=debug".into()),
.unwrap_or_else(|_| "bucketd=debug,nexus=debug,tower_http=debug".into()),
)
.with(tracing_subscriber::fmt::layer())
.init();

let opts = cli::IceHutOpts::parse();
let opts = cli::IceBucketOpts::parse();
let slatedb_prefix = opts.slatedb_prefix.clone();
let host = opts.host.clone().unwrap();
let port = opts.port.unwrap();
Expand All @@ -34,12 +34,12 @@ async fn main() {
return;
}
Ok(object_store) => {
tracing::info!("Starting ❄️🏠 IceHut...");
tracing::info!("Starting 🧊🪣 IceBucket...");

if let Err(e) =
nexus::run_icehut(object_store, slatedb_prefix, host, port, allow_origin).await
nexus::run_icebucket(object_store, slatedb_prefix, host, port, allow_origin).await
{
tracing::error!("Failed to start IceHut: {:?}", e);
tracing::error!("Failed to start IceBucket: {:?}", e);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/control_plane/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ chrono = { workspace = true }
datafusion = { workspace = true }
datafusion-common = { workspace = true }
datafusion-expr = { workspace = true }
datafusion-functions-json = { workspace = true }
datafusion-physical-plan = { workspace = true }
iceberg-rust = { workspace = true }
iceberg-rest-catalog = { workspace = true }
datafusion_iceberg = { workspace = true }
datafusion-functions-json = { workspace = true }

flatbuffers = { version = "24.3.25" }
futures = { workspace = true }
iceberg-rest-catalog = { workspace = true }
iceberg-rust = { workspace = true }

icelake = { git = "https://github.com/Embucket/icelake.git", rev = "b4cbcaf" }

Expand Down
2 changes: 1 addition & 1 deletion crates/control_plane/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub enum ControlPlaneError {

#[snafu(display("Execution error: {source}"))]
Execution {
source: runtime::datafusion::error::IcehutSQLError,
source: runtime::datafusion::error::IceBucketSQLError,
},

#[snafu(display("Unable to lock DataFusion context list"))]
Expand Down
8 changes: 4 additions & 4 deletions crates/nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ arrow = { version = "54.1.0" }
async-trait = { workspace = true }
axum = { workspace = true }
axum-macros = { workspace = true }
base64 = { version = "0.22.1" }
catalog = { path = "../catalog" }
chrono = { workspace = true }
control_plane = { path = "../control_plane" }

datafusion = { workspace = true }
datafusion-common = { workspace = true }
flate2 = { version = "1.0.34" }
http = "1.2.0"
http-body-util = "0.1.0"
Expand Down Expand Up @@ -55,10 +59,6 @@ utoipa-axum = { workspace = true }
utoipa-swagger-ui = { workspace = true }
uuid = { workspace = true, features = ["v4", "v5"] }
validator = { version = "0.18.1", features = ["derive"] }
base64 = { version = "0.22.1" }

datafusion = { workspace = true }
datafusion-common = { workspace = true }

[dev-dependencies]
async-trait = { workspace = true }
Expand Down
23 changes: 12 additions & 11 deletions crates/nexus/src/http/dbt/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use snafu::prelude::*;
use super::schemas::JsonResponse;
use arrow::error::ArrowError;
use control_plane::error::ControlPlaneError;
use runtime::datafusion::error::IcehutSQLError;
use runtime::datafusion::error::IceBucketSQLError;

#[derive(Snafu, Debug)]
#[snafu(visibility(pub(crate)))]
Expand Down Expand Up @@ -55,8 +55,8 @@ impl IntoResponse for DbtError {
let status_code = match &self {
Self::ControlService { source } => match source {
ControlPlaneError::Execution { source, .. } => match source {
IcehutSQLError::DataFusion { .. } => http::StatusCode::UNPROCESSABLE_ENTITY,
IcehutSQLError::Arrow { .. } => http::StatusCode::UNSUPPORTED_MEDIA_TYPE,
IceBucketSQLError::DataFusion { .. } => http::StatusCode::UNPROCESSABLE_ENTITY,
IceBucketSQLError::Arrow { .. } => http::StatusCode::UNSUPPORTED_MEDIA_TYPE,
_ => http::StatusCode::INTERNAL_SERVER_ERROR,
},
// SQL errors,
Expand Down Expand Up @@ -117,17 +117,18 @@ mod tests {
use axum::response::IntoResponse;
use control_plane::error::ControlPlaneError;
use datafusion::error::DataFusionError;
use runtime::datafusion::error::IcehutSQLError;
use runtime::datafusion::error::IceBucketSQLError;
use uuid::Uuid;

// TODO: Replace these with snapshot tests
#[test]
fn test_http_server_response() {
assert_ne!(
http::StatusCode::INTERNAL_SERVER_ERROR,
DbtError::ControlService {
source: ControlPlaneError::Execution {
source: IcehutSQLError::Arrow {
source: ArrowError::ComputeError { 0: String::new() }
source: IceBucketSQLError::Arrow {
source: ArrowError::ComputeError(String::new())
}
},
}
Expand All @@ -138,8 +139,8 @@ mod tests {
http::StatusCode::UNSUPPORTED_MEDIA_TYPE,
DbtError::ControlService {
source: ControlPlaneError::Execution {
source: IcehutSQLError::Arrow {
source: ArrowError::ComputeError { 0: String::new() }
source: IceBucketSQLError::Arrow {
source: ArrowError::ComputeError(String::new())
}
},
}
Expand All @@ -150,9 +151,9 @@ mod tests {
http::StatusCode::UNPROCESSABLE_ENTITY,
DbtError::ControlService {
source: ControlPlaneError::Execution {
source: IcehutSQLError::DataFusion {
source: IceBucketSQLError::DataFusion {
source: DataFusionError::ArrowError(
ArrowError::InvalidArgumentError { 0: String::new() },
ArrowError::InvalidArgumentError(String::new()),
Some(String::new()),
)
},
Expand Down Expand Up @@ -193,7 +194,7 @@ mod tests {
source: ControlPlaneError::DataFusion {
// here just any error for test, since we are handling any DataFusion err
source: DataFusionError::ArrowError(
ArrowError::InvalidArgumentError { 0: String::new() },
ArrowError::InvalidArgumentError(String::new()),
Some(String::new()),
)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/nexus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub mod http;
pub mod state;

#[allow(clippy::unwrap_used, clippy::as_conversions)]
pub async fn run_icehut(
pub async fn run_icebucket(
state_store: Box<dyn ObjectStore>,
slatedb_prefix: String,
host: String,
Expand Down
6 changes: 3 additions & 3 deletions crates/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ chrono = { workspace = true }
datafusion = { workspace = true }
datafusion-common = { workspace = true }
datafusion-expr = { workspace = true }
datafusion-functions-json = { workspace = true }
datafusion-physical-plan = { workspace = true }
iceberg-rust = { workspace = true }
iceberg-rest-catalog = { workspace = true }
datafusion_iceberg = { workspace = true }
datafusion-functions-json = { workspace = true }

futures = { workspace = true }
iceberg-rest-catalog = { workspace = true }
iceberg-rust = { workspace = true }
object_store = { workspace = true }

paste = "1"
Expand Down
4 changes: 2 additions & 2 deletions crates/runtime/src/datafusion/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use snafu::prelude::*;

#[derive(Snafu, Debug)]
#[snafu(visibility(pub(crate)))]
pub enum IcehutSQLError {
pub enum IceBucketSQLError {
#[snafu(display("Arrow error: {source}"))]
Arrow { source: arrow::error::ArrowError },

Expand Down Expand Up @@ -47,4 +47,4 @@ pub enum IcehutSQLError {
NotImplemented { message: String },
}

pub type IcehutSQLResult<T> = std::result::Result<T, IcehutSQLError>;
pub type IceBucketSQLResult<T> = std::result::Result<T, IceBucketSQLError>;
Loading
Loading