com.twitter.scalding.typed

KeyedList

trait KeyedList[K, +T] extends KeyedListLike[K, T, KeyedList]

This is for the case where you don't want to expose any structure but the ability to operate on an iterator of the values

Linear Supertypes
KeyedListLike[K, T, KeyedList], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. KeyedList
  2. KeyedListLike
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def filterKeys(fn: (K) ⇒ Boolean): KeyedList[K, T]

    filter keys on a predicate.

    filter keys on a predicate. More efficient than filter if you are only looking at keys

    Definition Classes
    KeyedListLike
  2. abstract def mapGroup[V](smfn: (K, Iterator[T]) ⇒ Iterator[V]): KeyedList[K, V]

    Operate on an Iterator[T] of all the values for each key at one time.

    Operate on an Iterator[T] of all the values for each key at one time. Avoid accumulating the whole list in memory if you can. Prefer sum, which is partially executed map-side by default.

    Definition Classes
    KeyedListLike
  3. abstract def toTypedPipe: TypedPipe[(K, T)]

    End of the operations on values.

    End of the operations on values. From this point on the keyed structure is lost and another shuffle is generally required to reconstruct it

    Definition Classes
    KeyedListLike

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def aggregate[B, C](agg: Aggregator[T, B, C]): KeyedList[K, C]

    Use Algebird Aggregator to do the reduction

    Use Algebird Aggregator to do the reduction

    Definition Classes
    KeyedListLike
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def count(fn: (T) ⇒ Boolean): KeyedList[K, Long]

    Definition Classes
    KeyedListLike
  10. def drop(n: Int): KeyedList[K, T]

    Selects all elements except first n ones.

    Selects all elements except first n ones.

    Definition Classes
    KeyedListLike
  11. def dropWhile(p: (T) ⇒ Boolean): KeyedList[K, T]

    Drops longest prefix of elements that satisfy the given predicate.

    Drops longest prefix of elements that satisfy the given predicate.

    Definition Classes
    KeyedListLike
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def filter(fn: ((K, T)) ⇒ Boolean): KeyedList[K, T]

    .

    .filter(fn).toTypedPipe == .toTypedPipe.filter(fn) It is generally better to avoid going back to a TypedPipe as long as possible: this minimizes the times we go in and out of cascading/hadoop types.

    Definition Classes
    KeyedListLike
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def foldLeft[B](z: B)(fn: (B, T) ⇒ B): KeyedList[K, B]

    Definition Classes
    KeyedListLike
  17. def forall(fn: (T) ⇒ Boolean): KeyedList[K, Boolean]

    Definition Classes
    KeyedListLike
  18. def forceToReducers: KeyedList[K, T]

    This is just short hand for mapValueStream(identity), it makes sure the planner sees that you want to force a shuffle.

    This is just short hand for mapValueStream(identity), it makes sure the planner sees that you want to force a shuffle. For expert tuning

    Definition Classes
    KeyedListLike
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def head: KeyedList[K, T]

    Use this to get the first value encountered.

    Use this to get the first value encountered. prefer this to take(1).

    Definition Classes
    KeyedListLike
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def keys: TypedPipe[K]

    Definition Classes
    KeyedListLike
  24. def mapValueStream[V](smfn: (Iterator[T]) ⇒ Iterator[V]): KeyedList[K, V]

    Use this when you don't care about the key for the group, otherwise use mapGroup

    Use this when you don't care about the key for the group, otherwise use mapGroup

    Definition Classes
    KeyedListLike
  25. def mapValues[V](fn: (T) ⇒ V): KeyedList[K, V]

    This is a special case of mapValueStream, but can be optimized because it doesn't need all the values for a given key at once.

    This is a special case of mapValueStream, but can be optimized because it doesn't need all the values for a given key at once. An unoptimized implementation is: mapValueStream { _.map { fn } } but for Grouped we can avoid resorting to mapValueStream

    Definition Classes
    KeyedListLike
  26. def max[B >: T](implicit cmp: Ordering[B]): KeyedList[K, T]

    Definition Classes
    KeyedListLike
  27. def maxBy[B](fn: (T) ⇒ B)(implicit cmp: Ordering[B]): KeyedList[K, T]

    Definition Classes
    KeyedListLike
  28. def min[B >: T](implicit cmp: Ordering[B]): KeyedList[K, T]

    Definition Classes
    KeyedListLike
  29. def minBy[B](fn: (T) ⇒ B)(implicit cmp: Ordering[B]): KeyedList[K, T]

    Definition Classes
    KeyedListLike
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def product[U >: T](implicit ring: Ring[U]): KeyedList[K, U]

    Definition Classes
    KeyedListLike
  34. def reduce[U >: T](fn: (U, U) ⇒ U): KeyedList[K, U]

    reduce with fn which must be associative and commutative.

    reduce with fn which must be associative and commutative. Like the above this can be optimized in some Grouped cases. If you don't have a commutative operator, use reduceLeft

    Definition Classes
    KeyedListLike
  35. def reduceLeft[U >: T](fn: (U, U) ⇒ U): KeyedList[K, U]

    Definition Classes
    KeyedListLike
  36. def scanLeft[B](z: B)(fn: (B, T) ⇒ B): KeyedList[K, B]

    Definition Classes
    KeyedListLike
  37. def size: KeyedList[K, Long]

    Definition Classes
    KeyedListLike
  38. def sortWithTake[U >: T](k: Int)(lessThan: (U, U) ⇒ Boolean): KeyedList[K, Seq[T]]

    Like the above, but with a less than operation for the ordering

    Like the above, but with a less than operation for the ordering

    Definition Classes
    KeyedListLike
  39. def sortedReverseTake(k: Int)(implicit ord: Ordering[_ >: T]): KeyedList[K, Seq[T]]

    Take the largest k things according to the implicit ordering.

    Take the largest k things according to the implicit ordering. Useful for top-k without having to call ord.reverse

    Definition Classes
    KeyedListLike
  40. def sortedTake(k: Int)(implicit ord: Ordering[_ >: T]): KeyedList[K, Seq[T]]

    This implements bottom-k (smallest k items) on each mapper for each key, then sends those to reducers to get the result.

    This implements bottom-k (smallest k items) on each mapper for each key, then sends those to reducers to get the result. This is faster than using .take if k * (number of Keys) is small enough to fit in memory.

    Definition Classes
    KeyedListLike
  41. def sum[U >: T](implicit sg: Semigroup[U]): KeyedList[K, U]

    If there is no ordering, we default to assuming the Semigroup is commutative.

    If there is no ordering, we default to assuming the Semigroup is commutative. If you don't want that, define an ordering on the Values, or .forceToReducers.

    Semigroups MAY have a faster implementation of sum for iterators, so prefer using sum/sumLeft to reduce

    Definition Classes
    KeyedListLike
  42. def sumLeft[U >: T](implicit sg: Semigroup[U]): KeyedList[K, U]

    Semigroups MAY have a faster implementation of sum for iterators, so prefer using sum/sumLeft to reduce/reduceLeft

    Semigroups MAY have a faster implementation of sum for iterators, so prefer using sum/sumLeft to reduce/reduceLeft

    Definition Classes
    KeyedListLike
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def take(n: Int): KeyedList[K, T]

    Selects first n elements.

    Selects first n elements. Don't use this if n == 1, head is faster in that case.

    Definition Classes
    KeyedListLike
  45. def takeWhile(p: (T) ⇒ Boolean): KeyedList[K, T]

    Takes longest prefix of elements that satisfy the given predicate.

    Takes longest prefix of elements that satisfy the given predicate.

    Definition Classes
    KeyedListLike
  46. def toList: KeyedList[K, List[T]]

    Definition Classes
    KeyedListLike
  47. def toSet[U >: T]: KeyedList[K, Set[U]]

    Definition Classes
    KeyedListLike
  48. def toString(): String

    Definition Classes
    AnyRef → Any
  49. def values: TypedPipe[T]

    Definition Classes
    KeyedListLike
  50. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from KeyedListLike[K, T, KeyedList]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped