You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by ajaybhat <gi...@git.apache.org> on 2015/05/24 07:30:36 UTC
[GitHub] flink pull request: FLINK-2018 Add ParameterUtil.fromGenericOption...
GitHub user ajaybhat opened a pull request:
https://github.com/apache/flink/pull/720
FLINK-2018 Add ParameterUtil.fromGenericOptionsParser()
Pls review and comment
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ajaybhat/flink FLINK-2018
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/720.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 #720
----
commit e1ba738ba36632e18bd43c1d045b2fbd0607255a
Author: Ajay Bhat <aj...@air-watch.com>
Date: 2015-05-24T05:30:09Z
FLINK-2018 Add ParameterUtil.fromGenericOptionsParser()
----
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/flink/pull/720#discussion_r30977489
--- Diff: flink-java/src/test/java/org/apache/flink/api/java/utils/ParameterToolTest.java ---
@@ -150,6 +150,14 @@ public void testMerged() {
validate(parameter);
}
+ @Test
+ public void testFromGenericOptionsParser() throws IOException {
+ System.setProperty("input", "myInput");
+ System.setProperty("expectedCount", "15");
+ ParameterTool parameter = ParameterTool.fromGenericOptionsParser(new String[]{"-D", "input=myInput", "-DexpectedCount=15"});
--- End diff --
Then why are you setting the two system properties?
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by mbalassi <gi...@git.apache.org>.
Github user mbalassi commented on the pull request:
https://github.com/apache/flink/pull/720#issuecomment-104989667
Thanks for picking up the issue. Generally looks good to me. One minor comment: please do not merge my commit on the delta policies as it is already in. :)
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/flink/pull/720#discussion_r30953426
--- Diff: flink-java/src/test/java/org/apache/flink/api/java/utils/ParameterToolTest.java ---
@@ -150,6 +150,14 @@ public void testMerged() {
validate(parameter);
}
+ @Test
+ public void testFromGenericOptionsParser() throws IOException {
+ System.setProperty("input", "myInput");
+ System.setProperty("expectedCount", "15");
+ ParameterTool parameter = ParameterTool.fromGenericOptionsParser(new String[]{"-D", "input=myInput", "-DexpectedCount=15"});
--- End diff --
Is the genericOptionsParser getting the settings from the system properties or the command line arguments?
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/720#issuecomment-123370928
Looks good. I will merge this...
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/flink/pull/720#discussion_r30986863
--- Diff: flink-java/src/test/java/org/apache/flink/api/java/utils/ParameterToolTest.java ---
@@ -150,6 +150,12 @@ public void testMerged() {
validate(parameter);
}
+ @Test
+ public void testFromGenericOptionsParser() throws IOException {
+ ParameterTool parameter = ParameterTool.fromGenericOptionsParser(new String[]{"-D", "input=myInput", "-DexpectedCount=15"});
+ validate(parameter);
+ }
--- End diff --
Sorry that I didn't write this earlier when I did the first review of the pull request:
Can you also add a test where we read one of the arguments (say input=myinput) from a xml configuration file.
As far as I can see, the GenericOptionsParser also supports specifying `-conf path/to/file.xml`.
That would be amazing ,)
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by ajaybhat <gi...@git.apache.org>.
Github user ajaybhat commented on the pull request:
https://github.com/apache/flink/pull/720#issuecomment-105028293
> please do not merge my commit on the delta policies as it is already in.
I don't know how that happened. As usual I just committed, rebased from master and pushed to my fork. Is there a way to get rid of that commit?
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by ajaybhat <gi...@git.apache.org>.
Github user ajaybhat commented on a diff in the pull request:
https://github.com/apache/flink/pull/720#discussion_r30982636
--- Diff: flink-java/src/test/java/org/apache/flink/api/java/utils/ParameterToolTest.java ---
@@ -150,6 +150,14 @@ public void testMerged() {
validate(parameter);
}
+ @Test
+ public void testFromGenericOptionsParser() throws IOException {
+ System.setProperty("input", "myInput");
+ System.setProperty("expectedCount", "15");
+ ParameterTool parameter = ParameterTool.fromGenericOptionsParser(new String[]{"-D", "input=myInput", "-DexpectedCount=15"});
--- End diff --
It was a mistake; I'll remove those.
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/720
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by ajaybhat <gi...@git.apache.org>.
Github user ajaybhat commented on a diff in the pull request:
https://github.com/apache/flink/pull/720#discussion_r30963563
--- Diff: flink-java/src/test/java/org/apache/flink/api/java/utils/ParameterToolTest.java ---
@@ -150,6 +150,14 @@ public void testMerged() {
validate(parameter);
}
+ @Test
+ public void testFromGenericOptionsParser() throws IOException {
+ System.setProperty("input", "myInput");
+ System.setProperty("expectedCount", "15");
+ ParameterTool parameter = ParameterTool.fromGenericOptionsParser(new String[]{"-D", "input=myInput", "-DexpectedCount=15"});
--- End diff --
Its from the command line arguments.
---
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: FLINK-2018 Add ParameterUtil.fromGenericOption...
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:
https://github.com/apache/flink/pull/720#issuecomment-108851892
Github sometimes includes unrelated commits into PRs when the Apache Git repository and the Github mirror are out-of-sync, i.e., commits from the Apache Git have not been mirrored yet.
@ajaybhat The commit should disappear when you do another rebase and push --force into your PR branch.
---
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.
---