Skip to content

Commit

Permalink
Avro as optional feature
Browse files Browse the repository at this point in the history
  • Loading branch information
imDema committed May 30, 2024
1 parent 0d17625 commit e1042b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ homepage = "https://github.com/deib-polimi/renoir"
readme = "README.md"

[features]
default = ["clap", "ssh", "timestamp",]
default = ["clap", "ssh", "timestamp", "avro"]
timestamp = []
ssh = ["ssh2", "whoami", "shell-escape", "sha2", "base64"]
tokio = ["dep:tokio", "futures", "tokio/net", "tokio/io-util", "tokio/time", "tokio/rt-multi-thread", "tokio/macros"]
avro = ["dep:apache-avro"]
profiler = []

[dependencies]
Expand Down Expand Up @@ -78,7 +79,7 @@ indexmap = "2.2.6"
tracing = { version = "0.1.40", features = ["log"] }
quick_cache = "0.5.1"
dashmap = "5.5.3"
apache-avro = { version = "0.16.0", features = ["derive"] }
apache-avro = { version = "0.16.0", features = ["derive"], optional = true }
dyn-clone = "1.0.17"

[dev-dependencies]
Expand All @@ -104,6 +105,10 @@ nexmark = { version = "0.2.0", features = ["serde"] }
name = "nexmark"
required-features = ["timestamp"]

[[example]]
name = "avro_rw"
required-features = ["avro"]

[[example]]
name = "rolling_top_words"
required-features = ["timestamp"]
Expand Down
1 change: 1 addition & 0 deletions src/operator/sink/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use std::sync::{Arc, Mutex};

#[cfg(feature = "avro")]
pub(super) mod avro;
pub(super) mod collect;
pub(super) mod collect_channel;
Expand Down
2 changes: 2 additions & 0 deletions src/operator/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pub use self::csv::*;
#[cfg(feature = "tokio")]
pub use async_stream::*;
#[cfg(feature = "avro")]
pub use avro::*;
pub use channel::*;
pub use file::*;
Expand All @@ -13,6 +14,7 @@ use crate::{block::Replication, operator::Operator};

#[cfg(feature = "tokio")]
mod async_stream;
#[cfg(feature = "avro")]
mod avro;
mod channel;
mod csv;
Expand Down

0 comments on commit e1042b3

Please sign in to comment.