Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.12.2, 1.14.0
-
None
-
None
Description
When I use Yarn-Application mode to submit Flink Job and there exist an exception expected, but I cannot get it in jobmanager log. And I only get the exit code 1 in yarn log.
Relative code
// YarnApplicationClusterEntryPoint#main try { program = getPackagedProgram(configuration); } catch (Exception e) { LOG.error("Could not create application program.", e); Thread.sleep(10); // add this for test System.exit(1); }
Log info
- The ERROR log doesn't exist before Thread.sleep.
- The ERROR log exists after Thread.sleep.
Reason
System.exit() terminates the currently running Java Virtual Machine too fast to print the ERROR log.
Improvement
I think we can print the ERROR log to jobmanager.err before call System.exit(1) so that we can get the exception info.