org.apache.flink.streaming.api.datastream.KeyedStream.minBy()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中org.apache.flink.streaming.api.datastream.KeyedStream.minBy()方法的一些代码示例,展示了KeyedStream.minBy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyedStream.minBy()方法的具体详情如下:
包路径:org.apache.flink.streaming.api.datastream.KeyedStream
类名称:KeyedStream
方法名:minBy

KeyedStream.minBy介绍

[英]Applies an aggregation that gives the current element with the minimum value at the given position by the given key. An independent aggregate is kept per key. If more elements have the minimum value at the given position, the operator returns the first one by default.
[中]应用聚合,该聚合通过给定键在给定位置为当前元素提供最小值。每个键保留一个独立的聚合。如果在给定位置有多个元素具有最小值,则默认情况下,运算符返回第一个元素。

代码示例

代码示例来源:origin: apache/flink

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            The field position in the data points to minimize. This is applicable to
 *            Tuple types, Scala case classes, and primitive types (which is considered
 *            as having one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(int positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

代码示例来源:origin: apache/flink

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            In case of a POJO, Scala case class, or Tuple type, the
 *            name of the (public) field on which to perform the aggregation.
 *            Additionally, a dot can be used to drill down into nested
 *            objects, as in {@code "field1.fieldxy" }.
 *            Furthermore "*" can be specified in case of a basic type
 *            (which is considered as having only one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(String positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.10

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            The field position in the data points to minimize. This is applicable to
 *            Tuple types, Scala case classes, and primitive types (which is considered
 *            as having one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(int positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.10

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            In case of a POJO, Scala case class, or Tuple type, the
 *            name of the (public) field on which to perform the aggregation.
 *            Additionally, a dot can be used to drill down into nested
 *            objects, as in {@code "field1.fieldxy" }.
 *            Furthermore "*" can be specified in case of a basic type
 *            (which is considered as having only one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(String positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.11

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            The field position in the data points to minimize. This is applicable to
 *            Tuple types, Scala case classes, and primitive types (which is considered
 *            as having one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(int positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

代码示例来源:origin: org.apache.flink/flink-streaming-java

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            The field position in the data points to minimize. This is applicable to
 *            Tuple types, Scala case classes, and primitive types (which is considered
 *            as having one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(int positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.11

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            In case of a POJO, Scala case class, or Tuple type, the
 *            name of the (public) field on which to perform the aggregation.
 *            Additionally, a dot can be used to drill down into nested
 *            objects, as in {@code "field1.fieldxy" }.
 *            Furthermore "*" can be specified in case of a basic type
 *            (which is considered as having only one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(String positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

代码示例来源:origin: org.apache.flink/flink-streaming-java

/**
 * Applies an aggregation that gives the current element with the
 * minimum value at the given position by the given key. An independent
 * aggregate is kept per key. If more elements have the minimum value at the
 * given position, the operator returns the first one by default.
 *
 * @param positionToMinBy
 *            In case of a POJO, Scala case class, or Tuple type, the
 *            name of the (public) field on which to perform the aggregation.
 *            Additionally, a dot can be used to drill down into nested
 *            objects, as in {@code "field1.fieldxy" }.
 *            Furthermore "*" can be specified in case of a basic type
 *            (which is considered as having only one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(String positionToMinBy) {
  return this.minBy(positionToMinBy, true);
}

相关文章