Class

com.holdenkarau.spark.testing

JavaStreamingSuiteBase

Related Doc: package testing

Permalink

class JavaStreamingSuiteBase extends JavaSuiteBase with StreamingSuiteCommon

This is the base trait for Spark Streaming testsuite. This provides basic functionality to run user-defined set of input on user-defined stream operations, and verify the output. This implementation is designed to work with JUnit for java users.

Note: this always uses the manual clock

Linear Supertypes
StreamingSuiteCommon, Logging, Logging, JavaSuiteBase, SharedJavaSparkContext, SparkContextProvider, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JavaStreamingSuiteBase
  2. StreamingSuiteCommon
  3. Logging
  4. Logging
  5. JavaSuiteBase
  6. SharedJavaSparkContext
  7. SparkContextProvider
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JavaStreamingSuiteBase()

    Permalink

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 actuallyWait: Boolean

    Permalink
    Definition Classes
    StreamingSuiteCommon
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def batchDuration: Duration

    Permalink
    Definition Classes
    StreamingSuiteCommon
  7. lazy val checkpointDir: String

    Permalink
    Definition Classes
    StreamingSuiteCommon
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def compareArrays[U](i1: Array[U], i2: Array[U]): Unit

    Permalink

    Utility wrapper around assertArrayEquals that resolves the types

    Utility wrapper around assertArrayEquals that resolves the types

    Definition Classes
    JavaSuiteBase
  10. def conf: SparkConf

    Permalink
    Definition Classes
    JavaStreamingSuiteBase → StreamingSuiteCommon → SharedJavaSparkContext → SparkContextProvider
  11. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. val eventuallyTimeout: Timeout

    Permalink
    Definition Classes
    StreamingSuiteCommon
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def framework: String

    Permalink
    Definition Classes
    StreamingSuiteCommon
  16. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  21. def jsc(): JavaSparkContext

    Permalink
    Definition Classes
    SharedJavaSparkContext
  22. def log: Logger

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logName: String

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  34. def master: String

    Permalink
    Definition Classes
    StreamingSuiteCommon
  35. def maxWaitTimeMillis: Int

    Permalink
    Definition Classes
    StreamingSuiteCommon
  36. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  39. def numInputPartitions: Int

    Permalink
    Definition Classes
    StreamingSuiteCommon
  40. def runBefore(): Unit

    Permalink
    Definition Classes
    SharedJavaSparkContext
  41. def sc(): SparkContext

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

    Permalink
    Definition Classes
    AnyRef
  43. def testOperation[U, V, W](input1: List[List[U]], input2: List[List[V]], operation: Function2[JavaDStream[U], JavaDStream[V], JavaDStream[W]], expectedOutput: List[List[W]], ordered: Boolean): Unit

    Permalink

    Test binary DStream operation with two lists of inputs, with number of batches to run same as the number of input values.

    Test binary DStream operation with two lists of inputs, with number of batches to run same as the number of input values. The size of the two input lists Should be the same. You can simulate the input batch as a List of values or as null to simulate empty batch.

    input1

    First sequence of input collections

    input2

    Second sequence of input collections

    operation

    Binary DStream operation to be applied to the 2 inputs

    expectedOutput

    Sequence of expected output collections

    ordered

    Compare output values with expected output values within the same output batch ordered or unOrdered. Comparing doubles may not work well in case of unordered.

  44. def testOperation[U, V, W](input1: List[List[U]], input2: List[List[V]], operation: Function2[JavaDStream[U], JavaDStream[V], JavaDStream[W]], expectedOutput: List[List[W]]): Unit

    Permalink

    Test binary DStream operation with two lists of inputs, with number of batches to run same as the number of input values.

    Test binary DStream operation with two lists of inputs, with number of batches to run same as the number of input values. The size of the two input lists Should be the same. You can simulate the input batch as a List of values or as null to simulate empty batch.

    input1

    First sequence of input collections

    input2

    Second sequence of input collections

    operation

    Binary DStream operation to be applied to the 2 inputs

    expectedOutput

    Sequence of expected output collections

  45. def testOperation[U, V](input: List[List[U]], operation: Function[JavaDStream[U], JavaDStream[V]], expectedOutput: List[List[V]], ordered: Boolean): Unit

    Permalink

    Test unary DStream operation with a list of inputs, with number of batches to run same as the number of input values.

    Test unary DStream operation with a list of inputs, with number of batches to run same as the number of input values. You can simulate the input batch as a List of values or as null to simulate empty batch.

    input

    Sequence of input collections

    operation

    Binary DStream operation to be applied to the 2 inputs

    expectedOutput

    Sequence of expected output collections

    ordered

    Compare output values with expected output values within the same output batch ordered or unordered. Comparing doubles may not work well in case of unordered.

  46. def testOperation[U, V](input: List[List[U]], operation: Function[JavaDStream[U], JavaDStream[V]], expectedOutput: List[List[V]]): Unit

    Permalink

    Test unary DStream operation with a list of inputs, with number of batches to run same as the number of input values.

    Test unary DStream operation with a list of inputs, with number of batches to run same as the number of input values. You can simulate the input batch as a List of values or as null to simulate empty batch.

    input

    Sequence of input collections

    operation

    Binary DStream operation to be applied to the 2 inputs

    expectedOutput

    Sequence of expected output collections

  47. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  48. def useManualClock: Boolean

    Permalink
    Definition Classes
    StreamingSuiteCommon
  49. def verifyOutput[V](output: Seq[Seq[V]], expectedOutput: Seq[Seq[V]], ordered: Boolean)(implicit arg0: ClassTag[V]): Unit

    Permalink

    Verify whether the output values after running a DStream operation is same as the expected output values, by comparing the output collections either as lists (order matters) or sets (order does not matter)

  50. final def wait(): Unit

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

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

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

Inherited from StreamingSuiteCommon

Inherited from Logging

Inherited from Logging

Inherited from JavaSuiteBase

Inherited from SharedJavaSparkContext

Inherited from SparkContextProvider

Inherited from AnyRef

Inherited from Any

Ungrouped