public static class BucketingSinkTestProgram.SubtractingMapper extends RichMapFunction<Tuple3<Integer,Long,String>,Tuple4<Integer,Long,Integer,String>>
Constructor and Description |
---|
SubtractingMapper(long initialValue) |
Modifier and Type | Method and Description |
---|---|
Tuple4<Integer,Long,Integer,String> |
map(Tuple3<Integer,Long,String> value)
The mapping method.
|
void |
open(Configuration parameters)
Initialization method for the function.
|
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
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 Tuple4<Integer,Long,Integer,String> map(Tuple3<Integer,Long,String> value) throws IOException
MapFunction
map
in interface MapFunction<Tuple3<Integer,Long,String>,Tuple4<Integer,Long,Integer,String>>
map
in class RichMapFunction<Tuple3<Integer,Long,String>,Tuple4<Integer,Long,Integer,String>>
value
- The input value.IOException
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.