<> Error exception log
org.apache.flink.runtime.JobException: Recovery is suppressed by
NoRestartBackoffTimeStrategy at
org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:110)
at
org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.getFailureHandlingResult(ExecutionFailureHandler.java:76)
at
org.apache.flink.runtime.scheduler.DefaultScheduler.handleTaskFailure(DefaultScheduler.java:192)
at
org.apache.flink.runtime.scheduler.DefaultScheduler.maybeHandleTaskFailure(DefaultScheduler.java:186)
at
org.apache.flink.runtime.scheduler.DefaultScheduler.updateTaskExecutionStateInternal(DefaultScheduler.java:180)
at
org.apache.flink.runtime.scheduler.SchedulerBase.updateTaskExecutionState(SchedulerBase.java:484)
at
org.apache.flink.runtime.jobmaster.JobMaster.updateTaskExecutionState(JobMaster.java:380)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:279)
at
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:194)
at
org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:74)
at
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:152)
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:26) at
akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:21) at
scala.PartialFunction.applyOrElse(PartialFunction.scala:123) at
scala.PartialFunction.applyOrElse$(PartialFunction.scala:122) at
akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:21) at
scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) at
scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) at
scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) at
akka.actor.Actor.aroundReceive(Actor.scala:517) at
akka.actor.Actor.aroundReceive$(Actor.scala:515) at
akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:225) at
akka.actor.ActorCell.receiveMessage(ActorCell.scala:592) at
akka.actor.ActorCell.invoke(ActorCell.scala:561) at
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258) at
akka.dispatch.Mailbox.run(Mailbox.scala:225) at
akka.dispatch.Mailbox.exec(Mailbox.scala:235) at
akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.net.ConnectException: Connection timed out (Connection timed
out) at java.net.PlainSocketImpl.socketConnect(Native Method) at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at
java.net.Socket.connect(Socket.java:606) at
org.apache.flink.streaming.api.functions.source.SocketTextStreamFunction.run(SocketTextStreamFunction.java:97)
at
org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:100)
at
org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:63)
at
org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:196)
<> terms of settlement
Unstable data source , connection timed out , Cause program downtime , You can restart the program by configuring the restart policy appropriately # Restart policy : Failure rate restart-strategy:
failure-rate # Restart policy failure rate maximum failures per interval :3
restart-strategy.failure-rate.max-failures-per-interval: 3 # Restart policy failure rate interval :5 minute
restart-strategy.failure-rate.failure-rate-interval: 5 min # Restart policy failure rate delay :10 s
restart-strategy.failure-rate.delay: 10 s Flink Support different restart strategies , To control how the job restarts when a failure occurs
The cluster starts with a default restart policy , This default policy is used when no specific restart policy is defined .
If a restart policy is specified at the time of work submission , This policy will override the default policy of the cluster. The default restart policy can be Flink Configuration file for flink-conf.yaml appoint . configuration parameter
restart-strategy Defines which policy is used . Common restart : 1. Policy fixed interval (Fixed delay) 2. Failure rate (Failure rate)
3. No restart (No restart) If not enabled checkpointing, No restart is used (no restart) strategy . If enabled
checkpointing, But the restart policy is not configured , A fixed interval is used (fixed-delay) strategy
The restart policy can be flink-conf.yaml Medium configuration , Represents the global configuration . It can also be specified dynamically in the application code , The global configuration will be overwritten Fixed interval First kind : Global configuration
flink-conf.yaml restart-strategy: fixed-delay
restart-strategy.fixed-delay.attempts: 3 restart-strategy.fixed-delay.delay: 10
s Second : Application code settings : env.setRestartStrategy(RestartStrategies.fixedDelayRestart( 3,//
Number of attempts to restart Time.of(10, TimeUnit.SECONDS) // interval )); Failure rate
Failure rate restart strategy Job Restart after failure , But after exceeding the failure rate ,Job Will eventually be considered a failure . Between two consecutive restart attempts , The restart policy will wait for a fixed time
The following configuration is 5 If it fails within minutes 3 Second, it is considered that job fail , Retry interval is 10s First kind : Global configuration flink-conf.yaml restart-strategy:
failure-rate restart-strategy.failure-rate.max-failures-per-interval: 3
restart-strategy.failure-rate.failure-rate-interval: 5 min
restart-strategy.failure-rate.delay: 10 s Second : Application code settings
env.setRestartStrategy(RestartStrategies.failureRateRestart( 3,// Maximum number of failures in a time period
Time.of(5, TimeUnit.MINUTES), // The number of failures is measured by the time period Time.of(10, TimeUnit.SECONDS) //
interval )); No restart policy First kind : Global configuration flink-conf.yaml restart-strategy: none Second : Application code settings
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
env.setRestartStrategy(RestartStrategies.noRestart()); Actual code demonstration public class
RestartTest { public static void main(String[] args) { // obtain flink Operating environment
StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment(); // every other 1000
ms Start a checkpoint 【 set up checkpoint Period of 】 env.enableCheckpointing(1000); // interval 10 second restart 3 second
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(3,Time.seconds(10)));
//5 If it fails within minutes 3 Second, it is considered that job fail , Retry interval is 10s
env.setRestartStrategy(RestartStrategies.failureRateRestart(3,Time.of(5,TimeUnit.MINUTES),Time.of(10,TimeUnit.SECONDS)));
// Don't try again env.setRestartStrategy(RestartStrategies.noRestart()); }// }

Technology
©2019-2020 Toolsou All rights reserved,
Android Using wechat in H5 Payment result refresh during payment shock !!C++ Can make a sound ! Basic operation of single linked list C Language explanation Java Implement an epidemic number management system 2021 year 11 World programming language ranking linux upper mysql Invalid command _linux lower mysql The command is useless Java project : Campus dormitory management system (java+jsp+javaweb+mysql+ajax) Wechat applet development project directory linux ubuntu Which version ,Ubuntu Which version is the best ?python Code painting cherry blossoms - How to use Python Draw a beautiful cherry blossom