LazyDD

com.phasmid.majabigwaduce.dd.LazyDD
See theLazyDD companion object
case class LazyDD[K, V, L, W](kVs: Seq[(K, V)], f: ((K, V)) => (L, W))(partitions: Int = ...)(implicit evidence$1: Monoid[W], context: DDContext) extends BaseDD[L, W]

Case Class which implements DataDefinition[K, W] and which is based on a Map[K,V] and a function V => W.

CONSIDER a property cutoff to determine whether it's appropriate to invoke the map-reduce machinery on kVs.

Type parameters

K

the key type

V

the input value type

W

the output value type

Value parameters

context

a DDContext

f

a function which will transform the key-value pairs

kVs

the map of key-value pairs which serve as the input to this LazyDD

partitions

the number of partitions to be used

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class BaseDD[L, W]
trait DataDefinition[L, W]
trait () => Future[Map[L, W]]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def clean(): Unit

Clean up any resources in the context of this LazyDD object

Clean up any resources in the context of this LazyDD object

Attributes

def evaluate: Future[DataDefinition[L, W] & HasEvaluatedMap[L, W]]

Evaluate this LazyDD as a Future of DataDefinition[L,W] with HasEvaluatedMap[L,W]

Evaluate this LazyDD as a Future of DataDefinition[L,W] with HasEvaluatedMap[L,W]

Attributes

Returns

an EagerDD[L,W] wrapped in Future

def filter(p: ((L, W)) => Boolean): DataDefinition[L, W]

Method to filter this DataDefinition according to a predicate which takes a l-w tuple.

Method to filter this DataDefinition according to a predicate which takes a l-w tuple.

Value parameters

p

the predicate which will yield a Boolean for a given l-w tuple.

Attributes

Returns

a new DataDefinition containing only those l-w pairs which satisfy the predicate p.

def groupBy[M](f: W => M): DataDefinition[M, Iterable[W]]

Method to group values by a new key type generated from the values, ignoring the current keys.

Method to group values by a new key type generated from the values, ignoring the current keys.

Type parameters

M

the new key type, whose values are derived from the values of this DataDefinition

Attributes

Returns

a DataDefinition based on M and Iterable[V]

def join[M >: L, X](other: DataDefinition[M, X])(using evidence$1: Monoid[X], timeout: Timeout): DataDefinition[M, (W, X)]

Join method to perform inner join.

Join method to perform inner join.

Type parameters

M

key type of other and also of the result

X

value type of other

Value parameters

other

the DataDefinition with which to join this

Attributes

Returns

the inner join of this and other

def map[Y, X : Monoid](g: ((L, W)) => (Y, X)): DataDefinition[Y, X]

Method to form a new DataDefinition where the resulting values derive from applying the function f to the original values

Method to form a new DataDefinition where the resulting values derive from applying the function f to the original values

Type parameters

X

the underlying type of the values of the resulting map

Y

the underlying type of the keys of the resulting map

Value parameters

g

the function to transform key-value pairs

Attributes

Returns

a new DataDefinition

Inherited methods

override def apply(): Future[Map[L, W]]

Evaluate this DataDefinition

Evaluate this DataDefinition

Attributes

Returns

a map of key-value pairs wrapped in Future

Definition Classes
BaseDD -> Function0
Inherited from:
BaseDD
def count: Future[Int]

Evaluate the number of elements in this DataDefinition

Evaluate the number of elements in this DataDefinition

Attributes

Returns

the number of k-v pairs

Inherited from:
BaseDD
def productElementNames: Iterator[String]

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
def productIterator: Iterator[Any]

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
def reduce[X : Zero](wVWf: (X, W) => X): Future[X]

Method to evaluate this DataDefinition and reduce the dimensionality of the result by ignoring the keys and aggregating the values according to the function xw_x.

Method to evaluate this DataDefinition and reduce the dimensionality of the result by ignoring the keys and aggregating the values according to the function xw_x.

Type parameters

X

the underlying type of the result.

Value parameters

wVWf

the aggregation function.

Attributes

Returns

an X value, wrapped in Future.

Inherited from:
BaseDD
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
Function0 -> Any
Inherited from:
Function0

Givens

Givens

given kVloggable: Loggable[(K, V)]