FlatJoinFunction<String, String,Integer> > base = new InnerJoinOperatorBase(joiner, new BinaryOperatorInformation(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO), new int[0], new int[0], "TestJoiner"); ExecutionConfig executionConfig = new ExecutionConfig(); executionConfig.disableObjectReuse(); List<Integer> resultSafe = base.executeOnCollections(inputData1, inputData2, null, executionConfig); executionConfig.enableObjectReuse(); List<Integer> resultRegular = base.executeOnCollections(inputData1, inputData2, null, executionConfig);
/** * Creates a new JoinNode for the given join operator. * * @param joinOperatorBase The join operator object. */ public JoinNode(InnerJoinOperatorBase<?, ?, ?, ?> joinOperatorBase) { super(joinOperatorBase); this.dataProperties = getDataProperties(joinOperatorBase, joinOperatorBase.getJoinHint(), joinOperatorBase.getCustomPartitioner()); }
Configuration conf = joinOperatorBase.getParameters(); String localStrategy = conf.getString(Optimizer.HINT_LOCAL_STRATEGY, null);
FunctionUtils.openFunction(function, this.parameters); TypeInformation<IN1> leftInformation = getOperatorInfo().getFirstInputType(); TypeInformation<IN2> rightInformation = getOperatorInfo().getSecondInputType(); TypeInformation<OUT> outInformation = getOperatorInfo().getOutputType(); leftComparator = ((AtomicType<IN1>) leftInformation).createComparator(true, executionConfig); } else if (leftInformation instanceof CompositeType) { int[] keyPositions = getKeyColumns(0); boolean[] orders = new boolean[keyPositions.length]; Arrays.fill(orders, true); rightComparator = ((AtomicType<IN2>) rightInformation).createComparator(true, executionConfig); } else if (rightInformation instanceof CompositeType) { int[] keyPositions = getKeyColumns(1); boolean[] orders = new boolean[keyPositions.length]; Arrays.fill(orders, true);
private static JoinNode getJoinNode() { return new JoinNode(new InnerJoinOperatorBase<String, String, String, FlatJoinFunction<String, String, String>>(new DummyFlatJoinFunction<String>(), new BinaryOperatorInformation<String, String, String>(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO), new int[] {1}, new int[] {2}, "join op")); } }
@SuppressWarnings("unchecked") public JoinOperatorBase<?, ?, OUT, ?> build() { JoinOperatorBase<?, ?, OUT, ?> operator; if (joinType.isOuter()) { operator = new OuterJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name, getOuterJoinType()); } else { operator = new InnerJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name); } operator.setFirstInput(input1); operator.setSecondInput(input2); operator.setParallelism(parallelism); operator.setCustomPartitioner(partitioner); operator.setJoinHint(joinHint); return operator; }
FunctionUtils.openFunction(function, this.parameters); TypeInformation<IN1> leftInformation = getOperatorInfo().getFirstInputType(); TypeInformation<IN2> rightInformation = getOperatorInfo().getSecondInputType(); TypeInformation<OUT> outInformation = getOperatorInfo().getOutputType(); leftComparator = ((AtomicType<IN1>) leftInformation).createComparator(true, executionConfig); } else if (leftInformation instanceof CompositeType) { int[] keyPositions = getKeyColumns(0); boolean[] orders = new boolean[keyPositions.length]; Arrays.fill(orders, true); rightComparator = ((AtomicType<IN2>) rightInformation).createComparator(true, executionConfig); } else if (rightInformation instanceof CompositeType) { int[] keyPositions = getKeyColumns(1); boolean[] orders = new boolean[keyPositions.length]; Arrays.fill(orders, true);
/** * Creates a new JoinNode for the given join operator. * * @param joinOperatorBase The join operator object. */ public JoinNode(InnerJoinOperatorBase<?, ?, ?, ?> joinOperatorBase) { super(joinOperatorBase); this.dataProperties = getDataProperties(joinOperatorBase, joinOperatorBase.getJoinHint(), joinOperatorBase.getCustomPartitioner()); }
RichFlatJoinFunction<String, String, Integer>> base = new InnerJoinOperatorBase<String, String, Integer, RichFlatJoinFunction<String, String, Integer>>(joiner, new BinaryOperatorInformation<String, String, Integer>(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO, List<Integer> resultSafe = base.executeOnCollections(inputData1, inputData2, new RuntimeUDFContext(taskInfo, null, executionConfig, cpTasks, accumulatorMap, new UnregisteredMetricsGroup()), List<Integer> resultRegular = base.executeOnCollections(inputData1, inputData2, new RuntimeUDFContext(taskInfo, null, executionConfig, cpTasks, accumulatorMap, new UnregisteredMetricsGroup()),
@SuppressWarnings("unchecked") public JoinOperatorBase<?, ?, OUT, ?> build() { JoinOperatorBase<?, ?, OUT, ?> operator; if (joinType.isOuter()) { operator = new OuterJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name, getOuterJoinType()); } else { operator = new InnerJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name); } operator.setFirstInput(input1); operator.setSecondInput(input2); operator.setParallelism(parallelism); operator.setCustomPartitioner(partitioner); operator.setJoinHint(joinHint); return operator; }
Configuration conf = joinOperatorBase.getParameters(); String localStrategy = conf.getString(Optimizer.HINT_LOCAL_STRATEGY, null);
FunctionUtils.openFunction(function, this.parameters); TypeInformation<IN1> leftInformation = getOperatorInfo().getFirstInputType(); TypeInformation<IN2> rightInformation = getOperatorInfo().getSecondInputType(); TypeInformation<OUT> outInformation = getOperatorInfo().getOutputType(); leftComparator = ((AtomicType<IN1>) leftInformation).createComparator(true, executionConfig); } else if (leftInformation instanceof CompositeType) { int[] keyPositions = getKeyColumns(0); boolean[] orders = new boolean[keyPositions.length]; Arrays.fill(orders, true); rightComparator = ((AtomicType<IN2>) rightInformation).createComparator(true, executionConfig); } else if (rightInformation instanceof CompositeType) { int[] keyPositions = getKeyColumns(1); boolean[] orders = new boolean[keyPositions.length]; Arrays.fill(orders, true);
/** * Creates a new JoinNode for the given join operator. * * @param joinOperatorBase The join operator object. */ public JoinNode(InnerJoinOperatorBase<?, ?, ?, ?> joinOperatorBase) { super(joinOperatorBase); this.dataProperties = getDataProperties(joinOperatorBase, joinOperatorBase.getJoinHint(), joinOperatorBase.getCustomPartitioner()); }
String>, Tuple2<Double, String>>> base = new InnerJoinOperatorBase<Tuple3<String, Double, Integer>, Tuple2<Integer, String>, Tuple2<Double, String>, FlatJoinFunction<Tuple3<String, Double, Integer>, Tuple2<Integer, String>, Tuple2<Double, String>>>(joiner, binaryOpInfo, leftKeys, rightKeys, taskName); List<Tuple2<Double, String>> resultSafe = base.executeOnCollections(inputData1, inputData2, new RuntimeUDFContext(taskInfo, null, executionConfig, new HashMap<String, Future<Path>>(), List<Tuple2<Double, String>> resultRegular = base.executeOnCollections(inputData1, inputData2, new RuntimeUDFContext(taskInfo, null, executionConfig, new HashMap<String, Future<Path>>(),
@SuppressWarnings("unchecked") public JoinOperatorBase<?, ?, OUT, ?> build() { JoinOperatorBase<?, ?, OUT, ?> operator; if (joinType.isOuter()) { operator = new OuterJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name, getOuterJoinType()); } else { operator = new InnerJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name); } operator.setFirstInput(input1); operator.setSecondInput(input2); operator.setParallelism(parallelism); operator.setCustomPartitioner(partitioner); operator.setJoinHint(joinHint); return operator; }
Configuration conf = joinOperatorBase.getParameters(); String localStrategy = conf.getString(Optimizer.HINT_LOCAL_STRATEGY, null);
/** * Creates a new JoinNode for the given join operator. * * @param joinOperatorBase The join operator object. */ public JoinNode(InnerJoinOperatorBase<?, ?, ?, ?> joinOperatorBase) { super(joinOperatorBase); this.dataProperties = getDataProperties(joinOperatorBase, joinOperatorBase.getJoinHint(), joinOperatorBase.getCustomPartitioner()); }
Configuration conf = joinOperatorBase.getParameters(); String localStrategy = conf.getString(Optimizer.HINT_LOCAL_STRATEGY, null);
/** * Creates a new JoinNode for the given join operator. * * @param joinOperatorBase The join operator object. */ public JoinNode(InnerJoinOperatorBase<?, ?, ?, ?> joinOperatorBase) { super(joinOperatorBase); this.dataProperties = getDataProperties(joinOperatorBase, joinOperatorBase.getJoinHint(), joinOperatorBase.getCustomPartitioner()); }
Configuration conf = joinOperatorBase.getParameters(); String localStrategy = conf.getString(Optimizer.HINT_LOCAL_STRATEGY, null);