Class

com.metamx.tranquility.druid.DruidBeams

Builder

Related Doc: package DruidBeams

Permalink

class Builder[InputType, EventType] extends AnyRef

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

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. def alertMap(d: Dict): Builder[InputType, EventType]

    Permalink

    Provide extra information that will be emitted along with alerts.

    Provide extra information that will be emitted along with alerts. Optional, by default this is empty.

    d

    extra information

    returns

    new builder

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def beamDecorateFn(f: (org.scala_tools.time.Imports.Interval, Int) ⇒ (Beam[EventType]) ⇒ Beam[EventType]): Builder[InputType, EventType]

    Permalink

    Provide a function that decorates each per-partition, per-interval beam.

    Provide a function that decorates each per-partition, per-interval beam. Optional, by default there is no decoration. This is often used for gathering metrics.

    f

    function

    returns

    new builder

  7. def beamMergeFn(f: (Seq[Beam[EventType]]) ⇒ Beam[EventType]): Builder[InputType, EventType]

    Permalink

    Provide a function that merges beams for different partitions.

    Provide a function that merges beams for different partitions. Optional, by default this creates a com.metamx.tranquility.beam.MergingPartitioningBeam around your Builder.partitioner. You cannot provide both a beamMergeFn and a partitioner.

    f

    function

    returns

    new builder

  8. def buildBeam(): Beam[InputType]

    Permalink

    Build a Beam using this DruidBeams builder.

    Build a Beam using this DruidBeams builder.

    returns

    a beam

  9. def buildTranquilizer(builder: tranquilizer.Tranquilizer.Builder): Tranquilizer[InputType]

    Permalink

    Build a Tranquilizer using this DruidBeams builder.

    Build a Tranquilizer using this DruidBeams builder. This is a Finagle service, too, but unlike Builder.buildService and Builder.buildJavaService, it takes a single message at a time and does batching for you.

    builder

    a Tranquilizer builder with the desired configuration

    returns

    a service

  10. def buildTranquilizer(): Tranquilizer[InputType]

    Permalink

    Build a Tranquilizer using this DruidBeams builder.

    Build a Tranquilizer using this DruidBeams builder. This is a Finagle service, too, but unlike Builder.buildService and Builder.buildJavaService, it takes a single message at a time and does batching for you.

    returns

    a service

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def clusteredBeamIdent(ident: String): Builder[InputType, EventType]

    Permalink

    Provide the identity of this Beam, which will be used for coordination.

    Provide the identity of this Beam, which will be used for coordination. Optional, defaults to your overlord service discovery key + "/" + your dataSource.

    All beams with the same identity coordinate with each other on Druid tasks.

    ident

    ident string

    returns

    new builder

  13. def clusteredBeamZkBasePath(path: String): Builder[InputType, EventType]

    Permalink

    Provide the ZooKeeper znode that should be used for Tranquility's internal coordination.

    Provide the ZooKeeper znode that should be used for Tranquility's internal coordination. Optional, defaults to "/tranquility/beams".

    path

    the path

    returns

    new builder

  14. def curator(curator: CuratorFramework): Builder[InputType, EventType]

    Permalink

    Provide a CuratorFramework instance that will be used for Tranquility's internal coordination.

    Provide a CuratorFramework instance that will be used for Tranquility's internal coordination. Either this or "curatorFactory" is required. Whichever one is provided later will win.

    If you provide Curator this way (as opposed to "curatorFactory") then you should start and stop it yourself. You can safely share it across multiple builders.

    If you do not provide your own Builder.finagleRegistry, this will be used for service discovery as well.

    curator

    curator

    returns

    new builder

  15. def curatorFactory(curatorFactory: org.apache.curator.framework.CuratorFrameworkFactory.Builder): Builder[InputType, EventType]

    Permalink

    Provide a CuratorFrameworkFactory instance that will be used for Tranquility's internal coordination.

    Provide a CuratorFrameworkFactory instance that will be used for Tranquility's internal coordination. Either this or "curator" is required. Whichever one is provided later will win.

    If you provide Curator this way (as opposed to "curator") then the instance will be "owned" by this beam stack. This means that when you close the beams or tranquilizers returned by this builder, the Curator instance will be closed too.

    If you do not provide your own Builder.finagleRegistry, this will be used for service discovery as well.

    curatorFactory

    curator factory

    returns

    new builder

  16. def discoveryPath(path: String): Builder[InputType, EventType]

    Permalink

    Provide a znode used for Druid service discovery.

    Provide a znode used for Druid service discovery. Optional, defaults to "/druid/discovery".

    If you do not provide a Builder.finagleRegistry, this will be used along with your provided CuratorFramework to locate Druid services. If you do provide a FinagleRegistry, this option will not be used.

    path

    discovery znode

    returns

    new builder

  17. def druidBeamConfig(beamConfig: DruidBeamConfig): Builder[InputType, EventType]

    Permalink

    Provide tunings for communication with Druid tasks.

    Provide tunings for communication with Druid tasks. Optional, see DruidBeamConfig for defaults.

    beamConfig

    beam config tunings

    returns

    new builder

  18. def druidTuning(druidTuning: DruidTuning): Builder[InputType, EventType]

    Permalink

    Provide tunings for the Druid realtime engine.

    Provide tunings for the Druid realtime engine. Optional, see DruidTuning for defaults.

    These will be passed along to the Druid tasks.

    druidTuning

    tuning object

    returns

    new builder

  19. def druidTuningMap(druidTuningMap: Dict): Builder[InputType, EventType]

    Permalink

    Provide tunings for the Druid realtime engine.

    Provide tunings for the Druid realtime engine. Optional, see DruidTuning for defaults.

    These will be passed along to the Druid tasks.

    druidTuningMap

    tuning object, as a map

    returns

    new builder

  20. def emitter(emitter: ServiceEmitter): Builder[InputType, EventType]

    Permalink

    Provide an emitter that will be used to emit alerts.

    Provide an emitter that will be used to emit alerts. By default, alerts are emitted through a logger.

    emitter

    an emitter

    returns

    new builder

  21. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def eventTimestamped(timeFn: (EventType) ⇒ org.scala_tools.time.Imports.DateTime): Builder[InputType, EventType]

    Permalink
  24. def finagleRegistry(registry: FinagleRegistry): Builder[InputType, EventType]

    Permalink

    Provide a FinagleRegistry that will be used to generate clients for your Overlord.

    Provide a FinagleRegistry that will be used to generate clients for your Overlord. Optional, by default this is built based on Builder.curator and Builder.discoveryPath.

    registry

    a registry

    returns

    new builder

  25. def finalize(): Unit

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

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

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

    Permalink
    Definition Classes
    Any
  29. def location(location: DruidLocation): Builder[InputType, EventType]

    Permalink

    Provide the location of your Druid dataSource.

    Provide the location of your Druid dataSource. Required.

    This will be used to determine the service name of your Druid overlord and tasks, and to choose which dataSource to write to.

    location

    location object

    returns

    new builder

  30. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  33. def objectWriter(writer: JavaObjectWriter[EventType]): Builder[InputType, EventType]

    Permalink

    Provide a serializer for your event type.

    Provide a serializer for your event type. Optional, by default this uses a Jackson ObjectMapper.

    writer

    the serializer

    returns

    new builder

  34. def objectWriter(writer: ObjectWriter[EventType]): Builder[InputType, EventType]

    Permalink

    Provide a serializer for your event type.

    Provide a serializer for your event type. Optional, by default this uses a Jackson ObjectMapper.

    This method is designed use for Scala users.

    writer

    the serializer

    returns

    new builder

  35. def partitioner(partitioner: Partitioner[EventType]): Builder[InputType, EventType]

    Permalink

    Provide a partitioner that determines how to route events when you have more than one Druid partition.

    Provide a partitioner that determines how to route events when you have more than one Druid partition. By default this uses time-and-dimensions based partitioning for simple Map types, and uses hashCode for custom types. If you are using a custom type, you need to provide your own partitioner or beamMergeFn to get optimal rollup. You cannot provide both a beamMergeFn and a partitioner.

    partitioner

    a partitioner

    returns

    new builder

  36. def partitions(n: Int): Builder[InputType, EventType]

    Permalink

    Set the number of Druid partitions.

    Set the number of Druid partitions. This is just a helper method that modifies the Builder.tuning object.

    n

    number of partitions

    returns

    new builder

  37. def replicants(n: Int): Builder[InputType, EventType]

    Permalink

    Set the number of Druid replicants.

    Set the number of Druid replicants. This is just a helper method that modifies the Builder.tuning object.

    n

    number of replicants

    returns

    new builder

  38. def rollup(rollup: DruidRollup): Builder[InputType, EventType]

    Permalink

    Provide rollup (dimensions, aggregators, query granularity).

    Provide rollup (dimensions, aggregators, query granularity). Required.

    rollup

    rollup object

    returns

    new builder

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

    Permalink
    Definition Classes
    AnyRef
  40. def timekeeper(timekeeper: Timekeeper): Builder[InputType, EventType]

    Permalink

    Provide a Timekeeper that will be used to determine what time it is for purposes of judging the windowPeriod.

    Provide a Timekeeper that will be used to determine what time it is for purposes of judging the windowPeriod. Optional, by default this uses wall clock time. This is mostly useful for tests, as in real-world use it is expected that you will be using wall clock time.

    timekeeper

    a timekeeper

    returns

    new builder

  41. def timestampSpec(timestampSpec: TimestampSpec): Builder[InputType, EventType]

    Permalink

    Provide a Druid timestampSpec.

    Provide a Druid timestampSpec. Optional, defaults to timestampColumn "timestamp" and timestampFormat "iso".

    Druid will use this to parse the timestamp of your serialized events.

    timestampSpec

    timestampSpec object

    returns

    new builder

  42. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  43. def tuning(tuning: ClusteredBeamTuning): Builder[InputType, EventType]

    Permalink

    Provide tunings for coordination of Druid task creation.

    Provide tunings for coordination of Druid task creation. Optional, see com.metamx.tranquility.beam.ClusteredBeamTuning$ for defaults.

    These influence how and when Druid tasks are created.

    tuning

    tuning object

    returns

    new builder

  44. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. def buildJavaService(): Service[List[InputType], Integer]

    Permalink

    Build a Finagle Service using this DruidBeams builder, designed for Java users.

    Build a Finagle Service using this DruidBeams builder, designed for Java users. This simply wraps the beam.

    returns

    a service

    Annotations
    @deprecated
    Deprecated

    (Since version 0.7.0) use buildTranquilizer

  2. def buildService(): Service[Seq[InputType], Int]

    Permalink

    Build a Finagle Service using this DruidBeams builder.

    Build a Finagle Service using this DruidBeams builder. This simply wraps the beam.

    returns

    a service

    Annotations
    @deprecated
    Deprecated

    (Since version 0.7.0) use buildTranquilizer

  3. def eventWriter(writer: ObjectWriter[EventType]): Builder[InputType, EventType]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.2.21) use .objectWriter(...)

Inherited from AnyRef

Inherited from Any

Ungrouped