public class CorrelateFlatMapRunner<IN,OUT> extends RichFlatMapFunction<IN,OUT> implements ResultTypeQueryable<OUT>, Compiler<Object>
Constructor and Description |
---|
CorrelateFlatMapRunner(String flatMapName,
String flatMapCode,
String collectorName,
String collectorCode,
TypeInformation<OUT> returnType) |
Modifier and Type | Method and Description |
---|---|
void |
flatMap(IN in,
Collector<OUT> out)
The core method of the FlatMapFunction.
|
TypeInformation<OUT> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
org.slf4j.Logger |
LOG() |
void |
open(Configuration parameters)
Initialization method for the function.
|
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public org.slf4j.Logger LOG()
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 flatMap(IN in, Collector<OUT> out)
FlatMapFunction
flatMap
in interface FlatMapFunction<IN,OUT>
flatMap
in class RichFlatMapFunction<IN,OUT>
in
- The input value.out
- The collector for returning result values.public TypeInformation<OUT> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<OUT>
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.