Class/Object

org.apache.spark.sql.execution

TopKHokusai

Related Docs: object TopKHokusai | package execution

Permalink

final class TopKHokusai[T] extends Hokusai[T] with TopK

Linear Supertypes
TopK, Serializable, Hokusai[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TopKHokusai
  2. TopK
  3. Serializable
  4. Hokusai
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TopKHokusai(cmsParams: CMSParams, windowSize: Long, epoch0: Long, topKActual: Int)(implicit t: ClassTag[T])

    Permalink
  2. new TopKHokusai(cmsParams: CMSParams, windowSize: Long, epoch0: Long, topKActual: Int, taAgg: MutableList[CountMinSketch[T]], iaAgg: MutableList[CountMinSketch[T]], intervalTracker: IntervalTracker, initialInterval: Long, mBarInitializer: Option[CountMinSketch[T]])(implicit ev: ClassTag[T])

    Permalink

Type Members

  1. class ItemAggregation extends AnyRef

    Permalink
    Definition Classes
    Hokusai
  2. class TimeAggregation extends AnyRef

    Permalink

    Data Structures and Algorithms to maintain Time Aggregation from the paper.

    Data Structures and Algorithms to maintain Time Aggregation from the paper. Time is modeled as a non-decreasing integer starting at 0.

    The type parameter, T, is the key type. This needs to be numeric. Typical value is Long, but Short can cut down on size of resulting data structure, but increased chance of collision. BigInt is another possibility.

    From Theorem 4 in the Paper:

    At time t, the sketch Mj contains statistics for the period [t-delta, t-delta-2j] where delta = t mod 2^j

    The following shows an example of how data ages through m() as t starts at 0 and increases:

    === t = 0
      t=0  j=0 m is EMPTY
    === t = 1
      t=1  j=0 m(0)=[0, 1) # secs in m(0): 1
    === t = 2
      t=2  j=0 m(0)=[1, 2) # secs in m(0): 1
      t=2  j=1 m(1)=[0, 2) # secs in m(1): 2
    === t = 3
      t=3  j=0 m(0)=[2, 3) # secs in m(0): 1
      t=3  j=1 m(1)=[0, 2) # secs in m(1): 2
    === t = 4
      t=4  j=0 m(0)=[3, 4) # secs in m(0): 1
      t=4  j=1 m(1)=[2, 4) # secs in m(1): 2
      t=4  j=2 m(2)=[0, 4) # secs in m(2): 4
    === t = 5
      t=5  j=0 m(0)=[4, 5) # secs in m(0): 1
      t=5  j=1 m(1)=[2, 4) # secs in m(1): 2
      t=5  j=2 m(2)=[0, 4) # secs in m(2): 4
    === t = 6
      t=6  j=0 m(0)=[5, 6) # secs in m(0): 1
      t=6  j=1 m(1)=[4, 6) # secs in m(1): 2
      t=6  j=2 m(2)=[0, 4) # secs in m(2): 4
    === t = 7
      t=7  j=0 m(0)=[6, 7) # secs in m(0): 1
      t=7  j=1 m(1)=[4, 6) # secs in m(1): 2
      t=7  j=2 m(2)=[0, 4) # secs in m(2): 4
    === t = 8
      t=8  j=0 m(0)=[7, 8) # secs in m(0): 1
      t=8  j=1 m(1)=[6, 8) # secs in m(1): 2
      t=8  j=2 m(2)=[4, 8) # secs in m(2): 4
      t=8  j=3 m(3)=[0, 8) # secs in m(3): 8
    === t = 9
      t=9  j=0 m(0)=[8, 9) # secs in m(0): 1
      t=9  j=1 m(1)=[6, 8) # secs in m(1): 2
      t=9  j=2 m(2)=[4, 8) # secs in m(2): 4
      t=9  j=3 m(3)=[0, 8) # secs in m(3): 8

    numIntervals The number of sketches to keep in the exponential backoff. the last one will have a sketch of all data. Default value is 16.

    Definition Classes
    Hokusai
  3. class TimeAndItemAggregation extends AnyRef

    Permalink
    Definition Classes
    Hokusai

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 accummulate[K](data: Iterable[K], extractor: (K) ⇒ (T, Long, Long)): Unit

    Permalink
    Definition Classes
    Hokusai
  5. def accummulate(data: Map[T, Long]): Unit

    Permalink
    Definition Classes
    Hokusai
  6. def accummulate(data: Seq[T]): Unit

    Permalink
    Definition Classes
    Hokusai
  7. def addEpochData(data: Map[T, Long]): Unit

    Permalink
    Definition Classes
    Hokusai
  8. def addEpochData(data: Map[T, Long], time: Long): Unit

    Permalink
    Definition Classes
    Hokusai
  9. def addEpochData(data: Seq[T]): Unit

    Permalink
    Definition Classes
    Hokusai
  10. def addTimestampedData(data: ArrayBuffer[KeyFrequencyWithTimestamp[T]]): Unit

    Permalink
    Definition Classes
    Hokusai
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. val cmsParams: CMSParams

    Permalink
    Definition Classes
    Hokusai
  14. def createZeroCMS(powerOf2: Int): CountMinSketch[T]

    Permalink
    Definition Classes
    TopKHokusaiHokusai
  15. val epoch0: Long

    Permalink
    Definition Classes
    Hokusai
  16. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. implicit val ev: ClassTag[T]

    Permalink
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getCombinedTopKKeysBetween(later: Int, earlier: Int): Set[T]

    Permalink
  22. def getCombinedTopKKeysBetweenTime(epochFrom: Long, epochTo: Long): Option[Set[T]]

    Permalink
  23. def getCombinedTopKKeysTillTime(epoch: Long): Option[Array[T]]

    Permalink
  24. def getTopKBetweenTime(later: Int, earlier: Int, combinedTopKKeys: Array[T]): Array[(T, Approximate)]

    Permalink
  25. def getTopKBetweenTime(epochFrom: Long, epochTo: Long, combinedTopKKeys: Array[T] = null): Option[Array[(T, Approximate)]]

    Permalink
  26. def getTopKForCurrentInterval: Option[Array[(T, Approximate)]]

    Permalink
  27. def getTopKInCurrentInterval: Array[(T, Approximate)]

    Permalink
  28. def getTopKKeysBetweenTime(epochFrom: Long, epochTo: Long): Option[OpenHashSet[T]]

    Permalink
  29. def getTopKKeysForCurrentInterval: OpenHashSet[T]

    Permalink
  30. def getTopKTillTime(epoch: Long, combinedKeys: Array[T] = null): Option[Array[(T, Approximate)]]

    Permalink
  31. def hashCode(): Int

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

    Permalink
    Definition Classes
    Hokusai
  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. var mBar: CountMinSketch[T]

    Permalink
    Definition Classes
    Hokusai
  35. val mergeCreator: (Array[CountMinSketch[T]]) ⇒ CountMinSketch[T]

    Permalink
    Definition Classes
    TopKHokusaiHokusai
  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 queryAtTime(epoch: Long, key: T): Option[Approximate]

    Permalink
    Definition Classes
    Hokusai
  40. def queryBetweenTime(epochFrom: Long, epochTo: Long, key: T): Option[Approximate]

    Permalink
    Definition Classes
    Hokusai
  41. def queryTillLastNIntervals(lastNIntervals: Int, item: T): Option[Approximate]

    Permalink
    Definition Classes
    Hokusai
  42. def queryTillTime(epoch: Long, key: T): Option[Approximate]

    Permalink
    Definition Classes
    Hokusai
  43. def queryTimeAggregateForInterval(item: T, interval: Long): Approximate

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

    Permalink
    Definition Classes
    AnyRef
  45. val taPlusIa: TimeAndItemAggregation

    Permalink
    Definition Classes
    Hokusai
  46. val timeEpoch: TimeEpoch

    Permalink
    Definition Classes
    Hokusai
  47. def toString(): String

    Permalink
    Definition Classes
    Hokusai → AnyRef → Any
  48. val topKActual: Int

    Permalink
  49. var topKInternal: Int

    Permalink
  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( ... )
  53. val windowSize: Long

    Permalink
    Definition Classes
    Hokusai

Inherited from TopK

Inherited from Serializable

Inherited from Hokusai[T]

Inherited from AnyRef

Inherited from Any

Ungrouped