in flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/source/AbstractHBaseDynamicTableSource.java [78:98]
public LookupRuntimeProvider getLookupRuntimeProvider(LookupContext context) {
checkArgument(
context.getKeys().length == 1 && context.getKeys()[0].length == 1,
"Currently, HBase table can only be lookup by single rowkey.");
checkArgument(
hbaseSchema.getRowKeyName().isPresent(),
"HBase schema must have a row key when used in lookup mode.");
checkArgument(
DataType.getFieldNames(hbaseSchema.convertToDataType())
.get(context.getKeys()[0][0])
.equals(hbaseSchema.getRowKeyName().get()),
"Currently, HBase table only supports lookup by rowkey field.");
HBaseRowDataLookupFunction lookupFunction =
new HBaseRowDataLookupFunction(
conf, tableName, hbaseSchema, nullStringLiteral, maxRetryTimes);
if (cache != null) {
return PartialCachingLookupProvider.of(lookupFunction, cache);
} else {
return LookupFunctionProvider.of(lookupFunction);
}
}