/** * Constructor for a non-grouped reduce (all reduce). * * @param input The input data set to the groupReduce function. * @param function The user-defined GroupReduce function. */ public GroupReduceOperator(DataSet<IN> input, TypeInformation<OUT> resultType, GroupReduceFunction<IN, OUT> function, String defaultName) { super(input, resultType); this.function = function; this.grouper = null; this.defaultName = defaultName; this.combinable = checkCombinability(); }
public GroupReduceOperator<IN, OUT> setCombinable(boolean combinable) { if (combinable) { // sanity check that the function is a subclass of the combine interface if (!checkCombinability()) { throw new IllegalArgumentException("Either the function does not implement a combine interface, " + "or the types of the combine() and reduce() methods are not compatible."); } this.combinable = true; } else { this.combinable = false; } return this; }
/** * Constructor for a grouped reduce. * * @param input The grouped input to be processed group-wise by the groupReduce function. * @param function The user-defined GroupReduce function. */ public GroupReduceOperator(Grouping<IN> input, TypeInformation<OUT> resultType, GroupReduceFunction<IN, OUT> function, String defaultName) { super(input != null ? input.getInputDataSet() : null, resultType); this.function = function; this.grouper = input; this.defaultName = defaultName; this.combinable = checkCombinability(); UdfOperatorUtils.analyzeSingleInputUdf(this, GroupReduceFunction.class, defaultName, function, grouper.keys); }
/** * Constructor for a non-grouped reduce (all reduce). * * @param input The input data set to the groupReduce function. * @param function The user-defined GroupReduce function. */ public GroupReduceOperator(DataSet<IN> input, TypeInformation<OUT> resultType, GroupReduceFunction<IN, OUT> function, String defaultName) { super(input, resultType); this.function = function; this.grouper = null; this.defaultName = defaultName; this.combinable = checkCombinability(); }
/** * Constructor for a non-grouped reduce (all reduce). * * @param input The input data set to the groupReduce function. * @param function The user-defined GroupReduce function. */ public GroupReduceOperator(DataSet<IN> input, TypeInformation<OUT> resultType, GroupReduceFunction<IN, OUT> function, String defaultName) { super(input, resultType); this.function = function; this.grouper = null; this.defaultName = defaultName; this.combinable = checkCombinability(); }
public GroupReduceOperator<IN, OUT> setCombinable(boolean combinable) { if (combinable) { // sanity check that the function is a subclass of the combine interface if (!checkCombinability()) { throw new IllegalArgumentException("Either the function does not implement a combine interface, " + "or the types of the combine() and reduce() methods are not compatible."); } this.combinable = true; } else { this.combinable = false; } return this; }
public GroupReduceOperator<IN, OUT> setCombinable(boolean combinable) { if (combinable) { // sanity check that the function is a subclass of the combine interface if (!checkCombinability()) { throw new IllegalArgumentException("Either the function does not implement a combine interface, " + "or the types of the combine() and reduce() methods are not compatible."); } this.combinable = true; } else { this.combinable = false; } return this; }
/** * Constructor for a grouped reduce. * * @param input The grouped input to be processed group-wise by the groupReduce function. * @param function The user-defined GroupReduce function. */ public GroupReduceOperator(Grouping<IN> input, TypeInformation<OUT> resultType, GroupReduceFunction<IN, OUT> function, String defaultName) { super(input != null ? input.getInputDataSet() : null, resultType); this.function = function; this.grouper = input; this.defaultName = defaultName; this.combinable = checkCombinability(); UdfOperatorUtils.analyzeSingleInputUdf(this, GroupReduceFunction.class, defaultName, function, grouper.keys); }
/** * Constructor for a grouped reduce. * * @param input The grouped input to be processed group-wise by the groupReduce function. * @param function The user-defined GroupReduce function. */ public GroupReduceOperator(Grouping<IN> input, TypeInformation<OUT> resultType, GroupReduceFunction<IN, OUT> function, String defaultName) { super(input != null ? input.getInputDataSet() : null, resultType); this.function = function; this.grouper = input; this.defaultName = defaultName; this.combinable = checkCombinability(); UdfOperatorUtils.analyzeSingleInputUdf(this, GroupReduceFunction.class, defaultName, function, grouper.keys); }