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

    Definition Classes
    Any
  9. def clone(): AnyRef

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

    Definition Classes
    Actor
  11. 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
  12. 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
  13. 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
  14. 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
  15. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. 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()
  19. final def getClass(): Class[_]

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

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

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

    Definition Classes
    Any
  23. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  24. def log: Logger

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

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

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging
  31. def logName: String

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

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    TypedStreamingActor → Actor
  45. val scale: Int

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

    Definition Classes
    Actor
  47. final def sender: ActorRef

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

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

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

    Definition Classes
    ActorHelper
  51. def supervisorStrategy: SupervisorStrategy

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

    Definition Classes
    AnyRef
  53. def toString(): String

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. 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