MapReduce

com.phasmid.majabigwaduce.core.MapReduce
trait MapReduce[T, K1, V1] extends Seq[T] => Future[Map[K1, V1]], AutoCloseable

MapReduce is a trait, with case classes, which implements a functional API for the map-reduce classes in this package.

Type parameters

K1

the key type of the returned map

T

the input type of the MapReduce function: T may be V1 for a first stage, or (K1,V1) for a subsequent stage.

V1

the value type of the returned map

Attributes

Graph
Supertypes
trait AutoCloseable
trait Seq[T] => Future[Map[K1, V1]]
class Object
trait Matchable
class Any
Known subtypes
class MapReduceComposed[T, K1, V1, K2, V2]
class MapReduce_Base[T, K1M, V1M, K, V]
class MapReduce_LoggingBase[T, K1M, V1M, K1, V1]
class MapReduceFirst[V0, K1, W, V1]
class MapReduceFirstFold[V0, K1, W, V1]
class MapReducePipe[K0, V0, K1, W, V1]
class MapReducePipeFold[K0, V0, K1, W, V1]
Show all
Self type
MapReduce[T, K1, V1]

Members list

Value members

Abstract methods

def ec: ExecutionContext

Attributes

Returns

a suitable execution context

Concrete methods

def &[K2, V2](mr: MapReduce[(K1, V1), K2, V2]): MapReduce[T, K2, V2]

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

def :&[K2, V2](f: Seq[(K1, V1)] => Future[Map[K2, V2]]): MapReduce[T, K2, V2]

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

def :|[S](r: Map[K1, V1] => S)(implicit executionContext: ExecutionContext): Seq[T] => Future[S]

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.

def |[S](r: Map[K1, V1] => S)(implicit executionContext: ExecutionContext): Seq[T] => Future[S]

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 methods

def andThen[A](g: Future[Map[K1, V1]] => A): Seq[T] => A

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 f such that f(x) == g(apply(x))

Inherited from:
Function1
def compose[A](g: A => Seq[T]): A => Future[Map[K1, V1]]

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 g can be applied

Value parameters

g

a function A => T1

Attributes

Returns

a new function f such that f(x) == apply(g(x))

Inherited from:
Function1
override def toString(): String

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

Inherited and Abstract methods

def apply(v1: Seq[T]): Future[Map[K1, V1]]

Applies the body of this function to the argument.

Applies the body of this function to the argument.

Value parameters

v1

the function argument

Attributes

Returns

the result of function application.

Inherited from:
Function1
def close(): Unit

Attributes

Inherited from:
AutoCloseable