模块(Module)
嵌入式模块
package org.apache.flink.statefun.docs;
import java.util.Map;
import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule;
public class BasicFunctionModule implements StatefulFunctionModule {
public void configure(Map<String, String> globalConfiguration, Binder binder) {
// Declare the user function and bind it to its type
binder.bindFunctionProvider(FnWithDependency.TYPE, new CustomProvider());
// Stateful functions that do not require any configuration
// can declare their provider using java 8 lambda syntax
binder.bindFunctionProvider(Identifiers.HELLO_TYPE, unused -> new FnHelloWorld());
}
}远程模块
规范
定义函数
完整例子
Last updated