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

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

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

KeyedStream.getExecutionConfig介绍

暂无

代码示例

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

/**
 * Applies an aggregation that sums every window of the data stream at the
 * given position.
 *
 * @param positionToSum The position in the tuple/array to sum
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> sum(int positionToSum) {
  return aggregate(new SumAggregator<>(positionToSum, input.getType(), input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the minimum value of every window
 * of the data stream at the given position.
 *
 * @param positionToMin The position to minimize
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> min(int positionToMin) {
  return aggregate(new ComparableAggregator<>(positionToMin, input.getType(), AggregationFunction.AggregationType.MIN, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that sums every window of the data stream at the
 * given position.
 *
 * @param positionToSum The position in the tuple/array to sum
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> sum(int positionToSum) {
  return aggregate(new SumAggregator<>(positionToSum, input.getType(), input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the maximum value of the pojo data
 * stream at the given field expression for every window. A field expression
 * is either the name of a public field or a getter method with parentheses
 * of the {@link DataStream DataStreams} underlying type. A dot can be used to drill
 * down into objects, as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field expression based on which the aggregation will be applied.
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> max(String field) {
  return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MAX, false, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that gives the minimum element of every window of
 * the data stream by the given position. If more elements have the same
 * minimum value the operator returns either the first or last one depending
 * on the parameter setting.
 *
 * @param positionToMinBy The position to minimize
 * @param first If true, then the operator return the first element with the minimum value, otherwise returns the last
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(int positionToMinBy, boolean first) {
  return aggregate(new ComparableAggregator<>(positionToMinBy, input.getType(), AggregationFunction.AggregationType.MINBY, first, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that gives the maximum element of every window of
 * the data stream by the given position. If more elements have the same
 * maximum value the operator returns either the first or last one depending
 * on the parameter setting.
 *
 * @param positionToMaxBy The position to maximize by
 * @param first If true, then the operator return the first element with the maximum value, otherwise returns the last
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> maxBy(int positionToMaxBy, boolean first) {
  return aggregate(new ComparableAggregator<>(positionToMaxBy, input.getType(), AggregationFunction.AggregationType.MAXBY, first, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that gives the minimum element of every window of
 * the data stream by the given position. If more elements have the same
 * minimum value the operator returns either the first or last one depending
 * on the parameter setting.
 *
 * @param positionToMinBy The position to minimize
 * @param first If true, then the operator return the first element with the minimum value, otherwise returns the last
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(int positionToMinBy, boolean first) {
  return aggregate(new ComparableAggregator<>(positionToMinBy, input.getType(), AggregationFunction.AggregationType.MINBY, first, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the minimum value of every window
 * of the data stream at the given position.
 *
 * @param positionToMin The position to minimize
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> min(int positionToMin) {
  return aggregate(new ComparableAggregator<>(positionToMin, input.getType(), AggregationFunction.AggregationType.MIN, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that gives the maximum value of every window of
 * the data stream at the given position.
 *
 * @param positionToMax The position to maximize
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> max(int positionToMax) {
  return aggregate(new ComparableAggregator<>(positionToMax, input.getType(), AggregationFunction.AggregationType.MAX, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that gives the maximum value of every window of
 * the data stream at the given position.
 *
 * @param positionToMax The position to maximize
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> max(int positionToMax) {
  return aggregate(new ComparableAggregator<>(positionToMax, input.getType(), AggregationFunction.AggregationType.MAX, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the maximum value of the pojo data
 * stream at the given field expression for every window. A field expression
 * is either the name of a public field or a getter method with parentheses
 * of the {@link DataStream DataStreams} underlying type. A dot can be used to drill
 * down into objects, as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field expression based on which the aggregation will be applied.
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> max(String field) {
  return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MAX, false, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the minimum element of the pojo
 * data stream by the given field expression for every window. A field
 * expression is either the name of a public field or a getter method with
 * parentheses of the {@link DataStream DataStreams} underlying type. A dot can be used
 * to drill down into objects, as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field expression based on which the aggregation will be applied.
 * @param first If True then in case of field equality the first object will be returned
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(String field, boolean first) {
  return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MINBY, first, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that sums every window of the pojo data stream at
 * the given field for every window.
 *
 * <p>A field expression is either the name of a public field or a getter method with
 * parentheses of the stream's underlying type. A dot can be used to drill down into objects,
 * as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field to sum
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> sum(String field) {
  return aggregate(new SumAggregator<>(field, input.getType(), input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the maximum element of the pojo
 * data stream by the given field expression for every window. A field
 * expression is either the name of a public field or a getter method with
 * parentheses of the {@link DataStream}S underlying type. A dot can be used
 * to drill down into objects, as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field expression based on which the aggregation will be applied.
 * @param first If True then in case of field equality the first object will be returned
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> maxBy(String field, boolean first) {
  return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MAXBY, first, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that sums every window of the pojo data stream at the given field for
 * every window.
 *
 * <p>A field expression is either the name of a public field or a getter method with
 * parentheses of the stream's underlying type. A dot can be used to drill down into objects,
 * as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field to sum
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> sum(String field) {
  return aggregate(new SumAggregator<>(field, input.getType(), input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the minimum value of the pojo data
 * stream at the given field expression for every window.
 *
 * <p>A field * expression is either the name of a public field or a getter method with
 * parentheses of the {@link DataStream}S underlying type. A dot can be used
 * to drill down into objects, as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field expression based on which the aggregation will be applied.
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> min(String field) {
  return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MIN, false, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that gives a rolling sum of the data stream at the
 * given position grouped by the given key. An independent aggregate is kept
 * per key.
 *
 * @param positionToSum
 *            The field position in the data points to sum. This is applicable to
 *            Tuple types, basic and primitive array types, Scala case classes,
 *            and primitive types (which is considered as having one field).
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> sum(int positionToSum) {
  return aggregate(new SumAggregator<>(positionToSum, getType(), getExecutionConfig()));
}

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

/**
 * Applies an aggregation that gives the maximum element of every window of
 * the data stream by the given position. If more elements have the same
 * maximum value the operator returns either the first or last one depending
 * on the parameter setting.
 *
 * @param positionToMaxBy The position to maximize by
 * @param first If true, then the operator return the first element with the maximum value, otherwise returns the last
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> maxBy(int positionToMaxBy, boolean first) {
  return aggregate(new ComparableAggregator<>(positionToMaxBy, input.getType(), AggregationFunction.AggregationType.MAXBY, first, input.getExecutionConfig()));
}

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

/**
 * Applies an aggregation that that gives the minimum element of the pojo
 * data stream by the given field expression for every window. A field
 * expression is either the name of a public field or a getter method with
 * parentheses of the {@link DataStream DataStreams} underlying type. A dot can be used
 * to drill down into objects, as in {@code "field1.getInnerField2()" }.
 *
 * @param field The field expression based on which the aggregation will be applied.
 * @param first If True then in case of field equality the first object will be returned
 * @return The transformed DataStream.
 */
public SingleOutputStreamOperator<T> minBy(String field, boolean first) {
  return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MINBY, first, input.getExecutionConfig()));
}

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

protected SingleOutputStreamOperator<T> aggregate(AggregationFunction<T> aggregate) {
  StreamGroupedReduce<T> operator = new StreamGroupedReduce<T>(
      clean(aggregate), getType().createSerializer(getExecutionConfig()));
  return transform("Keyed Aggregation", getType(), operator);
}

相关文章