Class FailureRateRestartBackoffTimeStrategy
- java.lang.Object
-
- org.apache.flink.runtime.executiongraph.failover.FailureRateRestartBackoffTimeStrategy
-
- All Implemented Interfaces:
RestartBackoffTimeStrategy
public class FailureRateRestartBackoffTimeStrategy extends Object implements RestartBackoffTimeStrategy
Restart strategy which can restart when failure rate is not exceeded.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFailureRateRestartBackoffTimeStrategy.FailureRateRestartBackoffTimeStrategyFactoryThe factory for creatingFailureRateRestartBackoffTimeStrategy.-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.executiongraph.failover.RestartBackoffTimeStrategy
RestartBackoffTimeStrategy.Factory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRestart()Returns whether a restart should be conducted.static FailureRateRestartBackoffTimeStrategy.FailureRateRestartBackoffTimeStrategyFactorycreateFactory(org.apache.flink.configuration.Configuration configuration)longgetBackoffTime()Returns the delay to do the restarting.booleannotifyFailure(Throwable cause)Notify the strategy about the task failure cause.StringtoString()
-
-
-
Method Detail
-
canRestart
public boolean canRestart()
Description copied from interface:RestartBackoffTimeStrategyReturns whether a restart should be conducted.- Specified by:
canRestartin interfaceRestartBackoffTimeStrategy- Returns:
- whether a restart should be conducted
-
getBackoffTime
public long getBackoffTime()
Description copied from interface:RestartBackoffTimeStrategyReturns the delay to do the restarting.- Specified by:
getBackoffTimein interfaceRestartBackoffTimeStrategy- Returns:
- the delay to do the restarting
-
notifyFailure
public boolean notifyFailure(Throwable cause)
Description copied from interface:RestartBackoffTimeStrategyNotify the strategy about the task failure cause.- Specified by:
notifyFailurein interfaceRestartBackoffTimeStrategy- Parameters:
cause- of the task failure- Returns:
- True means that the current failure is the first one after the most-recent failure handling happened, false means that there has been a failure before that was not handled, yet, and the current failure will be considered in a combined failure handling effort.
-
createFactory
public static FailureRateRestartBackoffTimeStrategy.FailureRateRestartBackoffTimeStrategyFactory createFactory(org.apache.flink.configuration.Configuration configuration)
-
-