Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Conversation

@merrimanr
Copy link
Contributor

@merrimanr merrimanr commented Apr 19, 2019

Contributor Comments

This primary purpose of this PR is to remove the Storm dependencies from metron-indexing. There is a single HDFSIndexingIntegrationTest class that requires storm because it tests the Storm HDFS indexing topology. There are also indexing topology integration tests, flux files and start scripts for Solr and Elasticsearch so the metron-solr and metron-elasticsearch modules were also split into seperate common and storm modules as well. The module structure ended up like this:

  • metron-indexing
    • metron-indexing-common (contains everything in legacy metron-indexing except HDFSIndexingIntegrationTest
    • metron-indexing-storm (contains the base IndexingIntegrationTest along with HDFSIndexingIntegrationTest
  • metron-elasticsearch
    • metron-elasticsearch-common (contains common ES code including IndexDao implementations)
    • metron-elasticsearch-storm (contains integration tests, flux files and start script)
  • metron-solr
    • metron-solr-common (contains common Solr code including IndexDao implementations)
    • metron-solr-storm (contains integration tests, flux files and start script)

Testing

All unit and integration tests should be passing. I am in the process of spinning up full dev and validating with these test instructions. In addition to those instructions I also enabled Solr and ensured:

  • Data was being indexed with no errors in the topologies
  • Data was visible in the Alerts UI

I had to use our $METRON_HOME/bin/install_solr.sh script because the HDP Search 3 Mpack no longer works. In this case your Solr zookeeper setting will be different (I believe it's node1:9983).

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:

  • Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
  • Does your PR title start with METRON-XXXX where XXXX 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 && dev-utilities/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?

  • 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 is set up for your personal repository such that your branches are built there before submitting a pull request.

@ottobackwards
Copy link
Contributor

If those modules only create tests, can we put testing or something in the name?

Copy link
Contributor

@mmiklavc mmiklavc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission @merrimanr. Can you touch up the module contents per my other comment regarding flux files?

I think we might need a couple other things as well:

  1. READMEs for the new modules (and make sure site-book looks good)
  2. Updates to the old module READMEs (and make sure site-book looks good)
  3. Update to the RPM list - where is the deployable unit index-storm, and do we actually need a separate item for indexing-common? I needed to do this is metron-enrichment-common bc we had non-storm-specific configuration that was deployed via the common module/RPM.

@Override
public String getFluxPath() {
return "../metron-indexing/src/main/flux/indexing/batch/remote.yaml";
return "../metron-indexing-common/src/main/flux/indexing/batch/remote.yaml";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be Storm artifacts in *-common? Probably should be metron-indexing-storm, and will impact the metron.spec as well.

@merrimanr
Copy link
Contributor Author

The latest commit moves storm files in metron-indexing-common to metron-indexing-storm. I'm still working on the READMEs and will have that change out soon. Otherwise this is ready for functional testing.

@mmiklavc
Copy link
Contributor

mmiklavc commented May 9, 2019

The latest commit moves storm files in metron-indexing-common to metron-indexing-storm. I'm still working on the READMEs and will have that change out soon. Otherwise this is ready for functional testing.

If you've gone through the testing instructions, can you check the PR checklist off for it as well?

@merrimanr
Copy link
Contributor Author

After another round of testing I realized that we also need to separate metron-elasticsearch and metron-solr into separate common and storm modules. This is because the indexing topology depends on uber jars built from the these modules. The storm modules for each now contain flux property files, start scripts, and indexing integration tests. The benefit of this is that the awkwardness of modules in metron-indexing that only contain a single test goes away. The metron-indexing-storm-elasticsearch module in metron-indexing is now metron-elasticsearch-storm and likewise for metron-indexing-storm-solr.

The changes were fairly straightforward except for the pom.xml files. I ran into similar class version issues that we commonly run into when refactoring. The metron-elasticsearch-storm module was particularly tricky. I believe this is caused by our use of a dedicated elasticsearch-shaded module that makes the dependency tree more difficult to follow. The solution was to just include this module dependency at the top of the metron-elasticsearch-storm pom.

Other changes included updating paths in various tests since the module structure changed and modules containing these tests are now a level deeper. Other than that the only changes involved were just moving files.

I ran through another round of tests (based on instructions in #1368) and everything seems to be working well. I also tested the various meta alert functions in the Alerts UI. I found a bug (https://issues.apache.org/jira/browse/METRON-2119) but I believe it is preexisting and unrelated to this work.

Copy link
Contributor

@nickwallen nickwallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @merrimanr . I like what you have. Here is some initial feedback. After you resolve the merge conflicts, I will take it for a test drive.

This package installs the Metron Indexing files

%files indexing
%files indexing-common
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing the indexing-common RPM does is install a few configuration files for the sample sensors, right? Seems like a waste, but maybe there is not a good alternative right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was being careful not to change anything. Happy to discuss removing them.

merrimanr added 4 commits May 24, 2019 16:31
# Conflicts:
#	metron-platform/metron-elasticsearch/pom.xml
#	metron-platform/metron-indexing/README.md
#	metron-platform/metron-indexing/pom.xml
#	metron-platform/metron-solr/pom.xml
@merrimanr
Copy link
Contributor Author

Merge conflicts are resolved and I'll have the READMEs done shortly. It should be ready to test now.

@nickwallen
Copy link
Contributor

+1 Thanks @merrimanr !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants