You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2017/05/15 10:06:29 UTC

[GitHub] flink pull request #3903: [FLINK-6581] [cli] Correct dynamic property parsin...

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/3903

    [FLINK-6581] [cli] Correct dynamic property parsing for YARN cli

    The YARN cli will now split the dynamic propertie at the first occurrence of
    the = sign instead of splitting it at every = sign. That way we support dynamic
    properties of the form -yDenv.java.opts="-DappName=foobar".


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink fixYarnDynPropertyParsing

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3903.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3903
    
----
commit 5988d06fd5bc8e6a20e924bb009aaf3f9b5f884b
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-05-15T10:04:07Z

    [FLINK-6581] [cli] Correct dynamic property parsing for YARN cli
    
    The YARN cli will now split the dynamic propertie at the first occurrence of
    the = sign instead of splitting it at every = sign. That way we support dynamic
    properties of the form -yDenv.java.opts="-DappName=foobar".

----


---
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.
---

[GitHub] flink issue #3903: [FLINK-6581] [cli] Correct dynamic property parsing for Y...

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on the issue:

    https://github.com/apache/flink/pull/3903
  
    +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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3903: [FLINK-6581] [cli] Correct dynamic property parsing for Y...

Posted by johnboy14 <gi...@git.apache.org>.
Github user johnboy14 commented on the issue:

    https://github.com/apache/flink/pull/3903
  
    At this time I am looking a workaround in the meantime. Is there anyway to override the log4j.properties file for each application deployed to EMR?


---
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.
---

[GitHub] flink pull request #3903: [FLINK-6581] [cli] Correct dynamic property parsin...

Posted by tillrohrmann <gi...@git.apache.org>.
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.
---

[GitHub] flink pull request #3903: [FLINK-6581] [cli] Correct dynamic property parsin...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/3903


---
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.
---

[GitHub] flink issue #3903: [FLINK-6581] [cli] Correct dynamic property parsing for Y...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/3903
  
    Thanks for the review @zentol. I'll address your comment and then merge the PR once Travis gives green light.


---
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.
---

[GitHub] flink issue #3903: [FLINK-6581] [cli] Correct dynamic property parsing for Y...

Posted by johnboy14 <gi...@git.apache.org>.
Github user johnboy14 commented on the issue:

    https://github.com/apache/flink/pull/3903
  
    Thanks for turning this around quickly @tillrohrmann We are experiencing this issue with AWS EMR.  Is it possible to patch the current 1.2.0 version available via EMR?


---
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.
---

[GitHub] flink issue #3903: [FLINK-6581] [cli] Correct dynamic property parsing for Y...

Posted by johnboy14 <gi...@git.apache.org>.
Github user johnboy14 commented on the issue:

    https://github.com/apache/flink/pull/3903
  
    When's the next bug fix release scheduled for @tillrohrmann ?


---
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.
---

[GitHub] flink issue #3903: [FLINK-6581] [cli] Correct dynamic property parsing for Y...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/3903
  
    @johnboy14 I can merge this PR also into the `1.2` branch. This means that it will be included in the next bug fix release `1.2.2`. How quickly it will be included in EMR depends a little bit on the AWS/Apache BigTop. We can try to ping them. But if customers complain, then it's much more efficient.


---
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.
---

[GitHub] flink pull request #3903: [FLINK-6581] [cli] Correct dynamic property parsin...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3903#discussion_r116485611
  
    --- 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 --
    
    We didn't reject empty values before. Not sure if there's a valid use-case for that though, maybe overriding/clearing some variable?


---
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.
---

[GitHub] flink issue #3903: [FLINK-6581] [cli] Correct dynamic property parsing for Y...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/3903
  
    This is not decided yet. Usually we do it depending on the urgency of the fixes and the time since the last bug fix release. Currently, we're working on the `1.3` release which requires most of our time. Thus, I would assume not before mid of next month but this is a community decision.


---
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.
---