Class ResultRetryStrategy
java.lang.Object
org.apache.flink.table.runtime.operators.join.lookup.ResultRetryStrategy
- All Implemented Interfaces:
Serializable,org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>
public class ResultRetryStrategy
extends Object
implements org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>
A utility class to wrap the data stream api
AsyncRetryStrategy to support both sync and
async retry in table module. The main consideration is making the class name not bind to async
scope, and also highlight the retry predicate is only over the result (not exception).- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResultRetryStrategy(org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy retryStrategy) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRetry(int currentAttempts) static ResultRetryStrategyfixedDelayRetry(int maxAttempts, long backoffTimeMillis, Predicate<Collection<org.apache.flink.table.data.RowData>> resultPredicate) Create a fixed-delay retry strategy by given params.longgetBackoffTimeMillis(int currentAttempts) org.apache.flink.streaming.api.functions.async.AsyncRetryPredicate<org.apache.flink.table.data.RowData>
-
Field Details
-
NO_RETRY_STRATEGY
-
-
Constructor Details
-
ResultRetryStrategy
@VisibleForTesting public ResultRetryStrategy(org.apache.flink.streaming.api.functions.async.AsyncRetryStrategy retryStrategy)
-
-
Method Details
-
fixedDelayRetry
public static ResultRetryStrategy fixedDelayRetry(int maxAttempts, long backoffTimeMillis, Predicate<Collection<org.apache.flink.table.data.RowData>> resultPredicate) Create a fixed-delay retry strategy by given params. -
canRetry
public boolean canRetry(int currentAttempts) - Specified by:
canRetryin interfaceorg.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>
-
getBackoffTimeMillis
public long getBackoffTimeMillis(int currentAttempts) - Specified by:
getBackoffTimeMillisin interfaceorg.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>
-
getRetryPredicate
public org.apache.flink.streaming.api.functions.async.AsyncRetryPredicate<org.apache.flink.table.data.RowData> getRetryPredicate()- Specified by:
getRetryPredicatein interfaceorg.apache.flink.streaming.api.functions.async.AsyncRetryStrategy<org.apache.flink.table.data.RowData>
-