nickwallen opened a new pull request #1458: METRON-2177 Upgrade Profiler for 
HBase 2.0.2
URL: https://github.com/apache/metron/pull/1458
 
 
   This change updates the Profiler to function with HBase 2.0.2.
   * This PR is for the `feature/METRON-2088-support-HDP-3.1` feature branch.
   - [ ] This PR is dependent on #1456 . The diff will show those changes here 
until that PR is merged.
   - [ ] I need to complete the acceptance testing after #1456 is merged.
   
   ## Changes
   
   * Added a new method to the Stellar function resolver; 
`FunctionResolver.withInstance`.  This makes it possible to instrument and 
setup a Stellar function for testing, but also rely on the existing function 
resolution system for tests.
   
   * Altered `HBaseProfilerClient` to use the `HBaseClient` abstraction.
   
   * Created the `ProfilerClientFactory` and `HBaseProfilerClientFactory` that 
contains common code for creating a `ProfilerClient`.  This code was being 
duplicated in some of the different Stellar functions related to the Profiler.  
This also makes it simpler to test this common code.
   
   ## Acceptance Testing
   
   1. Ensure that we can continue to parse, enrich, and index telemetry.  
Launch the development environment and ensure that telemetry is visible within 
the Alerts UI.  
   
   ### Profiler in the REPL
   
   1. Test a profile in the REPL according to [these 
instructions](https://github.com/apache/metron/tree/master/metron-analytics/metron-profiler-repl#getting-started).
   
       ```
       [Stellar]>>> values := PROFILER_FLUSH(profiler)
       [{period={duration=900000, period=1723089, start=1550780100000, 
end=1550781000000}, profile=hello-world, groups=[], value=4, 
entity=192.168.138.158}]
       ```
   
   ### Streaming Profiler
    
   1. Deploy that profile to the Streaming Profiler in Storm.
   
       ```
       [Stellar]>>> CONFIG_PUT("PROFILER", conf)
       ```
   
   1. Wait for the Streaming Profiler in Storm to flush and retrieve the 
measurement from HBase.  
   
       For the impatient, you can reset the period duration to 1 minute. 
Alternatively, you can allow the Profiler topology to work for a minute or two 
and then kill the `profiler` topology which will force it to flush a profile 
measurement to HBase.
   
       Retrieve the measurement from HBase.  Prior to this PR, it was not 
possible to query HBase from the REPL.
       ```
       [Stellar]>>> 
PROFILE_GET("hello-world","192.168.138.158",PROFILE_FIXED(30,"DAYS"))
       [2979]
       ```
   
   ### Batch Profiler
   
   1. Install Spark using Ambari.
   
       1. Stop Storm, YARN, Elasticsearch, Kibana, and Kafka.
   
       1. Install Spark2 using Ambari.
   
       1. Ensure that Spark can talk with HBase.
           ```
           cp /etc/hbase/conf/hbase-site.xml /etc/spark2/conf/
           ```
   
   1. Use the Batch Profiler to back-fill your profile.  To do this, follow the 
direction [provided 
here](https://github.com/apache/metron/tree/master/metron-analytics/metron-profiler-spark#getting-started).
   
   1. Retrieve the entire profile, including the back-filled data.
   
       ```
       [Stellar]>>> 
PROFILE_GET("hello-world","192.168.138.158",PROFILE_FIXED(30,"DAYS"))
       [1203, 2849, 2900, 1944, 1054, 1241, 1721]
       ```
   
   ## 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)?
   - [ ] 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