Skip to content

Commit 06ae60f

Browse files
committed
reduce diff to master
Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent 5734380 commit 06ae60f

File tree

11 files changed

+18
-22
lines changed

11 files changed

+18
-22
lines changed

kafkaesque/src/kafka_source.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
use timely::Data;
2-
use timely::dataflow::Scope;
2+
use timely::dataflow::{OwnedStream, Scope};
33
use timely::dataflow::operators::Capability;
44
use timely::dataflow::operators::generic::OutputHandle;
5+
use timely::dataflow::channels::pushers::PushOwned;
56

67
use rdkafka::Message;
78
use rdkafka::consumer::{ConsumerContext, BaseConsumer};
8-
use timely::dataflow::channels::pushers::PushOwned;
9-
use timely::dataflow::stream::OwnedStream;
109

1110
/// Constructs a stream of data from a Kafka consumer.
1211
///

timely/examples/unionfind.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use timely::dataflow::*;
99
use timely::dataflow::operators::{Input, Exchange, Probe};
1010
use timely::dataflow::operators::generic::operator::Operator;
1111
use timely::dataflow::channels::pact::Pipeline;
12-
use timely::dataflow::stream::{OwnedStream, StreamLike};
1312

1413
fn main() {
1514

timely/src/dataflow/channels/pact.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use std::{fmt::{self, Debug}, marker::PhantomData};
1111
use timely_container::PushPartitioned;
1212

13-
use crate::communication::{Push, Pull, Data};
13+
use crate::communication::{Push, Pull};
1414
use crate::communication::allocator::thread::{ThreadPusher, ThreadPuller};
15-
use crate::Container;
15+
use crate::{ExchangeData, Container};
1616

1717
use crate::worker::AsWorker;
1818
use crate::dataflow::channels::pushers::Exchange as ExchangePusher;
@@ -69,9 +69,9 @@ impl<C, D, F: FnMut(&D)->u64+'static> ExchangeCore<C, D, F> {
6969
}
7070

