Class RetryableAsyncLookupFunctionDelegator
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.AsyncTableFunction<RowData>
-
- org.apache.flink.table.functions.AsyncLookupFunction
-
- org.apache.flink.table.runtime.operators.join.lookup.RetryableAsyncLookupFunctionDelegator
-
- All Implemented Interfaces:
Serializable
,FunctionDefinition
public class RetryableAsyncLookupFunctionDelegator extends AsyncLookupFunction
A delegator holds user'sAsyncLookupFunction
to handle retries.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RetryableAsyncLookupFunctionDelegator(AsyncLookupFunction userLookupFunction, ResultRetryStrategy retryStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Collection<RowData>>
asyncLookup(RowData keyRow)
Asynchronously lookup rows matching the lookup keys.void
close()
Tear-down method for user-defined function.void
open(FunctionContext context)
Setup method for user-defined function.-
Methods inherited from class org.apache.flink.table.functions.AsyncLookupFunction
eval
-
Methods inherited from class org.apache.flink.table.functions.AsyncTableFunction
getKind, getTypeInference
-
Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction
functionIdentifier, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.functions.FunctionDefinition
getRequirements, isDeterministic, supportsConstantFolding
-
-
-
-
Constructor Detail
-
RetryableAsyncLookupFunctionDelegator
public RetryableAsyncLookupFunctionDelegator(@Nonnull AsyncLookupFunction userLookupFunction, @Nonnull ResultRetryStrategy retryStrategy)
-
-
Method Detail
-
open
public void open(FunctionContext context) throws Exception
Description copied from class:UserDefinedFunction
Setup method for user-defined function. It can be used for initialization work. By default, this method does nothing.- Overrides:
open
in classUserDefinedFunction
- Throws:
Exception
-
asyncLookup
public CompletableFuture<Collection<RowData>> asyncLookup(RowData keyRow)
Description copied from class:AsyncLookupFunction
Asynchronously lookup rows matching the lookup keys.Please note that the returning collection of RowData shouldn't be reused across invocations.
- Specified by:
asyncLookup
in classAsyncLookupFunction
- Parameters:
keyRow
- - ARowData
that wraps lookup keys.- Returns:
- A collection of all matching rows in the lookup table.
-
close
public void close() throws Exception
Description copied from class:UserDefinedFunction
Tear-down method for user-defined function. It can be used for clean up work. By default, this method does nothing.- Overrides:
close
in classUserDefinedFunction
- Throws:
Exception
-
-