com.datastax.spark.connector.demo

Streamer

class Streamer extends TypedStreamingActor[String] with CounterActor

Simply showing what the streaming actor does for the sake of the demo. It is a org.apache.spark.streaming.receivers.Receiver. This receiver tracks the number of blocks of data pushed to Spark so that the demo can shut down once we assert the expected data has been saved to Cassandra.

The additional behavior of a Counter simply supports the demo shutdown once the Stream has sent all the randomly generated data to the Spark DStream for processing. Once completed, the Streamer triggers an Akka DeathWatch by

self ! PoisonPill
trait CounterActor extends Actor  with Logging {
protected val scale = 30
private var count = 0

protected def increment(): Unit = {
   count += 1
   if (count == scale) self ! PoisonPill
 }
}
Linear Supertypes
CounterActor, TypedStreamingActor[String], SparkStreamingActor, ActorHelper, Logging, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Streamer
  2. CounterActor
  3. TypedStreamingActor
  4. SparkStreamingActor
  5. ActorHelper
  6. Logging
  7. Actor
  8. AnyRef
  9. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Streamer()

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Definition Classes
    Actor

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. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Streamer to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Streamer, B)

    Implicit information
    This member is added by an implicit conversion from Streamer to ArrowAssoc[Streamer] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def aroundPostRestart(reason: Throwable): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. def aroundPostStop(): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  10. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  11. def aroundPreStart(): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  12. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. implicit val context: ActorContext

    Definition Classes
    Actor
  16. def ensuring(cond: (Streamer) ⇒ Boolean, msg: ⇒ Any): Streamer

    Implicit information
    This member is added by an implicit conversion from Streamer to Ensuring[Streamer] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: (Streamer) ⇒ Boolean): Streamer

    Implicit information
    This member is added by an implicit conversion from Streamer to Ensuring[Streamer] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean, msg: ⇒ Any): Streamer

    Implicit information
    This member is added by an implicit conversion from Streamer to Ensuring[Streamer] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean): Streamer

    Implicit information
    This member is added by an implicit conversion from Streamer to Ensuring[Streamer] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Streamer to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  24. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  26. def increment(): Unit

    Attributes
    protected
    Definition Classes
    CounterActor
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  29. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  30. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  31. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  32. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  33. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  34. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  35. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  36. def logName: String

    Attributes
    protected
    Definition Classes
    Logging
  37. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  38. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  39. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  40. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  41. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  44. def postRestart(reason: Throwable): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  45. def postStop(): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  46. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  47. def preStart(): Unit

    Definition Classes
    Streamer → SparkStreamingActor → Actor
  48. def push(e: String): Unit

    Definition Classes
    Streamer → TypedStreamingActor
  49. def receive: akka.actor.Actor.Receive

    Definition Classes
    TypedStreamingActor → Actor
  50. val scale: Int

    Attributes
    protected
    Definition Classes
    CounterActor
  51. implicit final val self: ActorRef

    Definition Classes
    Actor
  52. final def sender(): ActorRef

    Definition Classes
    Actor
  53. def store[T](item: T): Unit

    Definition Classes
    ActorHelper
  54. def store(bytes: ByteBuffer): Unit

    Definition Classes
    ActorHelper
  55. def store[T](iter: Iterator[T]): Unit

    Definition Classes
    ActorHelper
  56. def supervisorStrategy: SupervisorStrategy

    Definition Classes
    Actor
  57. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  58. def toString(): String

    Definition Classes
    AnyRef → Any
  59. def unhandled(message: Any): Unit

    Definition Classes
    Actor
  60. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def [B](y: B): (Streamer, B)

    Implicit information
    This member is added by an implicit conversion from Streamer to ArrowAssoc[Streamer] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from Streamer to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (streamer: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Streamer to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (streamer: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Streamer

    Implicit information
    This member is added by an implicit conversion from Streamer to ArrowAssoc[Streamer] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (streamer: ArrowAssoc[Streamer]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Streamer

    Implicit information
    This member is added by an implicit conversion from Streamer to Ensuring[Streamer] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (streamer: Ensuring[Streamer]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from CounterActor

Inherited from TypedStreamingActor[String]

Inherited from SparkStreamingActor

Inherited from ActorHelper

Inherited from Logging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Streamer to StringAdd

Inherited by implicit conversion any2stringfmt from Streamer to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Streamer to ArrowAssoc[Streamer]

Inherited by implicit conversion any2Ensuring from Streamer to Ensuring[Streamer]

Ungrouped