nickwallen opened a new pull request #1486: METRON-2220 Upgrade Streaming 
Enrichments for HBase 2.0.2
URL: https://github.com/apache/metron/pull/1486
 
 
   This change upgrades the Streaming Enrichment Writer to work with HBase 
2.0.2.
   * This PR is for the `feature/METRON-2088-support-HDP-3.1` feature branch.
   
   ## Changes
   
   1. Updated Streaming Enrichments to use an `HBaseClient`.
   
   1. Updated Streaming Enrichments tests to use a `FakeHBaseClient`.
   
   ## Acceptance Testing
   
   ### Basics
   
     Verify data is flowing through the system, from parsing to indexing
   
     1. Open Ambari and navigate to the Metron service 
http://node1:8080/#/main/services/METRON/summary
   
     1. Open the Alerts UI
   
     1. Verify alerts show up in the main UI - click the search icon (you may 
need to wait a moment for them to appear)
   
     1. Head back to Ambari and select the Kibana service 
http://node1:8080/#/main/services/KIBANA/summary
   
     1. Open the Kibana dashboard via the "Metron UI" option in the quick links
   
     1. Verify the dashboard is populating
   
   ###  Streaming Enrichments and Enrichment Stellar Functions in the REPL
   
     1. Create a Streaming Enrichment [by following these 
instructions](https://cwiki.apache.org/confluence/display/METRON/2016/06/16/Metron+Tutorial+-+Fundamentals+Part+6%3A+Streaming+Enrichment).
   
     1. Define the streaming enrichment and save it as a new source of 
telemetry.
   
         ```
         [Stellar]>>> conf := SHELL_EDIT(conf)
         {
           "parserClassName": "org.apache.metron.parsers.csv.CSVParser",
           "writerClassName": 
"org.apache.metron.writer.hbase.SimpleHbaseEnrichmentWriter",
           "sensorTopic": "user",
           "parserConfig": {
             "shew.table": "enrichment",
             "shew.cf": "t",
             "shew.keyColumns": "ip",
             "shew.enrichmentType": "user",
             "columns": {
               "user": 0,
               "ip": 1
             }
           }
         }
         [Stellar]>>>
         [Stellar]>>> CONFIG_PUT("PARSER", conf, "user")
         ```
   
     1. Go to the Management UI and start the new parser called 'user'.
   
     1. Create some test telemetry.
         ```
         [Stellar]>>> msgs := ["user1,192.168.1.1", "user2,192.168.1.2", 
"user3,192.168.1.3"]
         [user1,192.168.1.1, user2,192.168.1.2, user3,192.168.1.3]
         [Stellar]>>> KAFKA_PUT("user", msgs)
         3
         [Stellar]>>> KAFKA_PUT("user", msgs)
         3
         [Stellar]>>> KAFKA_PUT("user", msgs)
         3
         ```
   
     1. Ensure that the enrichments are persisted in HBase.
         ```
         [Stellar]>>> ENRICHMENT_GET('user', '192.168.1.1', 'enrichment', 't')
         {original_string=user1,192.168.1.1, 
guid=a6caf3c1-2506-4eb7-b33e-7c05b77cd72c, user=user1, timestamp=1551813589399, 
source.type=user}
   
         [Stellar]>>> ENRICHMENT_GET('user', '192.168.1.2', 'enrichment', 't')
         {original_string=user2,192.168.1.2, 
guid=49e4b8fa-c797-44f0-b041-cfb47983d54a, user=user2, timestamp=1551813589399, 
source.type=user}
   
         [Stellar]>>> ENRICHMENT_GET('user', '192.168.1.3', 'enrichment', 't')
         {original_string=user3,192.168.1.3, 
guid=324149fd-6c4c-42a3-b579-e218c032ea7f, user=user3, timestamp=1551813589402, 
source.type=user}
         ```
   
   ## Pull Request Checklist
   
   - [x] 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).
   - [x] 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.
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   - [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
   - [x] Have you included steps or a guide to how the change may be verified 
and tested manually?
   - [x] Have you ensured that the full suite of tests and checks have been 
executed in the root metron folder via:
   - [x] Have you written or updated unit tests and or integration tests to 
verify your changes?
   - [x] 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)?
   - [x] Have you verified the basic functionality of the build by building and 
running locally with Vagrant full-dev environment or the equivalent?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to