This repository has been archived by the owner on May 12, 2021. It is now read-only.
METRON-392 Allow User to Define Custom 'Group By' for a Profile #230
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#231 includes the necessary Stellar date functions to handle the common uses cases of grouping by day of week, etc. |
@@ -49,7 +65,7 @@ | |||
|
|||
public ProfileHBaseMapper() { | |||
setColumnFamily("P"); | |||
setSaltDivisor(1000); | |||
setSaltDivisor(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you setting the salt divisor to 0? Under what situations would you not need a salt? I'm especially concerned that this appears to be the default behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored default to 1000. Thanks
@cestella Updated the PR based on your feedback. Let me know what you think. |
+1, looks good post master merge |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
METRON-392
Allows a user to optionally define a custom set of 'groupBy' expressions that controls how the data is persisted. This is intended to allow for contiguous scans when training on subsets of the data.
The 'groupBy' expressions can refer to any field within a
ProfileMeasurement
. This includes the following fields:profileName
: The name of the profile.entity
: The name of the entity being profiled.start
: The window start time in milliseconds from the epoch.end
: The window end time in milliseconds from the epoch.value
: The summary value calculated over the window period.groupBy
: The set of 'groupBy' expressions; not the result of those expressions.A common use case would be grouping the data by day of week. This would allow a contiguous scan to access all profile data for Mondays only. The Stellar expression
DAY_OF_WEEK(start)
would achieve this.NOTE: A series of date functions will be added to Stellar in a follow-on PR to enhance the types of groups that can be created.
Example
Testing
To test this change do the following.