Class AssignRangeIndex<IN>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.RichMapPartitionFunction<IN,org.apache.flink.api.java.tuple.Tuple2<Integer,IN>>
-
- org.apache.flink.runtime.operators.udf.AssignRangeIndex<IN>
-
- Type Parameters:
IN
- The original data type.
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.functions.Function
,org.apache.flink.api.common.functions.MapPartitionFunction<IN,org.apache.flink.api.java.tuple.Tuple2<Integer,IN>>
,org.apache.flink.api.common.functions.RichFunction
public class AssignRangeIndex<IN> extends org.apache.flink.api.common.functions.RichMapPartitionFunction<IN,org.apache.flink.api.java.tuple.Tuple2<Integer,IN>>
This mapPartition function require a DataSet with RangeBoundaries as broadcast input, it generate Tuple2 which includes range index and record itself as output.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AssignRangeIndex(org.apache.flink.api.common.typeutils.TypeComparatorFactory<IN> typeComparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mapPartition(Iterable<IN> values, org.apache.flink.util.Collector<org.apache.flink.api.java.tuple.Tuple2<Integer,IN>> out)
-
-
-
Constructor Detail
-
AssignRangeIndex
public AssignRangeIndex(org.apache.flink.api.common.typeutils.TypeComparatorFactory<IN> typeComparator)
-
-
Method Detail
-
mapPartition
public void mapPartition(Iterable<IN> values, org.apache.flink.util.Collector<org.apache.flink.api.java.tuple.Tuple2<Integer,IN>> out) throws Exception
- Specified by:
mapPartition
in interfaceorg.apache.flink.api.common.functions.MapPartitionFunction<IN,org.apache.flink.api.java.tuple.Tuple2<Integer,IN>>
- Specified by:
mapPartition
in classorg.apache.flink.api.common.functions.RichMapPartitionFunction<IN,org.apache.flink.api.java.tuple.Tuple2<Integer,IN>>
- Throws:
Exception
-
-