Class CrossOperator.DefaultCross<I1,I2>
- java.lang.Object
-
- org.apache.flink.api.java.DataSet<OUT>
-
- org.apache.flink.api.java.operators.Operator<OUT,O>
-
- org.apache.flink.api.java.operators.TwoInputOperator<IN1,IN2,OUT,O>
-
- org.apache.flink.api.java.operators.TwoInputUdfOperator<I1,I2,OUT,CrossOperator<I1,I2,OUT>>
-
- org.apache.flink.api.java.operators.CrossOperator<I1,I2,org.apache.flink.api.java.tuple.Tuple2<I1,I2>>
-
- org.apache.flink.api.java.operators.CrossOperator.DefaultCross<I1,I2>
-
- Type Parameters:
I1- The type of the first input DataSet of the Cross transformation.I2- The type of the second input DataSet of the Cross transformation.
- All Implemented Interfaces:
UdfOperator<CrossOperator<I1,I2,org.apache.flink.api.java.tuple.Tuple2<I1,I2>>>
- Enclosing class:
- CrossOperator<I1,I2,OUT>
@Public public static final class CrossOperator.DefaultCross<I1,I2> extends CrossOperator<I1,I2,org.apache.flink.api.java.tuple.Tuple2<I1,I2>>
A Cross transformation that wraps pairs of crossed elements intoTuple2.It also represents the
DataSetthat is the result of a Cross transformation.- See Also:
Tuple2,DataSet
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.api.java.operators.CrossOperator
CrossOperator.CrossProjection<I1,I2>, CrossOperator.DefaultCross<I1,I2>, CrossOperator.ProjectCross<I1,I2,OUT extends org.apache.flink.api.java.tuple.Tuple>, CrossOperator.ProjectCrossFunction<T1,T2,R extends org.apache.flink.api.java.tuple.Tuple>
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.java.operators.Operator
minResources, name, parallelism, preferredResources
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <OUT extends org.apache.flink.api.java.tuple.Tuple>
CrossOperator.ProjectCross<I1,I2,OUT>projectFirst(int... firstFieldIndexes)Initiates a ProjectCross transformation and projects the first cross input.<OUT extends org.apache.flink.api.java.tuple.Tuple>
CrossOperator.ProjectCross<I1,I2,OUT>projectSecond(int... secondFieldIndexes)Initiates a ProjectCross transformation and projects the second cross input.<R> CrossOperator<I1,I2,R>with(org.apache.flink.api.common.functions.CrossFunction<I1,I2,R> function)Finalizes a Cross transformation by applying aCrossFunctionto each pair of crossed elements.-
Methods inherited from class org.apache.flink.api.java.operators.CrossOperator
getCrossHint, getFunction, translateToDataFlow
-
Methods inherited from class org.apache.flink.api.java.operators.TwoInputUdfOperator
extractSemanticAnnotationsFromUdf, getAnalyzedUdfSemanticsFlag, getBroadcastSets, getParameters, getSemanticProperties, returns, returns, returns, setAnalyzedUdfSemanticsFlag, setSemanticProperties, udfWithForwardedFieldsFirstAnnotation, udfWithForwardedFieldsSecondAnnotation, withBroadcastSet, withForwardedFieldsFirst, withForwardedFieldsSecond, withParameters
-
Methods inherited from class org.apache.flink.api.java.operators.TwoInputOperator
getInput1, getInput1Type, getInput2, getInput2Type
-
Methods inherited from class org.apache.flink.api.java.operators.Operator
getMinResources, getName, getParallelism, getPreferredResources, getResultType, name, setParallelism
-
Methods inherited from class org.apache.flink.api.java.DataSet
aggregate, checkSameExecutionContext, clean, coGroup, collect, combineGroup, count, cross, crossWithHuge, crossWithTiny, distinct, distinct, distinct, distinct, fillInType, filter, first, flatMap, fullOuterJoin, fullOuterJoin, getExecutionEnvironment, getType, groupBy, groupBy, groupBy, iterate, iterateDelta, join, join, joinWithHuge, joinWithTiny, leftOuterJoin, leftOuterJoin, map, mapPartition, max, maxBy, min, minBy, output, partitionByHash, partitionByHash, partitionByHash, partitionByRange, partitionByRange, partitionByRange, partitionCustom, partitionCustom, partitionCustom, print, print, printOnTaskManager, printToErr, printToErr, project, rebalance, reduce, reduceGroup, rightOuterJoin, rightOuterJoin, runOperation, sortPartition, sortPartition, sortPartition, sum, union, write, write, writeAsCsv, writeAsCsv, writeAsCsv, writeAsCsv, writeAsFormattedText, writeAsFormattedText, writeAsText, writeAsText
-
-
-
-
Method Detail
-
with
public <R> CrossOperator<I1,I2,R> with(org.apache.flink.api.common.functions.CrossFunction<I1,I2,R> function)
Finalizes a Cross transformation by applying aCrossFunctionto each pair of crossed elements.Each CrossFunction call returns exactly one element.
- Parameters:
function- The CrossFunction that is called for each pair of crossed elements.- Returns:
- An CrossOperator that represents the crossed result DataSet
- See Also:
CrossFunction,DataSet
-
projectFirst
public <OUT extends org.apache.flink.api.java.tuple.Tuple> CrossOperator.ProjectCross<I1,I2,OUT> projectFirst(int... firstFieldIndexes)
Initiates a ProjectCross transformation and projects the first cross input.If the first cross input is a
TupleDataSet, fields can be selected by their index. If the first cross input is not a Tuple DataSet, no parameters should be passed.Fields of the first and second input can be added by chaining the method calls of
CrossOperator.ProjectCross.projectFirst(int...)andCrossOperator.ProjectCross.projectSecond(int...).Note: With the current implementation, the Project transformation loses type information.
- Parameters:
firstFieldIndexes- If the first input is a Tuple DataSet, the indexes of the selected fields. For a non-Tuple DataSet, do not provide parameters. The order of fields in the output tuple is defined by to the order of field indexes.- Returns:
- A ProjectCross which represents the projected cross result.
- See Also:
Tuple,DataSet,CrossOperator.ProjectCross
-
projectSecond
public <OUT extends org.apache.flink.api.java.tuple.Tuple> CrossOperator.ProjectCross<I1,I2,OUT> projectSecond(int... secondFieldIndexes)
Initiates a ProjectCross transformation and projects the second cross input.If the second cross input is a
TupleDataSet, fields can be selected by their index. If the second cross input is not a Tuple DataSet, no parameters should be passed.Fields of the first and second input can be added by chaining the method calls of
CrossOperator.ProjectCross.projectFirst(int...)andCrossOperator.ProjectCross.projectSecond(int...).Note: With the current implementation, the Project transformation loses type information.
- Parameters:
secondFieldIndexes- If the second input is a Tuple DataSet, the indexes of the selected fields. For a non-Tuple DataSet, do not provide parameters. The order of fields in the output tuple is defined by to the order of field indexes.- Returns:
- A ProjectCross which represents the projected cross result.
- See Also:
Tuple,DataSet,CrossOperator.ProjectCross
-
-