[
https://issues.apache.org/jira/browse/FLINK-3937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327349#comment-15327349
]
ASF GitHub Bot commented on FLINK-3937:
---------------------------------------
Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/flink/pull/2085#discussion_r66789723
--- Diff:
flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java
---
@@ -181,11 +198,30 @@ public boolean getPrintStatusDuringExecution() {
}
/**
- * @return -1 if unknown. The maximum number of available processing
slots at the Flink cluster
- * connected to this client.
+ * Gets the current JobManager address from the Flink configuration
(may change in case of a HA setup).
+ * @return The address (host and port) of the leading JobManager
*/
- public int getMaxSlots() {
- return this.maxSlots;
+ public InetSocketAddress getJobManagerAddressFromConfig() {
+ try {
+ String hostName =
flinkConfig.getString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, null);
+ int port =
flinkConfig.getInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY, -1);
+ return new InetSocketAddress(hostName, port);
--- End diff --
Missing indentation
> Make flink cli list, savepoint, cancel and stop work on Flink-on-YARN clusters
> ------------------------------------------------------------------------------
>
> Key: FLINK-3937
> URL: https://issues.apache.org/jira/browse/FLINK-3937
> Project: Flink
> Issue Type: Improvement
> Reporter: Sebastian Klemke
> Assignee: Maximilian Michels
> Priority: Trivial
> Attachments: improve_flink_cli_yarn_integration.patch
>
>
> Currently, flink cli can't figure out JobManager RPC location for
> Flink-on-YARN clusters. Therefore, list, savepoint, cancel and stop
> subcommands are hard to invoke if you only know the YARN application ID. As
> an improvement, I suggest adding a -yid <yarnApplicationId> option to the
> mentioned subcommands that can be used together with -m yarn-cluster. Flink
> cli would then retrieve JobManager RPC location from YARN ResourceManager.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)