[
https://issues.apache.org/jira/browse/FLINK-11103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17334643#comment-17334643
]
Ashwin Kolhatkar edited comment on FLINK-11103 at 4/28/21, 10:42 AM:
---------------------------------------------------------------------
Thanks, [~trohrmann] .
So the {{flink-conf.yaml}} value could be
{{taskmanager.debug.log-uncaught-exceptions}} (boolean value) in
{{TaskManagerOptions}} class where true would only log the exception and false
would throw the exception and fail the job.
The overall approach I am thinking of is this:
In the {{doRun()}} function of {{Task}} class, for the {{executingThread}} ,
we could add the {{Thread.setUncaughtExceptionHandler}}, and depending on
configuration, either put a {{failExternally}}, (if config is false), or simply
log the exception (if config is true). Does this look okay?
was (Author: ashwinkolhatkar):
Thanks, [~trohrmann] .
So the {{flink-conf.yaml}} value could be
{{taskmanager.debug.log-uncaught-exceptions}} (boolean value) in
{{TaskManagerOptions}} class where true would enable logs and false would throw
the exception and fail the job.
The overall approach I am thinking of is this:
In the {{doRun()}} function of {{Task}} class, for the {{executingThread}} , we
could add the {{Thread.setUncaughtExceptionHandler}}, and depending on
configuration, either put a {{failExternally}}, (if config is false), or simply
log the exception (if config is true). Does this look okay?
> Set a default uncaught exception handler
> ----------------------------------------
>
> Key: FLINK-11103
> URL: https://issues.apache.org/jira/browse/FLINK-11103
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Coordination
> Affects Versions: 1.8.0
> Reporter: Nico Kruber
> Assignee: Ashwin Kolhatkar
> Priority: Major
> Labels: stale-major, starter, usability
>
> We should set a default uncaught exception handler in Flink via
> {{Thread.setDefaultUncaughtExceptionHandler()}} which at least logs the
> exceptions. Ideally, we would even fail the job (could make this
> configurable) but users may have some ill-behaving threads, e.g. through
> libraries, which they would want to tolerate and we don't want to change
> behaviour now.
> (FLINK-5232 added this for the JobManager, we need it for the TaskManager)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)