一、目标
希望使用flink sql来关联维度表,但是想用异步IO的方式关联。
二、方案
当前社区进展:目前Flink SQL 中的connector都没实现异步io关联维表,但是接口是已经支持了的,可以自定义实现;HBase connector 社区有人正在支持异步io关联维表,预计1.13可以使用。
2.1、 自己实现demo:
/**
* An async lookup function which find matched rows with the given fields. NOTE: We have to
* declare it as public because it will be used in code generation.
*/
public static class AsyncTestValueLookupFunction extends AsyncTableFunction<Row> {
private static final long serialVersionUID = 1L;
private final Map<Row, List<Row>> mapping;
private transient boolean isOpenCalled = false;
private transient ExecutorService executor;