com.twitter.scalding.typed

CoGrouped

trait CoGrouped[K, +R] extends KeyedListLike[K, R, CoGrouped] with CoGroupable[K, R] with WithReducers[CoGrouped[K, R]]

Linear Supertypes
WithReducers[CoGrouped[K, R]], CoGroupable[K, R], HasReducers, KeyedListLike[K, R, CoGrouped], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CoGrouped
  2. WithReducers
  3. CoGroupable
  4. HasReducers
  5. KeyedListLike
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def inputs: List[TypedPipe[(K, Any)]]

    This is the list of mapped pipes, just before the (reducing) joinFunction is applied

    This is the list of mapped pipes, just before the (reducing) joinFunction is applied

    Definition Classes
    CoGroupable
  2. abstract def joinFunction: (K, Iterator[Tuple], Seq[Iterable[Tuple]]) ⇒ Iterator[R]

    This function is not type-safe for others to call, but it should never have an error.

    This function is not type-safe for others to call, but it should never have an error. By construction, we never call it with incorrect types. It would be preferable to have stronger type safety here, but unclear how to achieve, and since it is an internal function, not clear it would actually help anyone for it to be type-safe

    Attributes
    protected
    Definition Classes
    CoGroupable
  3. abstract def keyOrdering: Ordering[K]

    Definition Classes
    CoGroupable
  4. abstract def reducers: Option[Int]

    Definition Classes
    HasReducers

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[R, B, C]): CoGrouped[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 cogroup[R1, R2](smaller: CoGroupable[K, R1])(fn: (K, Iterator[R], Iterable[R1]) ⇒ Iterator[R2]): CoGrouped[K, R2]

    Smaller is about average values/key not total size (that does not matter, but is clearly related).

    Smaller is about average values/key not total size (that does not matter, but is clearly related).

    Note that from the type signature we see that the right side is iterated (or may be) over and over, but the left side is not. That means that you want the side with fewer values per key on the right. If both sides are similar, no need to worry. If one side is a one-to-one mapping, that should be the "smaller" side.

    Definition Classes
    CoGroupable
  10. def count(fn: (R) ⇒ Boolean): CoGrouped[K, Long]

    Definition Classes
    KeyedListLike
  11. def drop(n: Int): CoGrouped[K, R]

    Selects all elements except first n ones.

    Selects all elements except first n ones.

    Definition Classes
    KeyedListLike
  12. def dropWhile(p: (R) ⇒ Boolean): CoGrouped[K, R]

    Drops longest prefix of elements that satisfy the given predicate.

    Drops longest prefix of elements that satisfy the given predicate.

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

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

    Definition Classes
    AnyRef → Any
  15. def filter(fn: ((K, R)) ⇒ Boolean): CoGrouped[K, R]

    .

    .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
  16. def filterKeys(fn: (K) ⇒ Boolean): CoGrouped[K, R]

    filter keys on a predicate.

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

    Definition Classes
    CoGroupedKeyedListLike
  17. def finalize(): Unit

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

    Definition Classes
    KeyedListLike
  19. def forall(fn: (R) ⇒ Boolean): CoGrouped[K, Boolean]

    Definition Classes
    KeyedListLike
  20. def forceToReducers: CoGrouped[K, R]

    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
  21. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  23. def head: CoGrouped[K, R]

    Use this to get the first value encountered.

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

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

    Definition Classes
    Any
  25. def join[W](smaller: CoGroupable[K, W]): CoGrouped[K, (R, W)]

    Definition Classes
    CoGroupable
  26. def keys: TypedPipe[K]

    Definition Classes
    KeyedListLike
  27. def leftJoin[W](smaller: CoGroupable[K, W]): CoGrouped[K, (R, Option[W])]

    Definition Classes
    CoGroupable
  28. def mapGroup[R1](fn: (K, Iterator[R]) ⇒ Iterator[R1]): CoGrouped[K, R1]

    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
    CoGroupedKeyedListLike
  29. def mapValueStream[V](smfn: (Iterator[R]) ⇒ Iterator[V]): CoGrouped[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
  30. def mapValues[V](fn: (R) ⇒ V): CoGrouped[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
  31. def max[B >: R](implicit cmp: Ordering[B]): CoGrouped[K, R]

    Definition Classes
    KeyedListLike
  32. def maxBy[B](fn: (R) ⇒ B)(implicit cmp: Ordering[B]): CoGrouped[K, R]

    Definition Classes
    KeyedListLike
  33. def min[B >: R](implicit cmp: Ordering[B]): CoGrouped[K, R]

    Definition Classes
    KeyedListLike
  34. def minBy[B](fn: (R) ⇒ B)(implicit cmp: Ordering[B]): CoGrouped[K, R]

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

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

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

    Definition Classes
    AnyRef
  38. def outerJoin[W](smaller: CoGroupable[K, W]): CoGrouped[K, (Option[R], Option[W])]

    Definition Classes
    CoGroupable
  39. def product[U >: R](implicit ring: Ring[U]): CoGrouped[K, U]

    Definition Classes
    KeyedListLike
  40. def reduce[U >: R](fn: (U, U) ⇒ U): CoGrouped[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
  41. def reduceLeft[U >: R](fn: (U, U) ⇒ U): CoGrouped[K, U]

    Definition Classes
    KeyedListLike
  42. def rightJoin[W](smaller: CoGroupable[K, W]): CoGrouped[K, (Option[R], W)]

    Definition Classes
    CoGroupable
  43. def scanLeft[B](z: B)(fn: (B, R) ⇒ B): CoGrouped[K, B]

    Definition Classes
    KeyedListLike
  44. def size: CoGrouped[K, Long]

    Definition Classes
    KeyedListLike
  45. def sortWithTake[U >: R](k: Int)(lessThan: (U, U) ⇒ Boolean): CoGrouped[K, Seq[R]]

    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
  46. def sortedReverseTake(k: Int)(implicit ord: Ordering[_ >: R]): CoGrouped[K, Seq[R]]

    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
  47. def sortedTake(k: Int)(implicit ord: Ordering[_ >: R]): CoGrouped[K, Seq[R]]

    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
  48. def sum[U >: R](implicit sg: Semigroup[U]): CoGrouped[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
  49. def sumLeft[U >: R](implicit sg: Semigroup[U]): CoGrouped[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
  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def take(n: Int): CoGrouped[K, R]

    Selects first n elements.

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

    Definition Classes
    KeyedListLike
  52. def takeWhile(p: (R) ⇒ Boolean): CoGrouped[K, R]

    Takes longest prefix of elements that satisfy the given predicate.

    Takes longest prefix of elements that satisfy the given predicate.

    Definition Classes
    KeyedListLike
  53. def toList: CoGrouped[K, List[R]]

    Definition Classes
    KeyedListLike
  54. def toSet[U >: R]: CoGrouped[K, Set[U]]

    Definition Classes
    KeyedListLike
  55. def toString(): String

    Definition Classes
    AnyRef → Any
  56. lazy val toTypedPipe: TypedPipe[(K, R)]

    Definition Classes
    CoGroupedKeyedListLike
  57. def values: TypedPipe[R]

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. def withReducers(reds: Int): CoGrouped[K, R] { def reducers: Some[Int] }

    never mutates this, instead returns a new item.

    never mutates this, instead returns a new item.

    Definition Classes
    CoGroupedWithReducers

Inherited from WithReducers[CoGrouped[K, R]]

Inherited from CoGroupable[K, R]

Inherited from HasReducers

Inherited from KeyedListLike[K, R, CoGrouped]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped