Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Data Storage Considerations

The raw and aggregate events databases can take a considerable amount of space. The default configuration is fairly conservative, only retaining 1 hour worth of raw and only aggregating a limited set of time intervals and groups. To make space management and upgrades easier it is recommended to place the raw and aggregate events tables in their own schemas or databases.

DataSource Configurations

To better manage the storage and performance requirements of the raw event and aggregate event data sets these can be moved into their own databases.

Step 1: To configure separate JDBC connection information for these data sets edit uportal-war/src/main/resources/properties/rdbm.properties and change the RawEvents and AggrEvents database configuration.

 

rdbm.properties
##### uPortal Raw Events DB
RawEventsJdbcDriver=${environment.build.hibernate.connection.driver_class}
RawEventsJdbcUrl=${environment.build.hibernate.connection.url}
RawEventsJdbcUser=${environment.build.hibernate.connection.username}
RawEventsJdbcPassword=${environment.build.hibernate.connection.password}

##### uPortal Aggregate Events DB
AggrEventsJdbcDriver=${environment.build.hibernate.connection.driver_class}
AggrEventsJdbcUrl=${environment.build.hibernate.connection.url}
AggrEventsJdbcUser=${environment.build.hibernate.connection.username}
AggrEventsJdbcPassword=${environment.build.hibernate.connection.password}

 

Step 2: After modifying the rdbm.properties file to store the events to a different database,  perform either of the following:

  1. ant initdb  (BEWARE: performing this command will re-initialize your entire database, use with caution. )
  2. ant db-hibernate-raw-events and/or ant db-hibernate-aggr-events 

Persistent Event Filtering

The default configuration results in all PortalEvents being persisted to the RawEvents database. To exclude certain events, filters can be configured in the listenerEventFilters list in uportal-war/src/main/resources/properties/contexts/eventHandlerContext.xml. There is provided support for filtering events as supported or ignored by type and by the user the event was generated for.  

listenerEventFilters list in eventHandlerContext.xml
<!-- 
 | List of event filters to apply to all event listeners that handle newly fired events.
 +-->
<util:list id="listenerEventFilters">
    <!-- Can be used to filter events based on event type using an instanceof check -->
    <bean class="org.jasig.portal.spring.context.ClassApplicationEventFilter">
        <property name="supportedEvents">
            <list>
                <value>org.jasig.portal.events.PortalEvent</value>
            </list>
        </property>
        <!-- Can configure a list of events to ignore based on event type using an instanceof check. For examle
             you can ignore all PortletExecutionEvents.
        <property name="ignoredEvents">
            <list>
                <value>org.jasig.portal.events.PortletExecutionEvent</value>
            </list>
        </property>
        -->
    </bean>
    <!-- Can be used to filter events based on who generated the event
    <bean class="org.jasig.portal.events.handlers.UserFilteringPortalEventHandler">
        <property name="ignoredUserNamePatterns">
            <list>
                <value>user\..*</value>
                <value>vptest-user.*</value>
            </list>
        </property>
        <property name="supportGuest" value="true" />
    </bean>
     -->
</util:list>

For the list of available event types you can filter, see all the subclasses of PortalEvent; e.g. 

Purging Persistent Events

The Event Aggregation process also handles purging of aggregated events. The default configuration is to purge raw event data 1 hour after it has been aggregated. This window size can be changed by setting the org.jasig.portal.events.aggr.PortalEventPurgerImpl.purgeDelay property in uportal-war/src/main/resources/properties/portal.properties

 

  • No labels