Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-1705 Create ProfilePeriod Using Period ID [Feature Branch] #1148

Conversation

nickwallen
Copy link
Contributor

In some cases you need to be able to create a ProfilerPeriod using an epoch timestamp. In other cases, you need to be able to create one using the period ID. The period ID is a monotonically increasing value which uniquely identifies each profile period.

Since both an epoch timestamp and a period ID are Longs, I created two separate factory methods to create a ProfilePeriod rather than using a public constructor directly. This makes it much more clear as to the intended purpose.

  • ProfilePeriod.fromTimestamp
  • ProfilePeriod.fromPeriodId

This is a pull request against the METRON-1699-create-batch-profiler feature branch.

Testing

  1. Launch the development environment.
  2. Ensure alerts are created in the Alerts UI.
  3. Ensure the Service Check in Ambari passes.
  4. Follow the instructions in the Profiler README to create a basic profile in the REPL.
  5. Follow the instructions in the Profiler README to create a simple profile using the Profiler topology in Storm.

Pull Request Checklist

  • 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?

@justinleet
Copy link
Contributor

+1, I was able to run this up and run through the readme.

@nickwallen
Copy link
Contributor Author

Many thanks... merged!

@nickwallen nickwallen closed this Aug 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants