public class CRowCorrelateProcessRunner extends ProcessFunction<CRow,CRow> implements ResultTypeQueryable<CRow>, Compiler<Object>, Logging
CRow
input and CRow
output.ProcessFunction.Context, ProcessFunction.OnTimerContext
Constructor and Description |
---|
CRowCorrelateProcessRunner(String processName,
String processCode,
String collectorName,
String collectorCode,
TypeInformation<CRow> returnType) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Tear-down method for the user code.
|
TypeInformation<CRow> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
void |
open(Configuration parameters)
Initialization method for the function.
|
void |
processElement(CRow in,
ProcessFunction.Context ctx,
Collector<CRow> out)
Process one element from the input stream.
|
TypeInformation<CRow> |
returnType() |
onTimer
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public TypeInformation<CRow> 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 processElement(CRow in, ProcessFunction.Context ctx, Collector<CRow> out)
ProcessFunction
This function can output zero or more elements using the Collector
parameter
and also update internal state or set timers using the ProcessFunction.Context
parameter.
processElement
in class ProcessFunction<CRow,CRow>
in
- The input value.ctx
- A ProcessFunction.Context
that allows querying the timestamp of the element and getting
a TimerService
for registering timers and querying the time. The
context is only valid during the invocation of this method, do not store it.out
- The collector for returning result values.public TypeInformation<CRow> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<CRow>
public void close()
RichFunction
This method can be used for clean up work.
close
in interface RichFunction
close
in class AbstractRichFunction
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.