Github user mxm commented on a diff in the pull request:
https://github.com/apache/flink/pull/2085#discussion_r66626078
--- 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 --
+1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---