Packages

class LowLatencyMemoryStream[A] extends MemoryStreamBaseClass[A] with SupportsRealTimeMode

A low latency memory source from memory, only for unit test purpose. This class is very similar to ContinuousMemoryStream, except that it implements the interface of SupportsRealTimeMode, rather than ContinuousStream The overall strategy here is: * LowLatencyMemoryStream maintains a list of records for each partition. addData() will distribute records evenly-ish across partitions. * RecordEndpoint is set up as an endpoint for executor-side LowLatencyMemoryStreamInputPartitionReader instances to poll. It returns the record at the specified offset within the list, or null if that offset doesn't yet have a record. This differs from the existing memory source implementation as data is sent once to tasks as part of the Partition/Split metadata at the beginning of a batch.

Linear Supertypes
SupportsRealTimeMode, MemoryStreamBaseClass[A], Logging, SupportsTriggerAvailableNow, SupportsAdmissionControl, MicroBatchStream, MemoryStreamBase[A], SparkDataStream, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LowLatencyMemoryStream
  2. SupportsRealTimeMode
  3. MemoryStreamBaseClass
  4. Logging
  5. SupportsTriggerAvailableNow
  6. SupportsAdmissionControl
  7. MicroBatchStream
  8. MemoryStreamBase
  9. SparkDataStream
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LowLatencyMemoryStream(id: Int, sparkSession: SparkSession, numPartitions: Int = 2, clock: Clock = LowLatencyClock.getClock)(implicit arg0: Encoder[A])

Type Members

  1. implicit class LogStringContext extends AnyRef
    Definition Classes
    Logging

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def MDC(key: LogKey, value: Any): MDC
    Attributes
    protected
    Definition Classes
    Logging
  5. def addData(partitionId: Int, data: IterableOnce[A]): Offset
  6. def addData(data: IterableOnce[A]): Offset
  7. def addData(data: A*): connector.read.streaming.Offset
    Definition Classes
    MemoryStreamBase
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. val attributes: Seq[AttributeReference]
    Attributes
    protected
    Definition Classes
    MemoryStreamBase
  10. val batches: ListBuffer[Array[UnsafeRow]]

    All batches from lastCommittedOffset + 1 to currentOffset, inclusive.

    All batches from lastCommittedOffset + 1 to currentOffset, inclusive. Stored in a ListBuffer to facilitate removing committed batches.

    Attributes
    protected
    Definition Classes
    MemoryStreamBaseClass
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  12. def commit(end: connector.read.streaming.Offset): Unit
    Definition Classes
    LowLatencyMemoryStreamMemoryStreamBaseClassMemoryStreamBase → SparkDataStream
  13. def createReaderFactory(): PartitionReaderFactory
    Definition Classes
    LowLatencyMemoryStreamMemoryStreamBaseClass → MicroBatchStream
  14. var currentOffset: LongOffset
    Attributes
    protected
    Definition Classes
    MemoryStreamBaseClass
  15. def deserializeOffset(json: String): LowLatencyMemoryStreamOffset
    Definition Classes
    LowLatencyMemoryStreamMemoryStreamBaseClassMemoryStreamBase → SparkDataStream
  16. val encoder: ExpressionEncoder[A]
    Definition Classes
    MemoryStreamBase
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. def fullSchema(): StructType
    Definition Classes
    MemoryStreamBase
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  21. def getDefaultReadLimit(): ReadLimit
    Definition Classes
    SupportsAdmissionControl
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  23. def initialOffset(): connector.read.streaming.Offset
    Definition Classes
    LowLatencyMemoryStreamMemoryStreamBaseClassMemoryStreamBase → SparkDataStream
  24. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  25. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  28. var lastOffsetCommitted: LongOffset

    Last offset that was discarded, or -1 if no commits have occurred.

    Last offset that was discarded, or -1 if no commits have occurred. Note that the value -1 is used in calculations below and isn't just an arbitrary constant.

    Attributes
    protected
    Definition Classes
    MemoryStreamBaseClass
  29. def latestOffset(startOffset: connector.read.streaming.Offset, limit: ReadLimit): connector.read.streaming.Offset
    Definition Classes
    LowLatencyMemoryStreamMemoryStreamBaseClass → SupportsAdmissionControl
  30. def latestOffset(): connector.read.streaming.Offset
    Definition Classes
    MemoryStreamBaseClass → MicroBatchStream
  31. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  32. def logBasedOnLevel(level: Level)(f: => MessageWithContext): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logDebug(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def logDebug(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  36. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logError(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logError(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  40. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  41. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  42. def logInfo(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  43. def logInfo(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  44. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  45. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  46. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. def logTrace(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  48. def logTrace(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  49. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  50. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  51. def logWarning(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  52. def logWarning(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  53. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  54. val logicalPlan: LogicalPlan
    Attributes
    protected
    Definition Classes
    MemoryStreamBase
  55. def mergeOffsets(offsets: Array[PartitionOffset]): LowLatencyMemoryStreamOffset
    Definition Classes
    LowLatencyMemoryStream → SupportsRealTimeMode
  56. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  57. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  58. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  59. val output: Seq[Attribute]
    Attributes
    protected
    Definition Classes
    MemoryStreamBaseClass
  60. def planInputPartitions(start: connector.read.streaming.Offset, end: connector.read.streaming.Offset): Array[InputPartition]
    Definition Classes
    LowLatencyMemoryStreamMemoryStreamBaseClass → MicroBatchStream
  61. def planInputPartitions(start: connector.read.streaming.Offset): Array[InputPartition]
    Definition Classes
    LowLatencyMemoryStream → SupportsRealTimeMode
  62. def prepareForRealTimeMode(): Unit
    Definition Classes
    SupportsRealTimeMode
  63. def prepareForTriggerAvailableNow(): Unit
    Definition Classes
    MemoryStreamBaseClass → SupportsTriggerAvailableNow
  64. def reportLatestOffset(): connector.read.streaming.Offset
    Definition Classes
    SupportsAdmissionControl
  65. def reset(): Unit
  66. var startOffset: LongOffset
    Attributes
    protected
    Definition Classes
    MemoryStreamBaseClass
  67. def stop(): Unit
    Definition Classes
    LowLatencyMemoryStreamMemoryStreamBaseClass → SparkDataStream
  68. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  69. def toDF(): classic.DataFrame
    Definition Classes
    MemoryStreamBase
  70. def toDS(): classic.Dataset[A]
    Definition Classes
    MemoryStreamBase
  71. lazy val toRow: Serializer[A]
    Attributes
    protected
    Definition Classes
    MemoryStreamBase
  72. def toString(): String
    Definition Classes
    MemoryStreamBaseClass → AnyRef → Any
  73. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  74. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  75. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  76. def withLogContext(context: Map[String, String])(body: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Logging

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from SupportsRealTimeMode

Inherited from MemoryStreamBaseClass[A]

Inherited from Logging

Inherited from SupportsTriggerAvailableNow

Inherited from SupportsAdmissionControl

Inherited from MicroBatchStream

Inherited from MemoryStreamBase[A]

Inherited from SparkDataStream

Inherited from AnyRef

Inherited from Any

Ungrouped