public class FlatJoinRunner<IN1,IN2,OUT> extends RichFlatJoinFunction<IN1,IN2,OUT> implements ResultTypeQueryable<OUT>, Compiler<FlatJoinFunction<IN1,IN2,OUT>>, Logging
Constructor and Description |
---|
FlatJoinRunner(String name,
String code,
TypeInformation<OUT> returnType) |
Modifier and Type | Method and Description |
---|---|
TypeInformation<OUT> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
void |
join(IN1 first,
IN2 second,
Collector<OUT> out)
The join method, called once per joined pair of elements.
|
void |
open(Configuration parameters)
Initialization method for the function.
|
TypeInformation<OUT> |
returnType() |
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public FlatJoinRunner(String name, String code, TypeInformation<OUT> returnType)
public TypeInformation<OUT> returnType()
public void open(Configuration parameters)
RichFunction
The configuration object passed to the function can be used for configuration and initialization. The configuration contains all parameters that were configured on the function in the program composition.
public class MyMapper extends FilterFunction<String> {
private String searchString;
public void open(Configuration parameters) {
this.searchString = parameters.getString("foo");
}
public boolean filter(String value) {
return value.equals(searchString);
}
}
By default, this method does nothing.
open
in interface RichFunction
open
in class AbstractRichFunction
parameters
- The configuration containing the parameters attached to the contract.Configuration
public void join(IN1 first, IN2 second, Collector<OUT> out)
FlatJoinFunction
join
in interface FlatJoinFunction<IN1,IN2,OUT>
join
in class RichFlatJoinFunction<IN1,IN2,OUT>
first
- The element from first input.second
- The element from second input.out
- The collector used to return zero, one, or more elements.public TypeInformation<OUT> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<OUT>
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.