Class JoinOperator.DefaultJoin<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,JoinOperator<I1,I2,OUT>>
-
- org.apache.flink.api.java.operators.JoinOperator<I1,I2,OUT>
-
- org.apache.flink.api.java.operators.JoinOperator.EquiJoin<I1,I2,org.apache.flink.api.java.tuple.Tuple2<I1,I2>>
-
- org.apache.flink.api.java.operators.JoinOperator.DefaultJoin<I1,I2>
-
- Type Parameters:
I1- The type of the first input DataSet of the Join transformation.I2- The type of the second input DataSet of the Join transformation.
- All Implemented Interfaces:
JoinFunctionAssigner<I1,I2>,UdfOperator<JoinOperator<I1,I2,org.apache.flink.api.java.tuple.Tuple2<I1,I2>>>
- Enclosing class:
- JoinOperator<I1,I2,OUT>
@Public public static final class JoinOperator.DefaultJoin<I1,I2> extends JoinOperator.EquiJoin<I1,I2,org.apache.flink.api.java.tuple.Tuple2<I1,I2>> implements JoinFunctionAssigner<I1,I2>
A Join transformation that wraps pairs of joining elements intoTuple2.It also represents the
DataSetthat is the result of a Join transformation.- See Also:
Tuple2,DataSet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJoinOperator.DefaultJoin.WrappingFlatJoinFunction<IN1,IN2,OUT>Wrapper aroundJoinFunction.-
Nested classes/interfaces inherited from class org.apache.flink.api.java.operators.JoinOperator
JoinOperator.DefaultJoin<I1,I2>, JoinOperator.EquiJoin<I1,I2,OUT>, JoinOperator.JoinOperatorSets<I1,I2>, JoinOperator.ProjectJoin<I1,I2,OUT extends org.apache.flink.api.java.tuple.Tuple>
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.java.operators.JoinOperator
joinType, keys1, keys2
-
Fields inherited from class org.apache.flink.api.java.operators.Operator
minResources, name, parallelism, preferredResources
-
-
Constructor Summary
Constructors Constructor Description DefaultJoin(DataSet<I1> input1, DataSet<I2> input2, org.apache.flink.api.common.operators.Keys<I1> keys1, org.apache.flink.api.common.operators.Keys<I2> keys2, org.apache.flink.api.common.operators.base.JoinOperatorBase.JoinHint hint, String joinLocationName, JoinType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <OUT extends org.apache.flink.api.java.tuple.Tuple>
JoinOperator.ProjectJoin<I1,I2,OUT>projectFirst(int... firstFieldIndexes)Applies a ProjectJoin transformation and projects the first join input<OUT extends org.apache.flink.api.java.tuple.Tuple>
JoinOperator.ProjectJoin<I1,I2,OUT>projectSecond(int... secondFieldIndexes)Applies a ProjectJoin transformation and projects the second join input<R> JoinOperator.EquiJoin<I1,I2,R>with(org.apache.flink.api.common.functions.FlatJoinFunction<I1,I2,R> function)Finalizes a Join transformation by applying aRichFlatJoinFunctionto each pair of joined elements.<R> JoinOperator.EquiJoin<I1,I2,R>with(org.apache.flink.api.common.functions.JoinFunction<I1,I2,R> function)-
Methods inherited from class org.apache.flink.api.java.operators.JoinOperator.EquiJoin
extractSemanticAnnotationsFromUdf, getFunction, getSemanticProperties, translateToDataFlow, udfWithForwardedFieldsFirstAnnotation, udfWithForwardedFieldsSecondAnnotation
-
Methods inherited from class org.apache.flink.api.java.operators.JoinOperator
getJoinHint, getJoinType, getKeys1, getKeys2, getPartitioner, withPartitioner
-
Methods inherited from class org.apache.flink.api.java.operators.TwoInputUdfOperator
getAnalyzedUdfSemanticsFlag, getBroadcastSets, getParameters, returns, returns, returns, setAnalyzedUdfSemanticsFlag, setSemanticProperties, 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> JoinOperator.EquiJoin<I1,I2,R> with(org.apache.flink.api.common.functions.FlatJoinFunction<I1,I2,R> function)
Finalizes a Join transformation by applying aRichFlatJoinFunctionto each pair of joined elements.Each JoinFunction call returns exactly one element.
- Specified by:
within interfaceJoinFunctionAssigner<I1,I2>- Parameters:
function- The JoinFunction that is called for each pair of joined elements.- Returns:
- An EquiJoin that represents the joined result DataSet
- See Also:
RichFlatJoinFunction,JoinOperator.EquiJoin,DataSet
-
with
public <R> JoinOperator.EquiJoin<I1,I2,R> with(org.apache.flink.api.common.functions.JoinFunction<I1,I2,R> function)
- Specified by:
within interfaceJoinFunctionAssigner<I1,I2>
-
projectFirst
public <OUT extends org.apache.flink.api.java.tuple.Tuple> JoinOperator.ProjectJoin<I1,I2,OUT> projectFirst(int... firstFieldIndexes)
Applies a ProjectJoin transformation and projects the first join inputIf the first join input is a
TupleDataSet, fields can be selected by their index. If the first join 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
JoinOperator.ProjectJoin.projectFirst(int...)andJoinOperator.ProjectJoin.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 ProjectJoin which represents the projected join result.
- See Also:
Tuple,DataSet,JoinOperator.ProjectJoin
-
projectSecond
public <OUT extends org.apache.flink.api.java.tuple.Tuple> JoinOperator.ProjectJoin<I1,I2,OUT> projectSecond(int... secondFieldIndexes)
Applies a ProjectJoin transformation and projects the second join inputIf the second join input is a
TupleDataSet, fields can be selected by their index. If the second join 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
JoinOperator.ProjectJoin.projectFirst(int...)andJoinOperator.ProjectJoin.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 ProjectJoin which represents the projected join result.
- See Also:
Tuple,DataSet,JoinOperator.ProjectJoin
-
-