I1
- The type of the first input DataSet of the Cross transformation.I2
- The type of the second input DataSet of the Cross transformation.@Public public static final class CrossOperator.DefaultCross<I1,I2> extends CrossOperator<I1,I2,Tuple2<I1,I2>>
CrossOperator.CrossProjection<I1,I2>, CrossOperator.DefaultCross<I1,I2>, CrossOperator.ProjectCross<I1,I2,OUT extends Tuple>, CrossOperator.ProjectCrossFunction<T1,T2,R extends Tuple>
minResources, name, parallelism, preferredResources
Constructor and Description |
---|
DefaultCross(DataSet<I1> input1,
DataSet<I2> input2,
CrossOperatorBase.CrossHint hint,
String defaultName) |
Modifier and Type | Method and Description |
---|---|
<OUT extends Tuple> |
projectFirst(int... firstFieldIndexes)
Initiates a ProjectCross transformation and projects the first cross input.
|
<OUT extends Tuple> |
projectSecond(int... secondFieldIndexes)
Initiates a ProjectCross transformation and projects the second cross input.
|
<R> CrossOperator<I1,I2,R> |
with(CrossFunction<I1,I2,R> function)
Finalizes a Cross transformation by applying a
CrossFunction to each pair of
crossed elements. |
getCrossHint, getFunction, translateToDataFlow
extractSemanticAnnotationsFromUdf, getAnalyzedUdfSemanticsFlag, getBroadcastSets, getParameters, getSemanticProperties, returns, returns, returns, setAnalyzedUdfSemanticsFlag, setSemanticProperties, udfWithForwardedFieldsFirstAnnotation, udfWithForwardedFieldsSecondAnnotation, withBroadcastSet, withForwardedFieldsFirst, withForwardedFieldsSecond, withParameters
getInput1, getInput1Type, getInput2, getInput2Type
getMinResources, getName, getParallelism, getPreferredResources, getResultType, name, setParallelism
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
public <R> CrossOperator<I1,I2,R> with(CrossFunction<I1,I2,R> function)
CrossFunction
to each pair of
crossed elements.
Each CrossFunction call returns exactly one element.
function
- The CrossFunction that is called for each pair of crossed elements.CrossFunction
,
DataSet
public <OUT extends Tuple> CrossOperator.ProjectCross<I1,I2,OUT> projectFirst(int... firstFieldIndexes)
If the first cross input is a Tuple
DataSet
, 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...)
and
CrossOperator.ProjectCross.projectSecond(int...)
.
Note: With the current implementation, the Project transformation loses type information.
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.Tuple
,
DataSet
,
CrossOperator.ProjectCross
public <OUT extends Tuple> CrossOperator.ProjectCross<I1,I2,OUT> projectSecond(int... secondFieldIndexes)
If the second cross input is a Tuple
DataSet
, 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...)
and
CrossOperator.ProjectCross.projectSecond(int...)
.
Note: With the current implementation, the Project transformation loses type information.
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.Tuple
,
DataSet
,
CrossOperator.ProjectCross
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.