Class AsyncMLPredictFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,org.apache.flink.streaming.api.functions.async.AsyncFunction<Map<String,Object>,Double>
public class AsyncMLPredictFunction extends org.apache.flink.streaming.api.functions.async.RichAsyncFunction<Map<String,Object>,Double>
Async function for non-blocking inference.- Since:
- 1.0.0
- Author:
- Nestor Martourez, Sr Software and Data Streaming Engineer @ CodedStreams
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AsyncMLPredictFunction(String modelName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidasyncInvoke(Map<String,Object> input, org.apache.flink.streaming.api.functions.async.ResultFuture<Double> resultFuture)voidclose()voidopen(org.apache.flink.configuration.Configuration parameters)-
Methods inherited from class org.apache.flink.streaming.api.functions.async.RichAsyncFunction
setRuntimeContext
-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext
-
-
-
-
Constructor Detail
-
AsyncMLPredictFunction
public AsyncMLPredictFunction(String modelName)
-
-
Method Detail
-
open
public void open(org.apache.flink.configuration.Configuration parameters) throws Exception- Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
openin classorg.apache.flink.api.common.functions.AbstractRichFunction- Throws:
Exception
-
asyncInvoke
public void asyncInvoke(Map<String,Object> input, org.apache.flink.streaming.api.functions.async.ResultFuture<Double> resultFuture)
-
-