IN1- The type of the elements in the first input.
IN2- The type of the elements in the second input.
OUT- The type of the result elements.
@Public @FunctionalInterface public interface CrossFunction<IN1,IN2,OUT> extends Function, Serializable
They are optional, a means of convenience that can be used to directly manipulate the pair of elements instead of producing 2-tuples containing the pairs.
The basic syntax for using Cross on two data sets is as follows:
DataSet<X> set1 = ...; DataSet<Y> set2 = ...; set1.cross(set2).with(new MyCrossFunction());
set1 is here considered the first input,
set2 the second input.
val1- Element from first input.
val2- Element from the second input.
Exception- The function may throw Exceptions, which will cause the program to cancel, and may trigger the recovery logic.
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.