-
Notifications
You must be signed in to change notification settings - Fork 10
feat/AnalyticsAggregator add page for Aggregating Raw Events #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mgillian
wants to merge
7
commits into
uPortal-Project:master
Choose a base branch
from
mgillian:feat/AnalyticsAggregator
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4ebd54f
feat/AnalyticsAggregator add page for Aggregating Raw Events
mgillian 855144e
feat/AnalyticsAggregator fix spelling errors
mgillian 707ddfb
Update manuals/en/uportal5-manual/developer/events/AggregationDevelop…
mgillian 085e8f9
Update manuals/en/uportal5-manual/developer/events/AggregationDevelop…
mgillian bfc3dd6
Update manuals/en/uportal5-manual/developer/events/AggregationDevelop…
mgillian cf6cfaf
Update manuals/en/uportal5-manual/developer/events/AggregationDevelop…
mgillian 6bfc640
Update manuals/en/uportal5-manual/developer/events/AggregationDevelop…
mgillian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
manuals/en/uportal5-manual/developer/events/AggregationDevelopment.md
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Aggregation for Raw Events | ||
|
|
||
|
|
||
|
|
||
| ## Writing a new Aggregator | ||
|
|
||
| PortalRawEventsAggregatorImpl is the driver behind the aggregation process for Raw Events. The method doAggregateRawEvents handles transaction management and calls doAggregationRawEventsInternal. doAggregationRawEventsInternal is the method that iterates over all of the newly processed events. | ||
|
|
||
| Events are selected within the portalEventDao.aggregatePortalEvents() call, which passes in a AggregateEventsHandler lambda to be called for each event. portalEventDao refers to an interface IPortalEventDao, which is implemented as a bean by JpaPortalEventStore. This class finds all of the events to process and iterates over each event, | ||
mgillian marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| passing the AggregateEventsHandler as a parameter. | ||
|
|
||
| AggregateEventsHandler is defined within PortalRawEventsAggregateImpl as an internal class. Its job is to identify all of the aggregates that are defined and call each of them for every record. In the default uPortal-start environment, there are several aggregators that are called for each event. | ||
|
|
||
| AggregateEventsHandler is a lambda, and its magic occurs in the apply() method. It has two interesting phases. | ||
|
|
||
| 1. For IntervalAwarePortalEventAggregator classes, it will make sure that handle time boundary crossings are cleaned up. For example, if a record is processed at 1:59:59 and the next record is processed at 2:00:01, this would cross the HOUR boundary and force the previously aggregated records that recognize that boundary crossing to be flushed. | ||
| 2. Every class that implements IntervalAwarePortalEventAggregator or SimplePortalEventAggregator is processed for each record, based on which classes are available as beans to the application. | ||
|
|
||
| ### SimplePortalEventAggregator | ||
|
|
||
| This is a simple aggregator, as it does not care about time interval boundary crossings by default. It simply executes the class's aggregateEvent method over the event. This logic can be as simple or as complicated as defined. The simplest implementation is the org.apereo.portal.events.aggr.LoggingPortalEventAggregator, which simply writes to the log when an event is processed. There is no additional filtering or logic. | ||
|
|
||
| A slightly more complicated simple aggregator is org.apereo.portal.events.aggr.analytics.AnalyticsEventAggregator. This aggregator simply grabs the data structure for the event and writes it to its own table UP_ANALYTICS_EVENTS, managed by class org.apereo.portal.events.handlers.db.PersistentAnalyticsEvent. | ||
mgillian marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### IntervalAwarePortalEventAggregator | ||
|
|
||
| Classes that implement this interface are the main reason for the aggregator. They are designed to group events into a single record, which is then persistent into another UP Aggregation table. Much configuration is provided for free by the PortalRawEventsAggregatorImpl class. Things like transaction management and time boundaries are automatically handled. One significant example that implements this interface is org.apereo.portal.events.aggr.portletexec.PortletExecutionAggregator. | ||
mgillian marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Refer to https://apereo.atlassian.net/wiki/spaces/UPM41/pages/103942255/Event+Logging for additional information. | ||
|
|
||
|
|
||
mgillian marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.