org.apache.flink.api.java.operators.MapOperator.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(96)

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

MapOperator.<init>介绍

暂无

代码示例

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

/**
 * Applies a Map transformation on this DataSet.
 *
 * <p>The transformation calls a {@link org.apache.flink.api.common.functions.MapFunction} for each element of the DataSet.
 * Each MapFunction call returns exactly one element.
 *
 * @param mapper The MapFunction that is called for each element of the DataSet.
 * @return A MapOperator that represents the transformed DataSet.
 *
 * @see org.apache.flink.api.common.functions.MapFunction
 * @see org.apache.flink.api.common.functions.RichMapFunction
 * @see MapOperator
 */
public <R> MapOperator<T, R> map(MapFunction<T, R> mapper) {
  if (mapper == null) {
    throw new NullPointerException("Map function must not be null.");
  }
  String callLocation = Utils.getCallLocationName();
  TypeInformation<R> resultType = TypeExtractor.getMapReturnTypes(mapper, getType(), callLocation, true);
  return new MapOperator<>(this, resultType, clean(mapper), callLocation);
}

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

/**
 * Applies a Map transformation on this DataSet.
 *
 * <p>The transformation calls a {@link org.apache.flink.api.common.functions.MapFunction} for each element of the DataSet.
 * Each MapFunction call returns exactly one element.
 *
 * @param mapper The MapFunction that is called for each element of the DataSet.
 * @return A MapOperator that represents the transformed DataSet.
 *
 * @see org.apache.flink.api.common.functions.MapFunction
 * @see org.apache.flink.api.common.functions.RichMapFunction
 * @see MapOperator
 */
public <R> MapOperator<T, R> map(MapFunction<T, R> mapper) {
  if (mapper == null) {
    throw new NullPointerException("Map function must not be null.");
  }
  String callLocation = Utils.getCallLocationName();
  TypeInformation<R> resultType = TypeExtractor.getMapReturnTypes(mapper, getType(), callLocation, true);
  return new MapOperator<>(this, resultType, clean(mapper), callLocation);
}

代码示例来源:origin: com.alibaba.blink/flink-java

/**
 * Applies a Map transformation on this DataSet.
 *
 * <p>The transformation calls a {@link org.apache.flink.api.common.functions.MapFunction} for each element of the DataSet.
 * Each MapFunction call returns exactly one element.
 *
 * @param mapper The MapFunction that is called for each element of the DataSet.
 * @return A MapOperator that represents the transformed DataSet.
 *
 * @see org.apache.flink.api.common.functions.MapFunction
 * @see org.apache.flink.api.common.functions.RichMapFunction
 * @see MapOperator
 */
public <R> MapOperator<T, R> map(MapFunction<T, R> mapper) {
  if (mapper == null) {
    throw new NullPointerException("Map function must not be null.");
  }
  String callLocation = Utils.getCallLocationName();
  TypeInformation<R> resultType = TypeExtractor.getMapReturnTypes(mapper, getType(), callLocation, true);
  return new MapOperator<>(this, resultType, clean(mapper), callLocation);
}

相关文章