Hi folks,

In the CLIFrontend
<https://github.com/apache/flink/blob/97089ffd0548e0297855baec751259dbde8c8439/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1280>,
it looks like the exit codes will always return 0 as long as an error has
not been thrown by the underlying CLI commands. I have a use-case where I
want to run a job in execution.attached mode via the CLI and retrieve the
exit code of the underlying job (running in Yarn application mode), but as
the code is written now, there doesn't seem to be any way to propagate the
specific YarnApplicationStatus code back up to the CLI so that the exit
code of the CLI accurately reflects the state of the completed application.
Is there any way to propagate the yarn application status exit code up?

A gap that I see, specifically when deploying in Yarn, is that whether an
application failed is based on the YarnApplicationState
<https://github.com/apache/flink/blob/40feb66693b33bf93771399fb942ef30874e0adb/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java#L1272>,
but necessarily on the FinalApplicationStatus. Would also like to know if
there is a particular reason for this?

Thanks for your help on this!

Best,
- Allison

Reply via email to