7171
// Exchange uses a `Box<Pushable>` because it cannot know what type of pushable will return from the allocator.
72-
impl<T: Timestamp, C, D: Data+Clone, F: FnMut(&D)->u64+'static> ParallelizationContractCore<T, C> for ExchangeCore<C, D, F>
72+
impl<T: Timestamp, C, D: ExchangeData, F: FnMut(&D)->u64+'static> ParallelizationContractCore<T, C> for ExchangeCore<C, D, F>
7373
where
74-
C: Data + Clone + PushPartitioned<Item=D>,
74+
C: ExchangeData + PushPartitioned<Item=D>,
7575
{
7676
type Pusher = ExchangePusher<T, C, D, LogPusher<T, C, Box<dyn Push<BundleCore<T, C>>>>, F>;
7777
type Puller = LogPuller<T, C, Box<dyn Pull<BundleCore<T, C>>>>;

timely/src/dataflow/channels/pushers/tee.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct TeeCore<T, D> {
2020
/// [TeeCore] specialized to `Vec`-based container.
2121
pub type Tee<T, D> = TeeCore<T, Vec<D>>;
2222

23-
impl<T: Data, D: Container+Clone> Push<BundleCore<T, D>> for TeeCore<T, D> {
23+
impl<T: Data, D: Container+Data> Push<BundleCore<T, D>> for TeeCore<T, D> {
2424
#[inline]
2525
fn push(&mut self, message: &mut Option<BundleCore<T, D>>) {
2626
let mut pushers = self.shared.borrow_mut();

timely/src/dataflow/operators/branch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub trait BranchWhen<G: Scope, C: Container>: Sized {
9494
fn branch_when(self, condition: impl Fn(&G::Timestamp) -> bool + 'static) -> (OwnedStream<G, C>, OwnedStream<G, C>);
9595
}
9696

97-
impl<G: Scope, C: Container + Clone, S: StreamLike<G, C>> BranchWhen<G, C> for S {
97+
impl<G: Scope, C: Container + Data, S: StreamLike<G, C>> BranchWhen<G, C> for S {
9898
fn branch_when(self, condition: impl Fn(&G::Timestamp) -> bool + 'static) -> (OwnedStream<G, C>, OwnedStream<G, C>) {
9999
let mut builder = OperatorBuilder::new("Branch".to_owned(), self.scope());
100100

timely/src/dataflow/operators/capture/capture.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
//! and there are several default implementations, including a linked-list, Rust's MPSC
66
//! queue, and a binary serializer wrapping any `W: Write`.
77
8-
use crate::dataflow::Scope;
8+
use crate::dataflow::{Scope, StreamLike};
99
use crate::dataflow::channels::pact::Pipeline;
1010
use crate::dataflow::channels::pullers::Counter as PullCounter;
1111
use crate::dataflow::operators::generic::builder_raw::OperatorBuilder;
1212

1313
use crate::Container;
14-
use crate::dataflow::stream::StreamLike;
1514
use crate::progress::ChangeBatch;
1615
use crate::progress::Timestamp;
1716

timely/src/dataflow/operators/capture/replay.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use crate::progress::Timestamp;
4646

4747
use super::EventCore;
4848
use super::event::EventIteratorCore;
49-
use crate::Container;
49+
use crate::{Container, Data};
5050

5151
/// Replay a capture stream into a scope with the same timestamp.
5252
pub trait Replay<T: Timestamp, C> : Sized {
@@ -62,7 +62,7 @@ pub trait Replay<T: Timestamp, C> : Sized {
6262
fn replay_core<S: Scope<Timestamp=T>>(self, scope: &mut S, period: Option<std::time::Duration>) -> OwnedStream<S, C>;
6363
}
6464

65-
impl<T: Timestamp, C: Container+Clone, I> Replay<T, C> for I
65+
impl<T: Timestamp, C: Container+Data, I> Replay<T, C> for I
6666
where I : IntoIterator,
6767
<I as IntoIterator>::Item: EventIteratorCore<T, C>+'static {
6868
fn replay_core<S: Scope<Timestamp=T>>(self, scope: &mut S, period: Option<std::time::Duration>) -> OwnedStream<S, C>{

timely/src/dataflow/operators/concat.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Merges the contents of multiple streams.
22
33

4-
use crate::Container;
4+
use crate::{Container, Data};
55
use crate::dataflow::channels::pact::Pipeline;
66
use crate::dataflow::{OwnedStream, StreamLike, Scope};
77

@@ -23,7 +23,7 @@ pub trait Concat<G: Scope, D: Container, S: StreamLike<G, D>> {
2323
fn concat(self, other: S) -> OwnedStream<G, D>;
2424
}
2525

26-
impl<G: Scope, D: Container+Clone, S: StreamLike<G, D>> Concat<G, D, S> for S {
26+
impl<G: Scope, D: Container+Data, S: StreamLike<G, D>> Concat<G, D, S> for S {
2727
fn concat(self, other: S) -> OwnedStream<G, D> {
2828
self.scope().concatenate([self, other])
2929
}
@@ -52,7 +52,7 @@ pub trait Concatenate<G: Scope, D: Container, S: StreamLike<G, D>> {
5252
I: IntoIterator<Item=S>;
5353
}
5454

55-
impl<G: Scope, D: Container+Clone> Concatenate<G, D, OwnedStream<G, D>> for OwnedStream<G, D> {
55+
impl<G: Scope, D: Container+Data> Concatenate<G, D, OwnedStream<G, D>> for OwnedStream<G, D> {
5656
fn concatenate<I>(self, sources: I) -> OwnedStream<G, D>
5757
where
5858
I: IntoIterator<Item=OwnedStream<G, D>>,
@@ -61,7 +61,7 @@ impl<G: Scope, D: Container+Clone> Concatenate<G, D, OwnedStream<G, D>> for Owne
6161
}
6262
}
6363

64-
impl<G: Scope, D: Container+Clone, S: StreamLike<G, D>> Concatenate<G, D, S> for &G {
64+
impl<G: Scope, D: Container+Data, S: StreamLike<G, D>> Concatenate<G, D, S> for &G {
6565
fn concatenate<I>(self, sources: I) -> OwnedStream<G, D>
6666
where
6767
I: IntoIterator<Item=S>

timely/src/dataflow/operators/generic/operator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
//! Methods to construct generic streaming and blocking unary operators.
33
4+
use crate::dataflow::channels::pushers::PushOwned;
45
use crate::dataflow::channels::pact::ParallelizationContractCore;
56

67
use crate::dataflow::operators::generic::handles::{InputHandleCore, FrontieredInputHandleCore, OutputHandleCore};
@@ -12,7 +13,6 @@ use super::builder_rc::OperatorBuilder;
1213
use crate::dataflow::operators::generic::OperatorInfo;
1314
use crate::dataflow::operators::generic::notificator::{Notificator, FrontierNotificator};
1415
use crate::Container;
15-
use crate::dataflow::channels::pushers::PushOwned;
1616

1717
/// Methods to construct generic streaming and blocking operators.
1818
pub trait Operator<G: Scope, D1: Container> {

timely/src/dataflow/operators/partition.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub trait Partition<G: Scope, D: Data, D2: Data, F: Fn(D) -> (u64, D2)> {
2828
impl<G, D, D2, F, S> Partition<G, D, D2, F> for S
2929
where
3030
G: Scope,
31-
D: Data + Clone,
31+
D: Data,
3232
D2: Data,
3333
F: Fn(D) -> (u64, D2) + 'static,
3434
S: StreamLike<G, Vec<D>>,

timely/src/dataflow/stream.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ use crate::progress::{Source, Target};
88

99
use crate::communication::Push;
1010
use crate::dataflow::Scope;
11-
use crate::dataflow::channels::pushers::{TeeHelper, PushOwned};
11+
use crate::dataflow::channels::pushers::{TeeCore, TeeHelper, PushOwned};
1212
use crate::dataflow::channels::BundleCore;
1313
use std::fmt::{self, Debug};
1414
use crate::Container;
15-
use crate::dataflow::channels::pushers::TeeCore;
1615

1716
/// Common behavior for all streams. Streams belong to a scope and carry data.
1817
///

0 commit comments

Comments
 (0)