[
https://issues.apache.org/jira/browse/FLINK-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417195#comment-15417195
]
Robert Metzger commented on FLINK-4335:
---------------------------------------
I see. The jar ID is an internal id of the web job submission client. It
doesn't exist for the CliFrontend (./bin/flink), so its not a concept generally
known to Flink.
The jar Id is directly derived from the jar file name (when uploading a jar in
Flink's web interface, it'll be renamed).
As a temporary workaround, you could use this code-snippet to get the name of
the jar and then derive the Jar id from it (you can put the id then into the
global job parameters as well)
{code}
public class Consumer {
public static void main(String[] args) throws Exception {
String jarFileName = new
File(Consumer.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getName();
int idx = jarFileName.indexOf("_");
String jarID = jarFileName.substring(0, idx);
System.out.println("Jar ID = " + jarID);
{code}
I know that this solution is not very stable .. maybe we can come up with
something better in the future.
> Add jar id, and job parameters information to job status rest call
> ------------------------------------------------------------------
>
> Key: FLINK-4335
> URL: https://issues.apache.org/jira/browse/FLINK-4335
> Project: Flink
> Issue Type: Improvement
> Components: Webfrontend
> Reporter: Zhenzhong Xu
> Priority: Minor
>
> From declarative, reconcilation based job management perspective, there is a
> need to identify the job jar id, and all job parameters for a running job to
> determine if the current job is up to date.
> I think these information needs to be available through the job manager rest
> call (/jobs/$id).
> * Jar ID
> * Job entry class
> * parallelism
> * all user defined parameters
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)