Class

com.gilt.gfc.aws.kinesis.client

KCLWorkerRunner

Related Doc: package client

Permalink

case class KCLWorkerRunner(config: KinesisClientLibConfiguration, checkpointInterval: FiniteDuration = 5 minutes, numRetries: Int = 3, initialize: (String) ⇒ Unit = (_) => (), shutdown: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit = (_,_,_) => (), metricsFactory: Option[IMetricsFactory] = None, initialRetryDelay: Duration = 10 seconds, maxRetryDelay: FiniteDuration = 3 minutes) extends Loggable with Product with Serializable

A helper class to merge required/optional/default parameters and run a KCL Worker.

config

KCL config, @see KCLConfiguration for some useful defaults.

checkpointInterval

how often to save checkpoint to dynamodb

numRetries

how many times to retry operation on exception before giving up

initialize

(ShardId) => Unit : additional code to execute when handler is initialized

shutdown

(ShardId, Checkpointer, ShutdownReason) => Unit : additional code to execute on shutdown

metricsFactory

CloudWatch metrics factory

initialRetryDelay

the initial failed operation retry delay value, defaults to 10 seconds

maxRetryDelay

the maximum failed operation retry delay value, defaults to 3 minutes

Linear Supertypes
Serializable, Serializable, Product, Equals, Loggable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KCLWorkerRunner
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Loggable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KCLWorkerRunner(config: KinesisClientLibConfiguration, checkpointInterval: FiniteDuration = 5 minutes, numRetries: Int = 3, initialize: (String) ⇒ Unit = (_) => (), shutdown: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit = (_,_,_) => (), metricsFactory: Option[IMetricsFactory] = None, initialRetryDelay: Duration = 10 seconds, maxRetryDelay: FiniteDuration = 3 minutes)

    Permalink

    config

    KCL config, @see KCLConfiguration for some useful defaults.

    checkpointInterval

    how often to save checkpoint to dynamodb

    numRetries

    how many times to retry operation on exception before giving up

    initialize

    (ShardId) => Unit : additional code to execute when handler is initialized

    shutdown

    (ShardId, Checkpointer, ShutdownReason) => Unit : additional code to execute on shutdown

    metricsFactory

    CloudWatch metrics factory

    initialRetryDelay

    the initial failed operation retry delay value, defaults to 10 seconds

    maxRetryDelay

    the maximum failed operation retry delay value, defaults to 3 minutes

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val checkpointInterval: FiniteDuration

    Permalink

    how often to save checkpoint to dynamodb

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val config: KinesisClientLibConfiguration

    Permalink

    KCL config, @see KCLConfiguration for some useful defaults.

  8. def debug(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  9. def debug(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def error(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  12. def error(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  13. def error(ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  14. def fatal(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  15. def fatal(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  16. def fatal(ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  17. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. def info(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  20. def info(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  21. val initialRetryDelay: Duration

    Permalink

    the initial failed operation retry delay value, defaults to 10 seconds

  22. val initialize: (String) ⇒ Unit

    Permalink

    (ShardId) => Unit : additional code to execute when handler is initialized

  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. val maxRetryDelay: FiniteDuration

    Permalink

    the maximum failed operation retry delay value, defaults to 3 minutes

  25. val metricsFactory: Option[IMetricsFactory]

    Permalink

    CloudWatch metrics factory

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

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

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

    Permalink
    Definition Classes
    AnyRef
  29. val numRetries: Int

    Permalink

    how many times to retry operation on exception before giving up

  30. def runAsyncSingleRecordProcessor[A](callbackTimeout: FiniteDuration)(processRecord: (A) ⇒ Future[Unit])(implicit executor: ExecutionContext, evReader: KinesisRecordReader[A]): Unit

    Permalink

    Run KCL worker with the given asynchronous callback.

    Run KCL worker with the given asynchronous callback. Batch will be processed in parallel. You can control the level of parallelism by configuring provided execution context parameter.

    callbackTimeout

    how long to wait for async call results

    processRecord

    (Record) => Future[Unit] : async record handler

    executor

    where to execute record processing functions

    evReader

    evidence that A has implementation of KinesisRecordReader implicitly available in scope

  31. def runBatchProcessor[A](processRecords: (String, Seq[A], IRecordProcessorCheckpointer) ⇒ Unit)(implicit evReader: KinesisRecordReader[A]): Unit

    Permalink

    Run KCL worker with the given callback.

    Run KCL worker with the given callback.

    processRecords

    (ShardId, Records, Checkpointer) => Unit : Kinesis record handler

    evReader

    evidence that A has implementation of KinesisRecordReader implicitly available in scope

  32. def runSingleRecordProcessor[A](processRecord: (String, A, IRecordProcessorCheckpointer) ⇒ Unit)(implicit evReader: KinesisRecordReader[A]): Unit

    Permalink

    Run KCL worker with the given callback.

    Run KCL worker with the given callback. Simple single-threaded execution, access to shard ID and checkpointer.

    processRecord

    (ShardId, Record, Checkpointer) => Unit : Kinesis record handler

    evReader

    evidence that A has implementation of KinesisRecordReader implicitly available in scope

  33. val shutdown: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit

    Permalink

    (ShardId, Checkpointer, ShutdownReason) => Unit : additional code to execute on shutdown

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

    Permalink
    Definition Classes
    AnyRef
  35. def trace(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  36. def trace(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  37. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def warn(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  41. def warn(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  42. def withCheckpointInterval(cpi: FiniteDuration): KCLWorkerRunner

    Permalink

    Override default checkpointInterval.

  43. def withInitialize(init: (String) ⇒ Unit): KCLWorkerRunner

    Permalink

    Override default (NOOP) init function.

  44. def withMetricsFactory(factory: IMetricsFactory): KCLWorkerRunner

    Permalink
  45. def withNumRetries(n: Int): KCLWorkerRunner

    Permalink

    Override default num retries.

  46. def withShutdown(sd: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit): KCLWorkerRunner

    Permalink

    Override default (NOOP) shutdown function.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Loggable

Inherited from AnyRef

Inherited from Any

Ungrouped