GitHub user merrimanr opened a pull request:
https://github.com/apache/incubator-metron/pull/316
Initial implementation of REST service
This pull request is the first version of the REST API. I intentionally
kept it simple by including only one well understood service: CRUD interface
for SensorParserConfigs. While I feel it's solid (100% test coverage,
integration tests that leverages in-memory component testing infrastructure, no
PMD warnings, etc), there are several areas that should be reviewed:
- Maven POM files
- Is it consistent with other Metron components?
- Are any plugins missing?
- API structure
- what should the paths look like?
- Project structure
- Is the code in the right place?
- Response behavior
- What should clients see on failures? Should 500 codes be returned?
I'm sure there are other issues I'm not thinking of. Once we can come to a
consensus on this initial PR, other services can be added that follow the same
patterns we establish here.
This can be tested by either running the unit/integration tests or running
the service against a vagrant environment. To do the latter:
- Build the quick-dev environment
- Run "mvn clean package" from within metron-rest
- Start the service by running "java -jar target/metron-rest-0.2.1BETA.jar"
- Test the REST service (running "curl
http://localhost:8080/api/v1/sensorParserConfigs" should return all the parser
configs loaded during the quick-dev build)
There is much more to do (deployment, packaging, etc) but this should get
us started.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/merrimanr/incubator-metron METRON-503
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-metron/pull/316.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 #316
----
commit b7d310ede8785f411c9a4518207dfa3ef77983b3
Author: rmerriman <[email protected]>
Date: 2016-10-19T15:24:52Z
Initial implementation of REST service
commit 77e79aba34e992c951ee804d918aea1e70b638ec
Author: rmerriman <[email protected]>
Date: 2016-10-19T15:31:18Z
added newline at the end of application.yml
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---