[GitHub] flink pull request #3433: [FLINK-5911] [gelly] Command-line parameters
GitHub user greghogan opened a pull request: https://github.com/apache/flink/pull/3433 [FLINK-5911] [gelly] Command-line parameters Create interface for parsing command-line parameters using ParameterTool and generic implementations for boolean, long, double, string, choice. You can merge this pull request into a Git repository by running: $ git pull https://github.com/greghogan/flink 5911_command_line_parameters Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3433.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 #3433 commit 85565435a02b0e88dc24d0b9e8c3075ade596fef Author: Greg Hogan Date: 2017-02-28T17:35:07Z [FLINK-5911] [gelly] Command-line parameters Create interface for parsing command-line parameters using ParameterTool and generic implementations for boolean, long, double, string, choice. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3433: [FLINK-5911] [gelly] Command-line parameters
Github user vasia commented on a diff in the pull request: https://github.com/apache/flink/pull/3433#discussion_r108067501 --- Diff: flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/Parameter.java --- @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.graph.drivers.parameter; + +import org.apache.flink.api.java.utils.ParameterTool; + +/** + * Encapsulates the usage and configuration of a command-line parameter. + * + * @param parameter value type + */ +public interface Parameter { + + /** +* An informal usage string. Parameter names are prefixed with "--". +* +* Optional parameters are enclosed by "[" and "]". +* +* Generic values are represented by all-caps with specific values enclosed +* by "<" and ">". +* +* @return command-line usage string +*/ + String getParameterization(); --- End diff -- Why not `getUsage()`? --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3433: [FLINK-5911] [gelly] Command-line parameters
Github user greghogan commented on a diff in the pull request: https://github.com/apache/flink/pull/3433#discussion_r108069363 --- Diff: flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/Parameter.java --- @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.graph.drivers.parameter; + +import org.apache.flink.api.java.utils.ParameterTool; + +/** + * Encapsulates the usage and configuration of a command-line parameter. + * + * @param parameter value type + */ +public interface Parameter { + + /** +* An informal usage string. Parameter names are prefixed with "--". +* +* Optional parameters are enclosed by "[" and "]". +* +* Generic values are represented by all-caps with specific values enclosed +* by "<" and ">". +* +* @return command-line usage string +*/ + String getParameterization(); --- End diff -- That does sound better. Will refactor. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3433: [FLINK-5911] [gelly] Command-line parameters
Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3433 --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---