[GitHub] metron pull request #717: METRON-1134: Allow parser command line options to ...

2017-08-31 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/metron/pull/717


---
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] metron pull request #717: METRON-1134: Allow parser command line options to ...

2017-08-31 Thread cestella
Github user cestella commented on a diff in the pull request:

https://github.com/apache/metron/pull/717#discussion_r136409849
  
--- Diff: metron-platform/metron-parsers/README.md ---
@@ -103,6 +103,15 @@ then it is assumed to be a regex and will match any 
topic matching the pattern (
 * `mergeMetadata` : Boolean indicating whether to merge metadata with the 
message or not (`false` by default).  See below for a discussion about metadata.
 * `parserConfig` : A JSON Map representing the parser implementation 
specific configuration.
 * `fieldTransformations` : An array of complex objects representing the 
transformations to be done on the message generated from the parser before 
writing out to the kafka topic.
+* `spoutParallelism` : The kafka spout parallelism (default to `1`).  This 
can be overridden on the command line.
--- End diff --

Yep, fixed.


---
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] metron pull request #717: METRON-1134: Allow parser command line options to ...

2017-08-30 Thread merrimanr
Github user merrimanr commented on a diff in the pull request:

https://github.com/apache/metron/pull/717#discussion_r136208967
  
--- Diff: metron-platform/metron-parsers/README.md ---
@@ -103,6 +103,15 @@ then it is assumed to be a regex and will match any 
topic matching the pattern (
 * `mergeMetadata` : Boolean indicating whether to merge metadata with the 
message or not (`false` by default).  See below for a discussion about metadata.
 * `parserConfig` : A JSON Map representing the parser implementation 
specific configuration.
 * `fieldTransformations` : An array of complex objects representing the 
transformations to be done on the message generated from the parser before 
writing out to the kafka topic.
+* `spoutParallelism` : The kafka spout parallelism (default to `1`).  This 
can be overridden on the command line.
--- End diff --

should numWorkers and numAckers be in this list?


---
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] metron pull request #717: METRON-1134: Allow parser command line options to ...

2017-08-30 Thread merrimanr
Github user merrimanr commented on a diff in the pull request:

https://github.com/apache/metron/pull/717#discussion_r136208891
  
--- Diff: 
metron-platform/metron-management/src/test/java/org/apache/metron/management/ConfigurationFunctionsTest.java
 ---
@@ -81,7 +81,15 @@ private static void pushConfigs(String inputPath) throws 
Exception {
   "parserConfig" : { },
   "fieldTransformations" : [ ],
   "readMetadata":false,
-  "mergeMetadata":false
+  "mergeMetadata":false,
--- End diff --

should numWorkers and numAckers be in this list?


---
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] metron pull request #717: METRON-1134: Allow parser command line options to ...

2017-08-29 Thread ottobackwards
Github user ottobackwards commented on a diff in the pull request:

https://github.com/apache/metron/pull/717#discussion_r135883683
  
--- Diff: 
metron-interface/metron-rest/src/test/java/org/apache/metron/rest/controller/SensorParserConfigControllerIntegrationTest.java
 ---
@@ -196,11 +198,17 @@ public void test() throws Exception {
 cleanFileSystem();
 this.sensorParserConfigService.delete("broTest");
 this.sensorParserConfigService.delete("squidTest");
-
+Method[] method = SensorParserConfig.class.getMethods();
+int numFields = 0;
+for(Method m : method) {
+  if(m.getName().startsWith("set")) {
--- End diff --

we should have a reflection utils method for getting these maybe.  Setters 
would also have to be checked for having one parameter and void return I think


---
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] metron pull request #717: METRON-1134: Allow parser command line options to ...

2017-08-25 Thread cestella
GitHub user cestella opened a pull request:

https://github.com/apache/metron/pull/717

METRON-1134: Allow parser command line options to be specified in the 
zookeeper parser config.

## Contributor Comments
It would be useful to maintain sensible defaults for various properties in 
the construction of parser topologies within the sensor parser config in 
zookeeper. This, along with a UI, would allow people to manage defaults per 
sensor in a single place. CLI should take precedent and override anything 
stored in zookeeper.

Manual testing via fulldev should focus on ensuring the following 
conditions hold for the properties able to be specified in the config:
* Specify the property in the config.
* Start parser and ensure that the property is preserved.
* Specify the property via the CLI param
* Start parser and ensure that the CLI param is honored

The properties able to be specified in the config are as follows: 
* `spoutParallelism` : The kafka spout parallelism (default to `1`).  This 
can be overridden on the command line.
* `spoutNumTasks` : The number of tasks for the spout (default to `1`). 
This can be overridden on the command line.
* `parserParallelism` : The parser bolt parallelism (default to `1`). This 
can be overridden on the command line.
* `parserNumTasks` : The number of tasks for the parser bolt (default to 
`1`). This can be overridden on the command line.
* `errorWriterParallelism` : The error writer bolt parallelism (default to 
`1`). This can be overridden on the command line.
* `errorWriterNumTasks` : The number of tasks for the error writer bolt 
(default to `1`). This can be overridden on the command line.
* `spoutConfig` : A map representing a custom spout config. This can be 
overridden on the command line.
* `securityProtocol` : The security protocol to use for reading from kafka. 
 This can be overridden on the command line and also specified in the spout 
config via the `security.protocol` key.  If both are specified, then they are 
merged and the CLI will take precedence.
* `stormConfig` : The storm config to use.  This can be overridden on the 
command line.  If both are specified, they are merged with CLI properties 
taking precedence.

## Pull Request Checklist

Thank you for submitting a contribution to Apache Metron.  
Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 for complete smoke testing guides.  


In order to streamline the review of the contribution we ask you follow 
these guidelines and ask you to double check the following:

### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? If not one needs to 
be created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
 
- [ ] Does your PR title start with METRON- where  is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
- [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?


### For code changes:
- [ ] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
- [ ] Have you included steps or a guide to how the change may be verified 
and tested manually?
- [ ] Have you ensured that the full suite of tests and checks have been 
executed in the root metron folder via:
  ```
  mvn -q clean integration-test install && build_utils/verify_licenses.sh 
  ```

- [ ] Have you written or updated unit tests and or integration tests to 
verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [ ] Have you verified the basic functionality of the build by building 
and running locally with Vagrant full-dev environment or the equivalent?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered by building and verifying the site-book? If not then run 
the following commands and the verify changes via 
`site-book/target/site/index.html`:

  ```
  cd site-book
  mvn site
  ```

 Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
It is also recommended that [travis-ci](https://travis-ci.org) is set up 
for your personal repository such that your branches are buil