flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #3903: [FLINK-6581] [cli] Correct dynamic property parsin...
Date Mon, 15 May 2017 13:47:39 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3903#discussion_r116494377
  
    --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
---
    @@ -702,9 +702,15 @@ private void logAndSysout(String message) {
     					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]);
    +				int firstEquals = propLine.indexOf("=");
    +
    +				if (firstEquals >= 0) {
    +					String key = propLine.substring(0, firstEquals).trim();
    +					String value = propLine.substring(firstEquals + 1, propLine.length()).trim();
    +
    +					if (!key.isEmpty() && !value.isEmpty()) {
    --- End diff --
    
    True, in order to keep in sync with the old behaviour, I'll remove the check whether a
value is empty.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message