From 407cd1895f54391fa98f60ce9e39de0c331b4305 Mon Sep 17 00:00:00 2001 From: Gabor Gevay Date: Sun, 4 Oct 2015 20:29:40 +0200 Subject: [PATCH] [FLINK-2818] [runtime] Corrected javadocs of *ReduceDriver classes and some methods in the API. --- .../operators/base/GroupCombineOperatorBase.java | 2 +- .../java/org/apache/flink/api/java/DataSet.java | 8 ++++---- .../flink/api/java/operators/SortedGrouping.java | 10 +++++----- .../api/java/operators/UnsortedGrouping.java | 12 ++++++------ .../runtime/operators/AllGroupReduceDriver.java | 6 +++--- .../flink/runtime/operators/AllReduceDriver.java | 4 ++-- .../operators/GroupReduceCombineDriver.java | 2 +- .../runtime/operators/GroupReduceDriver.java | 2 +- .../flink/runtime/operators/ReduceDriver.java | 6 +++--- .../chaining/GroupCombineChainedDriver.java | 2 +- .../org/apache/flink/api/scala/DataSet.scala | 16 ++++++++-------- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/flink-core/src/main/java/org/apache/flink/api/common/operators/base/GroupCombineOperatorBase.java b/flink-core/src/main/java/org/apache/flink/api/common/operators/base/GroupCombineOperatorBase.java index c7ba92b70b0b4b..549e311e768916 100644 --- a/flink-core/src/main/java/org/apache/flink/api/common/operators/base/GroupCombineOperatorBase.java +++ b/flink-core/src/main/java/org/apache/flink/api/common/operators/base/GroupCombineOperatorBase.java @@ -43,7 +43,7 @@ import java.util.List; /** - * Base operator for the combineGroup transformation. It receives the UDF GroupCombineOperator as an input. + * Base operator for the combineGroup transformation. It receives the UDF GroupCombineFunction as an input. * This class is later processed by the compiler to generate the plan. * @see org.apache.flink.api.common.functions.CombineFunction */ diff --git a/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java b/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java index 98a94c6426a218..ef76b222ab37bb 100644 --- a/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java +++ b/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java @@ -465,7 +465,7 @@ public GroupReduceOperator reduceGroup(GroupReduceFunction reduc } /** - * Applies a CombineFunction on a non-grouped {@link DataSet}. + * 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 @@ -473,12 +473,12 @@ public GroupReduceOperator reduceGroup(GroupReduceFunction reduc * 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 CombineFunction that is applied on the DataSet. - * @return A GroupCombineOperator which represents the combined DataSet. + * @param combiner The GroupCombineFunction that is applied on the DataSet. + * @return A {@link GroupCombineOperator} which represents the combined DataSet. */ public GroupCombineOperator combineGroup(GroupCombineFunction combiner) { if (combiner == null) { - throw new NullPointerException("GroupReduce function must not be null."); + throw new NullPointerException("GroupCombine function must not be null."); } String callLocation = Utils.getCallLocationName(); diff --git a/flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java b/flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java index 4c6c952082458b..6f42d3a60a12f5 100644 --- a/flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java +++ b/flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java @@ -167,7 +167,7 @@ public GroupReduceOperator reduceGroup(GroupReduceFunction reduc } /** - * Applies a CombineFunction on a grouped {@link DataSet}. + * 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 @@ -175,12 +175,12 @@ public GroupReduceOperator reduceGroup(GroupReduceFunction reduc * 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 CombineFunction that is applied on the DataSet. - * @return A GroupCombineOperator which represents the combined DataSet. + * @param combiner The GroupCombineFunction that is applied on the DataSet. + * @return A {@link GroupCombineOperator} which represents the combined DataSet. */ public GroupCombineOperator combineGroup(GroupCombineFunction combiner) { if (combiner == null) { - throw new NullPointerException("GroupReduce function must not be null."); + throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getDataSet().getType()); @@ -191,7 +191,7 @@ public GroupCombineOperator combineGroup(GroupCombineFunction co /** * 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 ReduceGroupOperator that represents the DataSet containing the elements. + * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator first(int n) { if(n < 1) { diff --git a/flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java b/flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java index 319a599f000b69..72591f310be26d 100644 --- a/flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java +++ b/flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java @@ -162,20 +162,20 @@ public GroupReduceOperator reduceGroup(GroupReduceFunction reduc } /** - * Applies a CombineFunction on a grouped {@link DataSet}. - * A CombineFunction is similar to a GroupReduceFunction but does not perform a full data exchange. Instead, the + * 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 CombineFunction that is applied on the DataSet. - * @return A GroupCombineOperator which represents the combined DataSet. + * @param combiner The GroupCombineFunction that is applied on the DataSet. + * @return A {@link GroupCombineOperator} which represents the combined DataSet. */ public GroupCombineOperator combineGroup(GroupCombineFunction combiner) { if (combiner == null) { - throw new NullPointerException("GroupReduce function must not be null."); + throw new NullPointerException("GroupCombine function must not be null."); } TypeInformation resultType = TypeExtractor.getGroupCombineReturnTypes(combiner, this.getDataSet().getType()); @@ -185,7 +185,7 @@ public GroupCombineOperator combineGroup(GroupCombineFunction co /** * 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 ReduceGroupOperator that represents the DataSet containing the elements. + * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator first(int n) { if(n < 1) { diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllGroupReduceDriver.java b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllGroupReduceDriver.java index a20fddf02f811e..fc01605c2e0a1f 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllGroupReduceDriver.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllGroupReduceDriver.java @@ -34,14 +34,14 @@ /** * GroupReduceDriver task which is executed by a Task Manager. The task has a * single input and one or multiple outputs. It is provided with a GroupReduceFunction - * implementation or a RichGroupFunction. This Driver performs + * implementation or a RichGroupReduceFunction. This Driver performs * multiple tasks depending on the DriverStrategy. In case of a ALL_GROUP_REDUCE_COMBINE * it uses the combine function of the supplied user function. In case * of the ALL_GROUP_REDUCE, it uses the reduce function of the supplied user function to * process all elements. In either case, the function is executed on all elements. *

- * The GroupReduceTask creates a iterator over all records from its input. The iterator returns all records grouped by their - * key. The iterator is handed to the reduce() method of the GroupReduceFunction. + * The AllGroupReduceDriver creates an iterator over all records from its input. + * The iterator is handed to the reduce() method of the GroupReduceFunction. * * @see org.apache.flink.api.common.functions.GroupReduceFunction */ diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllReduceDriver.java b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllReduceDriver.java index 1f58c1b024418f..2f97af9f838f66 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllReduceDriver.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllReduceDriver.java @@ -33,8 +33,8 @@ * single input and one or multiple outputs. It is provided with a ReduceFunction * implementation. *

- * The ReduceTask creates a iterator over all records from its input. The iterator returns all records grouped by their - * key. The iterator is handed to the reduce() method of the ReduceFunction. + * The AllReduceDriver creates an iterator over all records from its input. + * The elements are handed pairwise to the reduce() method of the ReduceFunction. * * @see org.apache.flink.api.common.functions.ReduceFunction */ diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceCombineDriver.java b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceCombineDriver.java index c6a872cbe4e7a8..9006b896160d1b 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceCombineDriver.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceCombineDriver.java @@ -50,7 +50,7 @@ * to have the same input and output type to be able to reduce the elements after the combine from * {@code IN} to {@code OUT}. * - *

The CombineTask uses a combining iterator over its input. The output of the iterator is emitted.

+ *

The GroupReduceCombineDriver uses a combining iterator over its input. The output of the iterator is emitted.

* * @param The data type consumed by the combiner. * @param The data type produced by the combiner. diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceDriver.java b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceDriver.java index 59fb60366534e4..58baa6640dcf2f 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceDriver.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/GroupReduceDriver.java @@ -35,7 +35,7 @@ * single input and one or multiple outputs. It is provided with a GroupReduceFunction * implementation. *

- * The GroupReduceTask creates a iterator over all records from its input. The iterator returns all records grouped by their + * The GroupReduceDriver creates a iterator over all records from its input. The iterator returns all records grouped by their * key. The iterator is handed to the reduce() method of the GroupReduceFunction. * * @see org.apache.flink.api.common.functions.GroupReduceFunction diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/ReduceDriver.java b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/ReduceDriver.java index 8d15ef273dbec8..20a103f53d5fa8 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/ReduceDriver.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/ReduceDriver.java @@ -30,12 +30,12 @@ import org.apache.flink.util.MutableObjectIterator; /** - * Reduce task which is executed by a Task Manager. The task has a + * Reduce driver which is executed by a Task Manager. The task has a * single input and one or multiple outputs. It is provided with a ReduceFunction * implementation. *

- * The ReduceTask creates a iterator over all records from its input. The iterator returns all records grouped by their - * key. The iterator is handed to the reduce() method of the ReduceFunction. + * The ReduceDriver creates an iterator over all records from its input. The iterator returns all records grouped by their + * key. The elements are handed pairwise to the reduce() method of the ReduceFunction. * * @see org.apache.flink.api.common.functions.ReduceFunction */ diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/chaining/GroupCombineChainedDriver.java b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/chaining/GroupCombineChainedDriver.java index cf0fc853c1962e..0ff9497e94008d 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/chaining/GroupCombineChainedDriver.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/chaining/GroupCombineChainedDriver.java @@ -44,7 +44,7 @@ import java.util.List; /** - * Chained variant of the GroupCombineDriver + * Chained variant of the GroupReduceCombineDriver * * Acts like a combiner with a custom output type OUT. * diff --git a/flink-scala/src/main/scala/org/apache/flink/api/scala/DataSet.scala b/flink-scala/src/main/scala/org/apache/flink/api/scala/DataSet.scala index 207bc5d47c3479..22850b9ac07243 100644 --- a/flink-scala/src/main/scala/org/apache/flink/api/scala/DataSet.scala +++ b/flink-scala/src/main/scala/org/apache/flink/api/scala/DataSet.scala @@ -641,9 +641,9 @@ class DataSet[T: ClassTag](set: JavaDataSet[T]) { } /** - * Applies a CombineFunction on a grouped [[DataSet]]. A - * CombineFunction is similar to a GroupReduceFunction but does not - * perform a full data exchange. Instead, the CombineFunction calls + * Applies a GroupCombineFunction on a grouped [[DataSet]]. A + * GroupCombineFunction is similar to a GroupReduceFunction but does not + * perform a full data exchange. Instead, the GroupCombineFunction 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 @@ -651,7 +651,7 @@ class DataSet[T: ClassTag](set: JavaDataSet[T]) { * 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 + * the same. The GroupCombineFunction, on the other side, can have an * arbitrary output type. */ def combineGroup[R: TypeInformation: ClassTag]( @@ -666,9 +666,9 @@ class DataSet[T: ClassTag](set: JavaDataSet[T]) { } /** - * Applies a CombineFunction on a grouped [[DataSet]]. A - * CombineFunction is similar to a GroupReduceFunction but does not - * perform a full data exchange. Instead, the CombineFunction calls + * Applies a GroupCombineFunction on a grouped [[DataSet]]. A + * GroupCombineFunction is similar to a GroupReduceFunction but does not + * perform a full data exchange. Instead, the GroupCombineFunction 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 @@ -676,7 +676,7 @@ class DataSet[T: ClassTag](set: JavaDataSet[T]) { * 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 + * the same. The GroupCombineFunction, on the other side, can have an * arbitrary output type. */ def combineGroup[R: TypeInformation: ClassTag](