@PublicEvolving public static <IN, OUT> TypeInformation<OUT> getGroupCombineReturnTypes(GroupCombineFunction<IN, OUT> combineInterface, TypeInformation<IN> inType) { return getGroupCombineReturnTypes(combineInterface, inType, null, false); }
/** * Applies a GroupCombineFunction on a non-grouped {@link 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } String callLocation = Utils.getCallLocationName(); TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, getType(), callLocation, true); return new GroupCombineOperator<>(this, resultType, clean(combiner), callLocation); }
/** * Applies a GroupCombineFunction on a grouped {@link 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getInputDataSet().getType(), Utils.getCallLocationName(), true); return new GroupCombineOperator<>(this, resultType, inputDataSet.clean(combiner), Utils.getCallLocationName()); }
/** * Applies a GroupCombineFunction on a grouped {@link DataSet}. * A GroupCombineFunction 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getInputDataSet().getType(), Utils.getCallLocationName(), true); return new GroupCombineOperator<T, R>(this, resultType, inputDataSet.clean(combiner), Utils.getCallLocationName()); }
@PublicEvolving public static <IN, OUT> TypeInformation<OUT> getGroupCombineReturnTypes(GroupCombineFunction<IN, OUT> combineInterface, TypeInformation<IN> inType) { return getGroupCombineReturnTypes(combineInterface, inType, null, false); }
@PublicEvolving public static <IN, OUT> TypeInformation<OUT> getGroupCombineReturnTypes(GroupCombineFunction<IN, OUT> combineInterface, TypeInformation<IN> inType) { return getGroupCombineReturnTypes(combineInterface, inType, null, false); }
/** * Applies a GroupCombineFunction on a non-grouped {@link 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } String callLocation = Utils.getCallLocationName(); TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, getType(), callLocation, true); return new GroupCombineOperator<>(this, resultType, clean(combiner), callLocation); }
/** * Applies a GroupCombineFunction on a non-grouped {@link 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } String callLocation = Utils.getCallLocationName(); TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, getType(), callLocation, true); return new GroupCombineOperator<>(this, resultType, clean(combiner), callLocation); }
/** * Applies a GroupCombineFunction on a grouped {@link DataSet}. * A GroupCombineFunction 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getInputDataSet().getType(), Utils.getCallLocationName(), true); return new GroupCombineOperator<T, R>(this, resultType, inputDataSet.clean(combiner), Utils.getCallLocationName()); }
/** * Applies a GroupCombineFunction on a grouped {@link 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getInputDataSet().getType(), Utils.getCallLocationName(), true); return new GroupCombineOperator<>(this, resultType, inputDataSet.clean(combiner), Utils.getCallLocationName()); }
/** * Applies a GroupCombineFunction on a grouped {@link 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getInputDataSet().getType(), Utils.getCallLocationName(), true); return new GroupCombineOperator<>(this, resultType, inputDataSet.clean(combiner), Utils.getCallLocationName()); }
/** * Applies a GroupCombineFunction on a grouped {@link DataSet}. * A GroupCombineFunction 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. * @param combiner The GroupCombineFunction that is applied on the DataSet. * @return A GroupCombineOperator which represents the combined DataSet. */ public <R> GroupCombineOperator<T, R> combineGroup(GroupCombineFunction<T, R> combiner) { if (combiner == null) { throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation<R> resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getInputDataSet().getType(), Utils.getCallLocationName(), true); return new GroupCombineOperator<T, R>(this, resultType, inputDataSet.clean(combiner), Utils.getCallLocationName()); }