org.apache.flink.api.scala

GroupedDataSet

class GroupedDataSet[T] extends AnyRef

A DataSet to which a grouping key was added. Operations work on groups of elements with the same key (aggregate, reduce, and reduceGroup).

A secondary sort order can be added with sortGroup, but this is only used when using one of the group-at-a-time operations, i.e. reduceGroup.

Annotations
@Public()
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GroupedDataSet
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GroupedDataSet(set: DataSet[T], keys: Keys[T])(implicit arg0: ClassTag[T])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def aggregate(agg: Aggregations, field: Int): AggregateDataSet[T]

    Creates a new DataSet by aggregating the specified field using the given aggregation function.

    Creates a new DataSet by aggregating the specified field using the given aggregation function. Since this is a keyed DataSet the aggregation will be performed on groups of elements with the same key.

    This only works on CaseClass DataSets.

  7. def aggregate(agg: Aggregations, field: String): AggregateDataSet[T]

    Creates a new DataSet by aggregating the specified tuple field using the given aggregation function.

    Creates a new DataSet by aggregating the specified tuple field using the given aggregation function. Since this is a keyed DataSet the aggregation will be performed on groups of tuples with the same key.

    This only works on Tuple DataSets.

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def combineGroup[R](combiner: GroupCombineFunction[T, R])(implicit arg0: TypeInformation[R], arg1: ClassTag[R]): DataSet[R]

    Applies a CombineFunction on a grouped DataSet.

    Applies a CombineFunction on a grouped DataSet. A CombineFunction is similar to a GroupReduceFunction but does not perform a full data exchange. Instead, the CombineFunction calls the combine method once per partition for combining a group of results. This operator is suitable for combining values into an intermediate format before doing a proper groupReduce where the data is shuffled across the node for further reduction. The GroupReduce operator can also be supplied with a combiner by implementing the RichGroupReduce function. The combine method of the RichGroupReduce function demands input and output type to be the same. The CombineFunction, on the other side, can have an arbitrary output type.

  11. def combineGroup[R](fun: (Iterator[T], Collector[R]) ⇒ Unit)(implicit arg0: TypeInformation[R], arg1: ClassTag[R]): DataSet[R]

    Applies a CombineFunction on a grouped DataSet.

    Applies a CombineFunction on a grouped DataSet. A CombineFunction is similar to a GroupReduceFunction but does not perform a full data exchange. Instead, the CombineFunction calls the combine method once per partition for combining a group of results. This operator is suitable for combining values into an intermediate format before doing a proper groupReduce where the data is shuffled across the node for further reduction. The GroupReduce operator can also be supplied with a combiner by implementing the RichGroupReduce function. The combine method of the RichGroupReduce function demands input and output type to be the same. The CombineFunction, on the other side, can have an arbitrary output type.

  12. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def first(n: Int): DataSet[T]

    Creates a new DataSet containing the first n elements of each group of this DataSet.

  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def getCustomPartitioner[K](): Partitioner[K]

    Gets the custom partitioner to be used for this grouping, or null, if none was defined.

    Gets the custom partitioner to be used for this grouping, or null, if none was defined.

    Annotations
    @Internal()
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def max(field: String): AggregateDataSet[T]

    Syntactic sugar for aggregate with MAX

  21. def max(field: Int): AggregateDataSet[T]

    Syntactic sugar for aggregate with MAX

  22. def min(field: String): AggregateDataSet[T]

    Syntactic sugar for aggregate with MIN

  23. def min(field: Int): AggregateDataSet[T]

    Syntactic sugar for aggregate with MIN

  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. def reduce(reducer: ReduceFunction[T]): DataSet[T]

    Creates a new DataSet by merging the elements of each group (elements with the same key) using an associative reduce function.

  28. def reduce(fun: (T, T) ⇒ T): DataSet[T]

    Creates a new DataSet by merging the elements of each group (elements with the same key) using an associative reduce function.

  29. def reduceGroup[R](reducer: GroupReduceFunction[T, R])(implicit arg0: TypeInformation[R], arg1: ClassTag[R]): DataSet[R]

    Creates a new DataSet by passing for each group (elements with the same key) the list of elements to the GroupReduceFunction.

    Creates a new DataSet by passing for each group (elements with the same key) the list of elements to the GroupReduceFunction. The function can output zero or more elements. The concatenation of the emitted values will form the resulting DataSet.

  30. def reduceGroup[R](fun: (Iterator[T], Collector[R]) ⇒ Unit)(implicit arg0: TypeInformation[R], arg1: ClassTag[R]): DataSet[R]

    Creates a new DataSet by passing for each group (elements with the same key) the list of elements to the group reduce function.

    Creates a new DataSet by passing for each group (elements with the same key) the list of elements to the group reduce function. The function can output zero or more elements using the Collector. The concatenation of the emitted values will form the resulting DataSet.

  31. def reduceGroup[R](fun: (Iterator[T]) ⇒ R)(implicit arg0: TypeInformation[R], arg1: ClassTag[R]): DataSet[R]

    Creates a new DataSet by passing for each group (elements with the same key) the list of elements to the group reduce function.

    Creates a new DataSet by passing for each group (elements with the same key) the list of elements to the group reduce function. The function must output one element. The concatenation of those will form the resulting DataSet.

  32. def sortGroup[K](fun: (T) ⇒ K, order: Order)(implicit arg0: TypeInformation[K]): GroupedDataSet[T]

    Adds a secondary sort key to this GroupedDataSet.

    Adds a secondary sort key to this GroupedDataSet. This will only have an effect if you use one of the group-at-a-time, i.e. reduceGroup.

    This works on any data type.

  33. def sortGroup(field: String, order: Order): GroupedDataSet[T]

    Adds a secondary sort key to this GroupedDataSet.

    Adds a secondary sort key to this GroupedDataSet. This will only have an effect if you use one of the group-at-a-time, i.e. reduceGroup.

    This only works on CaseClass DataSets.

  34. def sortGroup(field: Int, order: Order): GroupedDataSet[T]

    Adds a secondary sort key to this GroupedDataSet.

    Adds a secondary sort key to this GroupedDataSet. This will only have an effect if you use one of the group-at-a-time, i.e. reduceGroup.

    This only works on Tuple DataSets.

  35. def sum(field: String): AggregateDataSet[T]

    Syntactic sugar for aggregate with SUM

  36. def sum(field: Int): AggregateDataSet[T]

    Syntactic sugar for aggregate with SUM

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

    Definition Classes
    AnyRef
  38. def toString(): String

    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. def withPartitioner[K](partitioner: Partitioner[K])(implicit arg0: TypeInformation[K]): GroupedDataSet[T]

    Sets a custom partitioner for the grouping.

Inherited from AnyRef

Inherited from Any

Ungrouped