[
https://issues.apache.org/jira/browse/FLINK-2797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976084#comment-14976084
]
ASF GitHub Bot commented on FLINK-2797:
---------------------------------------
Github user sachingoel0101 commented on a diff in the pull request:
https://github.com/apache/flink/pull/1214#discussion_r43098720
--- Diff:
flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java ---
@@ -909,7 +919,21 @@ private int handleError(Throwable t) {
}
LOG.error("Error while running the command.", t);
- t.printStackTrace();
+ // check if the error was due to an invalid program in detached
mode.
+ if (t instanceof ProgramInvocationException && t.getCause()
instanceof DetachedProgramException) {
+ System.err.println(t.getCause().getMessage());
+ // now trace to the user's main method. We don't wanna
show unnecessary information
+ // in this particular case.
--- End diff --
True. I didn't wanna change the existing stack traces.
This will require maintaining a global variable for whether the program was
run in interactive mode. The `DetachedProgramException` is a special case where
we don't wanna clutter the stack trace with flink's trace, instead just show
the user program's stack trace.
In other cases, this might not be the case.
> CLI: Missing option to submit jobs in detached mode
> ---------------------------------------------------
>
> Key: FLINK-2797
> URL: https://issues.apache.org/jira/browse/FLINK-2797
> Project: Flink
> Issue Type: Bug
> Components: Command-line client
> Affects Versions: 0.9, 0.10
> Reporter: Maximilian Michels
> Assignee: Sachin Goel
> Fix For: 0.10
>
>
> Jobs can only be submitted in detached mode using YARN but not on a
> standalone installation. This has been requested by users who want to submit
> a job, get the job id, and later query its status.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)