tillrohrmann commented on a change in pull request #15916:
URL: https://github.com/apache/flink/pull/15916#discussion_r634145174
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
##########
@@ -320,11 +324,25 @@ protected void initializeServices(Configuration
configuration, PluginManager plu
metricRegistry.startQueryService(metricQueryServiceRpcService,
null);
final String hostname = RpcUtils.getHostname(commonRpcService);
+ FileJobGraphRetriever fileJobGraphRetriever =
+ FileJobGraphRetriever.createFrom(configuration, null);
+
+ String jobName = null;
+ String jobId = null;
+ try {
+ JobGraph jobGraph =
fileJobGraphRetriever.retrieveJobGraph(configuration);
+ jobName = jobGraph.getName();
+ jobId = jobGraph.getJobID().toHexString();
+ } catch (FlinkException e) {
+ LOG.info("Not able to fetch JobGraph");
+ }
Review comment:
I think this only works for the Yarn per job cluster entrypoint and is
not a general solution. For example, the application mode won't be supported.
Hence, I think we cannot do it like this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]