Enable event feature on HBase¶
Currently events feature is implemented only on SQLAlchemy backend, so choosing another database events are not supported.
The usecase is to store events in HBase and to get events (event’s types, traits, trait’s types) from this database.
The main idea is to implement event feature in way like it was done on SQLAlchemy driver.
to get all events that were created in a specified period of time
to get events by event’s type
to get events by event’s message id
to get events by trait’s description, type, and value
to get all event’s types that were stored
to get all trait types belonging to specific event type
to get all traits that could be found in specific event’s type, and optionally with specific trait type.
Add new methods in ceilometer.storage.impl_hbase.py for storing and getting events from database. Basing on events implementation for SQL database we should create next methods:
record_event – method for storing collected events into HBase
get_events – method for getting events from HBase with specified filters: - period of event’s generation time - event’s type - event’s message id - trait’s description, type, and value (here should be taken into account possible operations on values, for ex: <lt, le, eq, ne, ge, gt>)
get_event_types – method for getting all event’s types that were stored in database.
get_trait_types – method returns all trait types for all stored event types or only for one event’s type if it is specified.
get_traits – method returns all traits for certain event type, or traits for specified trait’s type if type is defined.
Data model impact¶
We will need to add new collection into HBase for events
- row_key: timestamp of event’s generation + uuid of event
in format: “%s+%s” % (ts, Event.message_id) If we store events with such row_key they are sorted by timestamp in the database.
- -Column Families:
- f: contains the following qualifiers:
-event_type: description of event’s type -timestamp: time stamp of event generation -all traits for this event in format “%s+%s” % (trait_name, trait_type)
REST API impact¶
Other end user impact¶
Other deployer impact¶
- Primary assignee:
- Ongoing maintainer:
Create new method for event feature implementation on HBase
Test method in unit tests
This code will be tested in unit tests for event feature