This repository has been archived by the owner on May 12, 2021. It is now read-only.
METRON-2016: Parser aggregate groups should be persisted and available through REST #1346
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributor Comments
This PR adds a REST endpoint that manages parser groups in the global config. The endpoint exposes CRUD operations for a new
SensorParserGroup
object used to store a group name, description and sensor list.Changes Included
SensorParserGroup
type was added.ParserConfigurations
for converting the objects stored in the global config to an array ofSensorParserGroup
objects.SensorParserGroupController
,SensorParserGroupService
,SensorParserGroupServiceImpl
).StormAdminServiceImpl
andStormStatusServiceImpl
classes for converting aSensorParserGroup
to the corresponding Storm topology name.parser_commands.py
Ambari mpack script was updated to sort the sensors before starting/stopping topologies. This is needed so that both Ambari and REST can correctly generate a topology name from a list of sensors.ParserTopologyCLI
to use a constant sensor separator.Changes NOT Included
ParserTopologyCLI
still expects a comma-separated list of sensors when starting a topology. The concept of aSensorParserGroup
is limited to REST at this point. We could add group name support toParserTopologyCLI
but I don't see a requirement. If desired I believe this should be a follow on.Testing
This has been tested in full dev.
A 201 status with the new group should be returned.
You should get an error with an obvious and descriptive message.
You should get an error with an obvious and descriptive message.
You should get an error with an obvious and descriptive message.
You should get a 200 and the group should no longer be in the global config.
You should get a 404 since the group no longer exists.
"yaf,bro,snort",squid
. This will test the Ambari change to ensure sensors are sorted in the job name and multiple topologies are still supported. Restart the Parser component.bro__snort__yaf
andsquid
topologies are running with the Storm UI.group1
that contains thebro
,snort
andyaf
sensors:An
ACTIVE
status should be returned.group1
topology can be successfully stopped with REST:group1
topology can be successfully started with REST:Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines 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:
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:
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?
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
: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 is set up for your personal repository such that your branches are built there before submitting a pull request.