Skip to content

Commit

Permalink
chore: move file iterators to fluvio_storage crate
Browse files Browse the repository at this point in the history
  • Loading branch information
morenol committed Oct 20, 2023
1 parent bf4e866 commit 4a2cef3
Show file tree
Hide file tree
Showing 11 changed files with 352 additions and 355 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/fluvio-spu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ chrono = { workspace = true }
# Fluvio dependencies
fluvio = { workspace = true }
fluvio-types = { workspace = true, features = ["events"] }
fluvio-storage = { workspace = true }
fluvio-storage = { workspace = true, features = ["iterators"] }
fluvio-compression = { workspace = true }
fluvio-controlplane = { workspace = true }
fluvio-controlplane-metadata = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-spu/src/services/public/stream_fetch.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;
use std::time::Instant;

use fluvio_storage::iterators::FileBatchIterator;
use tracing::{debug, error, instrument, trace, warn};
use tokio::select;

Expand Down Expand Up @@ -31,7 +32,6 @@ use crate::services::public::conn_context::ConnectionContext;
use crate::services::public::stream_fetch::publishers::INIT_OFFSET;
use crate::smartengine::context::SmartModuleContext;
use crate::smartengine::batch::process_batch;
use crate::smartengine::file_batch::FileBatchIterator;
use crate::core::metrics::SpuMetrics;
use crate::traffic::TrafficType;

Expand Down
3 changes: 1 addition & 2 deletions crates/fluvio-spu/src/services/public/tests/produce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{env::temp_dir, time::Duration};
use fluvio::{SmartModuleInvocation, SmartModuleInvocationWasm, SmartModuleKind};
use fluvio_controlplane::replica::Replica;
use fluvio_smartmodule::{Record, dataplane::smartmodule::Lookback};
use fluvio_storage::FileReplica;
use fluvio_storage::{FileReplica, iterators::FileBatchIterator};
use tracing::debug;

use fluvio_protocol::{
Expand Down Expand Up @@ -34,7 +34,6 @@ use crate::{
},
},
replication::leader::LeaderReplicaState,
smartengine::file_batch::FileBatchIterator,
};

#[fluvio_future::test(ignore)]
Expand Down
4 changes: 1 addition & 3 deletions crates/fluvio-spu/src/smartengine/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use fluvio_protocol::link::ErrorCode;
use fluvio_smartmodule::Record;
use fluvio_spu_schema::server::smartmodule::{SmartModuleInvocation, SmartModuleInvocationWasm};
use fluvio_storage::ReplicaStorage;
use fluvio_storage::iterators::{FileBatch, FileBatchIterator, FileRecordIterator, RecordItem};
use fluvio_types::Timestamp;
use tracing::{debug, trace, error};

Expand All @@ -15,14 +16,11 @@ use crate::core::metrics::SpuMetrics;
use crate::replication::leader::LeaderReplicaState;

use crate::smartengine::chain;
use crate::smartengine::file_batch::{FileRecordIterator, FileBatchIterator};
use crate::smartengine::Lookback;
use crate::smartengine::SmartModuleChainBuilder;
use crate::smartengine::SmartModuleChainInstance;
use crate::smartengine::Version;

use super::file_batch::{FileBatch, RecordItem};

#[derive(Debug)]
pub struct SmartModuleContext {
chain: SmartModuleChainInstance,
Expand Down
Loading

0 comments on commit 4a2cef3

Please sign in to comment.