public class CRowInputMapRunner<OUT> extends RichMapFunction<CRow,OUT> implements ResultTypeQueryable<OUT>, Compiler<MapFunction<Row,OUT>>, Logging
CRow
input.Constructor and Description |
---|
CRowInputMapRunner(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. |
OUT |
map(CRow in)
The mapping method.
|
void |
open(Configuration parameters)
Initialization method for the function.
|
TypeInformation<OUT> |
returnType() |
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public CRowInputMapRunner(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 OUT map(CRow in)
MapFunction
map
in interface MapFunction<CRow,OUT>
map
in class RichMapFunction<CRow,OUT>
in
- The input value.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.