/** * Returns a new set containing the first n elements in this {@link DataSet}. * * @param n The desired number of elements. * @return A ReduceGroupOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
@Override public void combine(Iterable<T> values, Collector<T> out) throws Exception { reduce(values, out); }
/** * Returns a new set containing the first n elements in this grouped {@link DataSet}. * * @param n The desired number of elements for each group. * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
@Override public void combine(Iterable<T> values, Collector<T> out) throws Exception { reduce(values, out); }
/** * Returns a new set containing the first n elements in this grouped and sorted {@link DataSet}. * @param n The desired number of elements for each group. * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
@Override public void combine(Iterable<T> values, Collector<T> out) throws Exception { reduce(values, out); }
/** * Returns a new set containing the first n elements in this {@link DataSet}. * * @param n The desired number of elements. * @return A ReduceGroupOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
/** * Returns a new set containing the first n elements in this grouped {@link DataSet}. * * @param n The desired number of elements for each group. * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
/** * Returns a new set containing the first n elements in this grouped and sorted {@link DataSet}. * @param n The desired number of elements for each group. * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
/** * Returns a new set containing the first n elements in this grouped {@link DataSet}. * * @param n The desired number of elements for each group. * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
/** * Returns a new set containing the first n elements in this grouped and sorted {@link DataSet}. * @param n The desired number of elements for each group. * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }
/** * Returns a new set containing the first n elements in this {@link DataSet}. * * @param n The desired number of elements. * @return A ReduceGroupOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); }