Trait

com.twitter.summingbird.planner

DagOptimizer

Related Doc: package planner

Permalink

trait DagOptimizer[P <: Platform[P]] extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DagOptimizer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. type LitProd[T] = Literal[T, Prod]

    Permalink
  2. type Prod[T] = Producer[P, T]

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. object AlsoPullUp extends Rule[Prod]

    Permalink

    We can always push all Also nodes all the way to the bottom of the dag MergedProducer(AlsoProducer(t, a), b) == AlsoProducer(t, MergedProducer(a, b))

    We can always push all Also nodes all the way to the bottom of the dag MergedProducer(AlsoProducer(t, a), b) == AlsoProducer(t, MergedProducer(a, b))

    Unary(l, fn), if l == AlsoProducer(tail, r) can be changed to AlsoProducer(tail, fn(r))

  5. object DiamondToFlatMap extends PartialRule[Prod]

    Permalink

    (a.flatMap(f1) ++ a.flatMap(f2)) == a.flatMap { i => f1(i) ++ f2(i) }

  6. object FlatMapFusion extends PartialRule[Prod]

    Permalink

    a.flatMap(fn).flatMap(fn2) can be written as a.flatMap(compose(fn, fn2))

  7. object FlatThenOptionFusion extends PartialRule[Prod]

    Permalink

    Combine flatMaps followed by optionMap into a single operation

    Combine flatMaps followed by optionMap into a single operation

    On the other direction, you might not want to run optionMap with flatMap since some platforms (storm) can't easily control source parallelism, so we don't want to push big expansions up to sources

  8. object KeyFlatMapToFlatMap extends PartialRule[Prod]

    Permalink

    If you can't optimize KeyFlatMaps, use this

  9. object MergePullUp extends PartialRule[Prod]

    Permalink

    (a ++ b).flatMap(fn) == (a.flatMap(fn) ++ b.flatMap(fn)) (a ++ b).optionMap(fn) == (a.optionMap(fn) ++ b.optionMap(fn)) and since Merge is usually a no-op when combined with a grouping operation, it often pays to get merges as high the graph as possible.

  10. object OptionMapFusion extends PartialRule[Prod]

    Permalink
  11. object OptionToFlatMap extends PartialRule[Prod]

    Permalink

    If you don't care to distinguish between optionMap and flatMap, you can use this rule

  12. object RemoveIdentityKeyed extends PartialRule[Prod]

    Permalink

    Identity keyed producer is just a trick to make scala see methods on keyed types, they have no meaning at runtime.

  13. object RemoveNames extends PartialRule[Prod]

    Permalink

    Strip all the names.

    Strip all the names. Names are rightly considered as names on the irreducible parts of the input graph (functions, stores, sinks, sources, etc...) and not the AST that we generate and optimize along the way

  14. object ValueFlatMapToFlatMap extends PartialRule[Prod]

    Permalink

    If you can't optimize ValueFlatMaps, use this

  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. def expressionDag[T](p: Producer[P, T]): (ExpressionDag[Prod], Id[T])

    Permalink

    Create an ExpressionDag for the given node.

    Create an ExpressionDag for the given node. This should be the final tail of the graph. You can apply optimizations on this Dag and then use the Id returned to evaluate it back to an optimized producer

  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def mkAlso[T, U]: (Prod[T], Prod[U]) ⇒ Prod[U]

    Permalink

    This makes a potentially unsound cast.

    This makes a potentially unsound cast. Since this method is only use in converting from an AlsoProducer to a Literal[T, Prod] below, it is not actually dangerous because we always use it in a safe position.

    Attributes
    protected
  25. def mkAlsoTail[T, U]: (Prod[T], Prod[U]) ⇒ Prod[U]

    Permalink
    Attributes
    protected
  26. def mkFlatMapped[T, U](fn: (T) ⇒ TraversableOnce[U]): (Prod[T]) ⇒ Prod[U]

    Permalink
    Attributes
    protected
  27. def mkIdentKey[K, V]: (Prod[(K, V)]) ⇒ Prod[(K, V)]

    Permalink
    Attributes
    protected
  28. def mkKeyFM[T, U, V](fn: (T) ⇒ TraversableOnce[U]): (Prod[(T, V)]) ⇒ Prod[(U, V)]

    Permalink
    Attributes
    protected
  29. def mkMerge[T]: (Prod[T], Prod[T]) ⇒ Prod[T]

    Permalink
    Attributes
    protected
  30. def mkNamed[T](name: String): (Prod[T]) ⇒ Prod[T]

    Permalink
    Attributes
    protected
  31. def mkOptMap[T, U](fn: (T) ⇒ Option[U]): (Prod[T]) ⇒ Prod[U]

    Permalink
    Attributes
    protected
  32. def mkSrv[K, T, V](serv: P.Service[K, V]): (Prod[(K, T)]) ⇒ Prod[(K, (T, Option[V]))]

    Permalink
    Attributes
    protected
  33. def mkSum[K, V](store: P.Store[K, V], sg: Semigroup[V]): (Prod[(K, V)]) ⇒ Prod[(K, (Option[V], V))]

    Permalink
    Attributes
    protected
  34. def mkTPNamed[T](name: String): (Prod[T]) ⇒ Prod[T]

    Permalink
    Attributes
    protected
  35. def mkValueFM[K, U, V](fn: (U) ⇒ TraversableOnce[V]): (Prod[(K, U)]) ⇒ Prod[(K, V)]

    Permalink
    Attributes
    protected
  36. def mkWritten[T, U >: T](sink: P.Sink[U]): (Prod[T]) ⇒ Prod[T]

    Permalink
    Attributes
    protected
  37. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  40. def optimize[T](p: Producer[P, T], rule: Rule[Prod]): Producer[P, T]

    Permalink

    Optimize the given producer according to the rule

  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def toLiteral[T](hm: HMap[Prod, LitProd], prod: Producer[P, T]): (HMap[Prod, LitProd], LitProd[T])

    Permalink
    Attributes
    protected
  43. def toLiteral[T](prod: Producer[P, T]): Literal[T, Prod]

    Permalink

    Convert a Producer graph into a Literal in the Dag rewriter This is where the tedious work comes in.

  44. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  45. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped