Class

org.apache.spark.ml.odkl

TopKUDAF

Related Doc: package odkl

Permalink

class TopKUDAF[B] extends UserDefinedAggregateFunction with Logging

Created by eugeny.malyutin on 24.06.16.

UDAF designed to extract top-numRows rows by columnValue Used to replace Hive Window-functions which are to slow in case of all-df in one aggregation cell Result of aggFun is packed in a column "arrData" and need to be org.apache.spark.sql.functions.explode-d

B

- type of columnToSortBy with implicit ordering for type B

Linear Supertypes
Logging, UserDefinedAggregateFunction, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TopKUDAF
  2. Logging
  3. UserDefinedAggregateFunction
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TopKUDAF(numRows: Int = 20, dfSchema: StructType, columnToSortBy: String)(implicit cmp: Ordering[B])

    Permalink

    numRows

    num rows per aggregation colemn

    dfSchema

    dataframe schema with all columns in one struct-column named "data"

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 apply(exprs: Column*): Column

    Permalink
    Definition Classes
    UserDefinedAggregateFunction
    Annotations
    @varargs()
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def bufferSchema: StructType

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. implicit val cmp: Ordering[B]

    Permalink
  9. val columnToSortByIndex: Int

    Permalink
  10. def dataType: DataType

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  11. def deterministic: Boolean

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  12. def distinct(exprs: Column*): Column

    Permalink
    Definition Classes
    UserDefinedAggregateFunction
    Annotations
    @varargs()
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def evaluate(buffer: Row): Any

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  16. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. def initialize(buffer: MutableAggregationBuffer): Unit

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  20. def inputSchema: StructType

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  21. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. def k: Int

    Permalink
  24. def log: Logger

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  36. def merge(buffer1: MutableAggregationBuffer, buffer2: Row): Unit

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  37. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  40. val numRows: Int

    Permalink

    num rows per aggregation colemn

  41. lazy val rowComparator: Comparator[AnyRef]

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

    Permalink
    Definition Classes
    AnyRef
  43. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  44. def update(buffer: MutableAggregationBuffer, input: Row): Unit

    Permalink
    Definition Classes
    TopKUDAF → UserDefinedAggregateFunction
  45. final def wait(): Unit

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

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

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

Inherited from Logging

Inherited from UserDefinedAggregateFunction

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped