MapReduceComposed
A composition MapReduce class which represents a MapReduce "pipeline" with two stages.
Type parameters
- K1
-
intermediate key type
- K2
-
output key type
- T
-
the input type of the MapReduce function: T may be V1 for a first stage, or (K1,V1) for a subsequent stage.
- V1
-
intermediate value type
- V2
-
output value type
Value parameters
- f1
-
an instance of MapReduce which will become the first of two stages of the resulting MapReduce instance .
- f2
-
an ASync[Seq[(K1, V1)], Map[K2, V2] instance (functionally equivalent to MapReduce) which will become the second of the two stages.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AutoCloseabletrait Seq[T] => Future[Map[K2, V2]]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Applies the MapReduce pipeline to the provided input sequence, transforming it through the first stage and then the second stage to produce the final output.
Applies the MapReduce pipeline to the provided input sequence, transforming it through the first stage and then the second stage to produce the final output.
Value parameters
- ts
-
the input sequence of type T to be processed through the MapReduce pipeline
Attributes
- Returns
-
a Future containing a map of type Map[K2, V2], which represents the transformed output
Closes the first stage of the MapReduce pipeline, releasing any resources associated with it.
Closes the first stage of the MapReduce pipeline, releasing any resources associated with it.
Attributes
- Returns
-
Unit, indicating that the operation completes without returning a value.
Inherited methods
Alternative formulation for compose method (:&)
Alternative formulation for compose method (:&)
Type parameters
- K2
-
the key type of the composed MapReduce object
- V2
-
the value type of the composed MapReduce object
Value parameters
- mr
-
the other MapReduce object
Attributes
- Returns
-
a new MapReduceComposed object
- Inherited from:
- MapReduce
Compose this MapReduce object with mr, yielding a new MapReduce object.
Compose this MapReduce object with mr, yielding a new MapReduce object.
Type parameters
- K2
-
the key type of the composed MapReduce object
- V2
-
the value type of the composed MapReduce object
Value parameters
- f
-
a function of type ASync[Seq[(K1, V1)], Map[K2, V2], i.e. Seq[(K1, V1)]=>Future[Map[K2, V2]
Attributes
- Returns
-
a new MapReduceComposed object
- Inherited from:
- MapReduce
terminate this MapReduce object with r, a reducer which yields a simple value
terminate this MapReduce object with r, a reducer which yields a simple value
Type parameters
- S
-
the return type, which is a super-class of V1 (for sum, or sigma)
Value parameters
- executionContext
-
(implicit)
- r
-
the Reduce object
Attributes
- Returns
-
an Async function of Seq[T]=>Future[S] type S.
- Inherited from:
- MapReduce
Composes two instances of Function1 in a new Function1, with this function applied first.
Composes two instances of Function1 in a new Function1, with this function applied first.
Type parameters
- A
-
the result type of function
g
Value parameters
- g
-
a function R => A
Attributes
- Returns
-
a new function
fsuch thatf(x) == g(apply(x)) - Inherited from:
- Function1
Composes two instances of Function1 in a new Function1, with this function applied last.
Composes two instances of Function1 in a new Function1, with this function applied last.
Type parameters
- A
-
the type to which function
gcan be applied
Value parameters
- g
-
a function A => T1
Attributes
- Returns
-
a new function
fsuch thatf(x) == apply(g(x)) - Inherited from:
- Function1
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Function1 -> Any
- Inherited from:
- Function1
alternative name to terminate
alternative name to terminate
Type parameters
- S
-
the return type, which is a super-class of V1 (for sum, or sigma)
Value parameters
- executionContext
-
(implicit)
- r
-
the Reduce object
Attributes
- Returns
-
an Async function of Seq[T]=>Future[S] type S.
- Inherited from:
- MapReduce
Implicits
Implicits
Attributes
- Returns
-
a suitable execution context