Java Code Examples for org.apache.flink.api.common.operators.base.CrossOperatorBase.CrossHint#FIRST_IS_SMALL

The following examples show how to use org.apache.flink.api.common.operators.base.CrossOperatorBase.CrossHint#FIRST_IS_SMALL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataSet.java    From Flink-CEPplus with Apache License 2.0 2 votes vote down vote up
/**
 * Initiates a Cross transformation.
 *
 * <p>A Cross transformation combines the elements of two
 *   {@link DataSet DataSets} into one DataSet. It builds all pair combinations of elements of
 *   both DataSets, i.e., it builds a Cartesian product.
 * This method also gives the hint to the optimizer that the second DataSet to cross is much
 *   larger than the first one.
 *
 *
 * <p>The resulting {@link org.apache.flink.api.java.operators.CrossOperator.DefaultCross} wraps each pair of crossed elements into a {@link Tuple2}, with
 * the element of the first input being the first field of the tuple and the element of the
 * second input being the second field of the tuple.
 *
 *
 * <p>Call {@link org.apache.flink.api.java.operators.CrossOperator.DefaultCross#with(org.apache.flink.api.common.functions.CrossFunction)} to define a
 * {@link org.apache.flink.api.common.functions.CrossFunction} which is called for
 * each pair of crossed elements. The CrossFunction returns a exactly one element for each pair of input elements.
 *
 * @param other The other DataSet with which this DataSet is crossed.
 * @return A DefaultCross that returns a Tuple2 for each pair of crossed elements.
 *
 * @see org.apache.flink.api.java.operators.CrossOperator.DefaultCross
 * @see org.apache.flink.api.common.functions.CrossFunction
 * @see DataSet
 * @see Tuple2
 */
public <R> CrossOperator.DefaultCross<T, R> crossWithHuge(DataSet<R> other) {
	return new CrossOperator.DefaultCross<>(this, other, CrossHint.FIRST_IS_SMALL, Utils.getCallLocationName());
}
 
Example 2
Source File: DataSet.java    From flink with Apache License 2.0 2 votes vote down vote up
/**
 * Initiates a Cross transformation.
 *
 * <p>A Cross transformation combines the elements of two
 *   {@link DataSet DataSets} into one DataSet. It builds all pair combinations of elements of
 *   both DataSets, i.e., it builds a Cartesian product.
 * This method also gives the hint to the optimizer that the second DataSet to cross is much
 *   larger than the first one.
 *
 *
 * <p>The resulting {@link org.apache.flink.api.java.operators.CrossOperator.DefaultCross} wraps each pair of crossed elements into a {@link Tuple2}, with
 * the element of the first input being the first field of the tuple and the element of the
 * second input being the second field of the tuple.
 *
 *
 * <p>Call {@link org.apache.flink.api.java.operators.CrossOperator.DefaultCross#with(org.apache.flink.api.common.functions.CrossFunction)} to define a
 * {@link org.apache.flink.api.common.functions.CrossFunction} which is called for
 * each pair of crossed elements. The CrossFunction returns a exactly one element for each pair of input elements.
 *
 * @param other The other DataSet with which this DataSet is crossed.
 * @return A DefaultCross that returns a Tuple2 for each pair of crossed elements.
 *
 * @see org.apache.flink.api.java.operators.CrossOperator.DefaultCross
 * @see org.apache.flink.api.common.functions.CrossFunction
 * @see DataSet
 * @see Tuple2
 */
public <R> CrossOperator.DefaultCross<T, R> crossWithHuge(DataSet<R> other) {
	return new CrossOperator.DefaultCross<>(this, other, CrossHint.FIRST_IS_SMALL, Utils.getCallLocationName());
}
 
Example 3
Source File: DataSet.java    From flink with Apache License 2.0 2 votes vote down vote up
/**
 * Initiates a Cross transformation.
 *
 * <p>A Cross transformation combines the elements of two
 *   {@link DataSet DataSets} into one DataSet. It builds all pair combinations of elements of
 *   both DataSets, i.e., it builds a Cartesian product.
 * This method also gives the hint to the optimizer that the second DataSet to cross is much
 *   larger than the first one.
 *
 *
 * <p>The resulting {@link org.apache.flink.api.java.operators.CrossOperator.DefaultCross} wraps each pair of crossed elements into a {@link Tuple2}, with
 * the element of the first input being the first field of the tuple and the element of the
 * second input being the second field of the tuple.
 *
 *
 * <p>Call {@link org.apache.flink.api.java.operators.CrossOperator.DefaultCross#with(org.apache.flink.api.common.functions.CrossFunction)} to define a
 * {@link org.apache.flink.api.common.functions.CrossFunction} which is called for
 * each pair of crossed elements. The CrossFunction returns a exactly one element for each pair of input elements.
 *
 * @param other The other DataSet with which this DataSet is crossed.
 * @return A DefaultCross that returns a Tuple2 for each pair of crossed elements.
 *
 * @see org.apache.flink.api.java.operators.CrossOperator.DefaultCross
 * @see org.apache.flink.api.common.functions.CrossFunction
 * @see DataSet
 * @see Tuple2
 */
public <R> CrossOperator.DefaultCross<T, R> crossWithHuge(DataSet<R> other) {
	return new CrossOperator.DefaultCross<>(this, other, CrossHint.FIRST_IS_SMALL, Utils.getCallLocationName());
}