Packages

c

org.apache.spark.sql.execution.streaming

MergingSortWithSessionWindowStateIterator

class MergingSortWithSessionWindowStateIterator extends Iterator[InternalRow] with Logging

This class technically does the merge sort between input rows and existing sessions in state, to optimize the cost of sort on "input rows + existing sessions". This is based on the precondition that input rows are sorted by "group keys + start time of session window".

This only materializes the existing sessions into memory, which are tend to be not many per group key. The cost of sorting existing sessions would be also minor based on the assumption.

The output rows are sorted with "group keys + start time of session window", which is same as the sort condition on input rows.

Linear Supertypes
Logging, Iterator[InternalRow], IterableOnceOps[InternalRow, Iterator, Iterator[InternalRow]], IterableOnce[InternalRow], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MergingSortWithSessionWindowStateIterator
  2. Logging
  3. Iterator
  4. IterableOnceOps
  5. IterableOnce
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new MergingSortWithSessionWindowStateIterator(iter: Iterator[InternalRow], stateManager: StreamingSessionWindowStateManager, store: ReadStateStore, groupWithoutSessionExpressions: Seq[Attribute], sessionExpression: Attribute, inputSchema: Seq[Attribute])

Type Members

  1. class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]]
    Definition Classes
    Iterator
  2. 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 ++[B >: InternalRow](xs: => IterableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
    Annotations
    @inline()
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def addString(b: StringBuilder): b.type
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  6. final def addString(b: StringBuilder, sep: String): b.type
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  7. def addString(b: StringBuilder, start: String, sep: String, end: String): b.type
    Definition Classes
    IterableOnceOps
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def buffered: BufferedIterator[InternalRow]
    Definition Classes
    Iterator
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  11. def collect[B](pf: PartialFunction[InternalRow, B]): Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  12. def collectFirst[B](pf: PartialFunction[InternalRow, B]): Option[B]
    Definition Classes
    IterableOnceOps
  13. def concat[B >: InternalRow](xs: => IterableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
  14. def contains(elem: Any): Boolean
    Definition Classes
    Iterator
  15. def copyToArray[B >: InternalRow](xs: Array[B], start: Int, len: Int): Int
    Definition Classes
    IterableOnceOps
  16. def copyToArray[B >: InternalRow](xs: Array[B], start: Int): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  17. def copyToArray[B >: InternalRow](xs: Array[B]): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  18. def corresponds[B](that: IterableOnce[B])(p: (InternalRow, B) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  19. def count(p: (InternalRow) => Boolean): Int
    Definition Classes
    IterableOnceOps
  20. def distinct: Iterator[InternalRow]
    Definition Classes
    Iterator
  21. def distinctBy[B](f: (InternalRow) => B): Iterator[InternalRow]
    Definition Classes
    Iterator
  22. def drop(n: Int): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  23. def dropWhile(p: (InternalRow) => Boolean): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  24. def duplicate: (Iterator[InternalRow], Iterator[InternalRow])
    Definition Classes
    Iterator
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. def exists(p: (InternalRow) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  28. def filter(p: (InternalRow) => Boolean): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  29. def filterNot(p: (InternalRow) => Boolean): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  30. def find(p: (InternalRow) => Boolean): Option[InternalRow]
    Definition Classes
    IterableOnceOps
  31. def flatMap[B](f: (InternalRow) => IterableOnce[B]): Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  32. def flatten[B](implicit ev: (InternalRow) => IterableOnce[B]): Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  33. def fold[A1 >: InternalRow](z: A1)(op: (A1, A1) => A1): A1
    Definition Classes
    IterableOnceOps
  34. def foldLeft[B](z: B)(op: (B, InternalRow) => B): B
    Definition Classes
    IterableOnceOps
  35. def foldRight[B](z: B)(op: (InternalRow, B) => B): B
    Definition Classes
    IterableOnceOps
  36. def forall(p: (InternalRow) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  37. def foreach[U](f: (InternalRow) => U): Unit
    Definition Classes
    IterableOnceOps
  38. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  39. def grouped[B >: InternalRow](size: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  40. def hasNext: Boolean
    Definition Classes
    MergingSortWithSessionWindowStateIterator → Iterator
  41. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  42. def indexOf[B >: InternalRow](elem: B, from: Int): Int
    Definition Classes
    Iterator
  43. def indexOf[B >: InternalRow](elem: B): Int
    Definition Classes
    Iterator
  44. def indexWhere(p: (InternalRow) => Boolean, from: Int): Int
    Definition Classes
    Iterator
  45. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  46. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. def isEmpty: Boolean
    Definition Classes
    Iterator → IterableOnceOps
    Annotations
    @deprecatedOverriding()
  48. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  49. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  50. def isTraversableAgain: Boolean
    Definition Classes
    IterableOnceOps
  51. final def iterator: Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnce
    Annotations
    @inline()
  52. def knownSize: Int
    Definition Classes
    IterableOnce
  53. final def length: Int
    Definition Classes
    Iterator
    Annotations
    @inline()
  54. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  55. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  56. def logDebug(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  57. def logDebug(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  58. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  59. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  60. def logError(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  61. def logError(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  62. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  63. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  64. def logInfo(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  65. def logInfo(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  66. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  67. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  68. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  69. def logTrace(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  70. def logTrace(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  71. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  72. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  73. def logWarning(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def logWarning(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  76. def map[B](f: (InternalRow) => B): Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  77. def max[B >: InternalRow](implicit ord: Ordering[B]): InternalRow
    Definition Classes
    IterableOnceOps
  78. def maxBy[B](f: (InternalRow) => B)(implicit ord: Ordering[B]): InternalRow
    Definition Classes
    IterableOnceOps
  79. def maxByOption[B](f: (InternalRow) => B)(implicit ord: Ordering[B]): Option[InternalRow]
    Definition Classes
    IterableOnceOps
  80. def maxOption[B >: InternalRow](implicit ord: Ordering[B]): Option[InternalRow]
    Definition Classes
    IterableOnceOps
  81. def min[B >: InternalRow](implicit ord: Ordering[B]): InternalRow
    Definition Classes
    IterableOnceOps
  82. def minBy[B](f: (InternalRow) => B)(implicit ord: Ordering[B]): InternalRow
    Definition Classes
    IterableOnceOps
  83. def minByOption[B](f: (InternalRow) => B)(implicit ord: Ordering[B]): Option[InternalRow]
    Definition Classes
    IterableOnceOps
  84. def minOption[B >: InternalRow](implicit ord: Ordering[B]): Option[InternalRow]
    Definition Classes
    IterableOnceOps
  85. final def mkString: String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  86. final def mkString(sep: String): String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  87. final def mkString(start: String, sep: String, end: String): String
    Definition Classes
    IterableOnceOps
  88. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  89. def next(): InternalRow
    Definition Classes
    MergingSortWithSessionWindowStateIterator → Iterator
  90. def nextOption(): Option[InternalRow]
    Definition Classes
    Iterator
  91. def nonEmpty: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  92. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  93. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  94. def padTo[B >: InternalRow](len: Int, elem: B): Iterator[B]
    Definition Classes
    Iterator
  95. def partition(p: (InternalRow) => Boolean): (Iterator[InternalRow], Iterator[InternalRow])
    Definition Classes
    Iterator
  96. def patch[B >: InternalRow](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]
    Definition Classes
    Iterator
  97. def product[B >: InternalRow](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  98. def reduce[B >: InternalRow](op: (B, B) => B): B
    Definition Classes
    IterableOnceOps
  99. def reduceLeft[B >: InternalRow](op: (B, InternalRow) => B): B
    Definition Classes
    IterableOnceOps
  100. def reduceLeftOption[B >: InternalRow](op: (B, InternalRow) => B): Option[B]
    Definition Classes
    IterableOnceOps
  101. def reduceOption[B >: InternalRow](op: (B, B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  102. def reduceRight[B >: InternalRow](op: (InternalRow, B) => B): B
    Definition Classes
    IterableOnceOps
  103. def reduceRightOption[B >: InternalRow](op: (InternalRow, B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  104. def reversed: Iterable[InternalRow]
    Attributes
    protected
    Definition Classes
    IterableOnceOps
  105. def sameElements[B >: InternalRow](that: IterableOnce[B]): Boolean
    Definition Classes
    Iterator
  106. def scanLeft[B](z: B)(op: (B, InternalRow) => B): Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  107. def size: Int
    Definition Classes
    IterableOnceOps
  108. def slice(from: Int, until: Int): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  109. def sliceIterator(from: Int, until: Int): Iterator[InternalRow]
    Attributes
    protected
    Definition Classes
    Iterator
  110. def sliding[B >: InternalRow](size: Int, step: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  111. def span(p: (InternalRow) => Boolean): (Iterator[InternalRow], Iterator[InternalRow])
    Definition Classes
    Iterator → IterableOnceOps
  112. def splitAt(n: Int): (Iterator[InternalRow], Iterator[InternalRow])
    Definition Classes
    IterableOnceOps
  113. def stepper[S <: Stepper[_]](implicit shape: StepperShape[InternalRow, S]): S
    Definition Classes
    IterableOnce
  114. def sum[B >: InternalRow](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  115. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  116. def take(n: Int): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  117. def takeWhile(p: (InternalRow) => Boolean): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  118. def tapEach[U](f: (InternalRow) => U): Iterator[InternalRow]
    Definition Classes
    Iterator → IterableOnceOps
  119. def to[C1](factory: Factory[InternalRow, C1]): C1
    Definition Classes
    IterableOnceOps
  120. def toArray[B >: InternalRow](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    IterableOnceOps
  121. final def toBuffer[B >: InternalRow]: Buffer[B]
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  122. def toIndexedSeq: IndexedSeq[InternalRow]
    Definition Classes
    IterableOnceOps
  123. def toList: List[InternalRow]
    Definition Classes
    IterableOnceOps
  124. def toMap[K, V](implicit ev: <:<[InternalRow, (K, V)]): Map[K, V]
    Definition Classes
    IterableOnceOps
  125. def toSeq: Seq[InternalRow]
    Definition Classes
    IterableOnceOps
  126. def toSet[B >: InternalRow]: Set[B]
    Definition Classes
    IterableOnceOps
  127. def toString(): String
    Definition Classes
    Iterator → AnyRef → Any
  128. def toVector: Vector[InternalRow]
    Definition Classes
    IterableOnceOps
  129. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  130. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  131. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  132. def withFilter(p: (InternalRow) => Boolean): Iterator[InternalRow]
    Definition Classes
    Iterator
  133. def withLogContext(context: Map[String, String])(body: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Logging
  134. def zip[B](that: IterableOnce[B]): Iterator[(InternalRow, B)]
    Definition Classes
    Iterator
  135. def zipAll[A1 >: InternalRow, B](that: IterableOnce[B], thisElem: A1, thatElem: B): Iterator[(A1, B)]
    Definition Classes
    Iterator
  136. def zipWithIndex: Iterator[(InternalRow, Int)]
    Definition Classes
    Iterator → IterableOnceOps

Deprecated Value Members

  1. final def /:[B](z: B)(op: (B, InternalRow) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldLeft instead of /:

  2. final def :\[B](z: B)(op: (InternalRow, B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldRight instead of :\

  3. def aggregate[B](z: => B)(seqop: (B, InternalRow) => B, combop: (B, B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) For sequential collections, prefer foldLeft(z)(seqop). For parallel collections, use ParIterableLike#aggregate.

  4. final def copyToBuffer[B >: InternalRow](dest: Buffer[B]): Unit
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use dest ++= coll instead

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

    (Since version 9)

  6. final def hasDefiniteSize: Boolean
    Definition Classes
    Iterator → IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) hasDefiniteSize on Iterator is the same as isEmpty

  7. def scanRight[B](z: B)(op: (InternalRow, B) => B): Iterator[B]
    Definition Classes
    Iterator
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Call scanRight on an Iterable instead.

  8. def seq: MergingSortWithSessionWindowStateIterator.this.type
    Definition Classes
    Iterator
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Iterator.seq always returns the iterator itself

  9. final def toIterator: Iterator[InternalRow]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .iterator instead of .toIterator

  10. final def toStream: Stream[InternalRow]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .to(LazyList) instead of .toStream

Inherited from Logging

Inherited from Iterator[InternalRow]

Inherited from IterableOnceOps[InternalRow, Iterator, Iterator[InternalRow]]

Inherited from IterableOnce[InternalRow]

Inherited from AnyRef

Inherited from Any

Ungrouped