com.twitter.summingbird.storm

SinkBolt

class SinkBolt[Key, Value] extends BaseBolt

The SinkBolt takes two related options: CacheSize and MaxWaitingFutures. CacheSize sets the number of key-value pairs that the SinkBolt will accept (and sum into an internal map) before committing out to the online store.

To perform this commit, the SinkBolt iterates through the map of aggregated kv pairs and performs a "+" on the store for each pair, sequencing these "+" calls together using the Future monad. If the store has high latency, these calls might take a bit of time to complete.

MaxWaitingFutures(count) handles this problem by realizing a future representing the "+" of kv-pair n only when kvpair n + 100 shows up in the bolt, effectively pushing back against latency bumps in the host.

The allowed latency before a future is forced is equal to (MaxWaitingFutures * execute latency).

Linear Supertypes
BaseBolt, IRichBolt, IComponent, IBolt, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SinkBolt
  2. BaseBolt
  3. IRichBolt
  4. IComponent
  5. IBolt
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SinkBolt(storeSupplier: () ⇒ MergeableStore[(Key, BatchID), Value], successHandler: OnlineSuccessHandler, exceptionHandler: OnlineExceptionHandler, cacheSize: CacheSize, metrics: SinkStormMetrics, maxWaitingFutures: MaxWaitingFutures, includeSuccessHandler: IncludeSuccessHandler)(implicit arg0: Monoid[Value])

Type Members

  1. class Mutex extends Serializable

    Definition Classes
    BaseBolt

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 ack(tuple: Tuple): Unit

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

    Definition Classes
    Any
  8. lazy val buffer: SummingQueue[Map[(Key, BatchID), Value]]

  9. lazy val cacheCount: Option[Int]

  10. def cleanup(): Unit

    Definition Classes
    SinkBoltBaseBolt → IBolt
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def declareOutputFields(declarer: OutputFieldsDeclarer): Unit

    Definition Classes
    BaseBolt → IComponent
  13. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  15. val exceptionHandlerBox: MeatLocker[OnlineExceptionHandler]

  16. def execute(tuple: Tuple): Unit

    Definition Classes
    SinkBolt → IBolt
  17. val fields: None.type

    The fields this bolt plans on returning.

    The fields this bolt plans on returning.

    Definition Classes
    SinkBoltBaseBolt
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. lazy val futureQueue: FutureQueue[Unit]

  20. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  21. val getComponentConfiguration: Null

    Definition Classes
    BaseBolt → IComponent
  22. def hashCode(): Int

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

    Definition Classes
    Any
  24. val mutex: Mutex

    Definition Classes
    BaseBolt
  25. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  28. def onCollector[U](fn: (OutputCollector) ⇒ U): U

    Definition Classes
    BaseBolt
  29. def prepare(conf: Map[_, _], context: TopologyContext, oc: OutputCollector): Unit

    Definition Classes
    SinkBoltBaseBolt → IBolt
  30. lazy val store: MergeableStore[(Key, BatchID), Value]

  31. val storeBox: MeatLocker[() ⇒ MergeableStore[(Key, BatchID), Value]]

  32. val successHandlerBox: MeatLocker[OnlineSuccessHandler]

  33. var successHandlerOpt: Option[OnlineSuccessHandler]

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

    Definition Classes
    AnyRef
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. def unpack(tuple: Tuple): ((Key, BatchID), Value)

  37. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BaseBolt

Inherited from IRichBolt

Inherited from IComponent

Inherited from IBolt

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped