[
https://issues.apache.org/jira/browse/FLINK-3937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15324550#comment-15324550
]
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_r66625502
--- Diff:
flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java ---
@@ -1275,33 +1071,16 @@ else if (new
File(CONFIG_DIRECTORY_FALLBACK_2).exists()) {
return location;
}
- public static Map<String, String> getDynamicProperties(String
dynamicPropertiesEncoded) {
- if (dynamicPropertiesEncoded != null &&
dynamicPropertiesEncoded.length() > 0) {
- Map<String, String> properties = new HashMap<>();
-
- String[] propertyLines =
dynamicPropertiesEncoded.split(CliFrontend.YARN_DYNAMIC_PROPERTIES_SEPARATOR);
- for (String propLine : propertyLines) {
- if (propLine == null) {
- continue;
- }
-
- String[] kv = propLine.split("=");
- if (kv.length >= 2 && kv[0] != null && kv[1] !=
null && kv[0].length() > 0) {
- properties.put(kv[0], kv[1]);
- }
- }
- return properties;
- }
- else {
- return Collections.emptyMap();
- }
- }
- public static String getYarnPropertiesLocation(Configuration conf) {
- String defaultPropertiesFileLocation =
System.getProperty("java.io.tmpdir");
- String currentUser = System.getProperty("user.name");
- String propertiesFileLocation =
conf.getString(ConfigConstants.YARN_PROPERTIES_FILE_LOCATION,
defaultPropertiesFileLocation);
-
- return propertiesFileLocation + File.separator +
CliFrontend.YARN_PROPERTIES_FILE + currentUser;
+ /**
+ * Writes the given job manager address to the associated configuration
object
+ *
+ * @param address Address to write to the configuration
+ * @param config The config to write to
+ */
+ public static void writeJobManagerAddressToConfig(Configuration config,
InetSocketAddress address) {
--- End diff --
How about renaming this to "setJobManagerAddressInConfig()" .. write
implies that something is written to a file or something.
> 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)