The ceilometer.storage.impl_hbase Module

class ceilometer.storage.impl_hbase.Connection(url)[source]

Bases: ceilometer.storage.hbase.base.Connection, ceilometer.storage.base.Connection

Put the metering data into a HBase database

Collections:

  • meter (describes sample actually):

    • row-key: consists of reversed timestamp, meter and a message uuid for purposes of uniqueness

    • Column Families:

      f: contains the following qualifiers:

      • counter_name: <name of counter>

      • counter_type: <type of counter>

      • counter_unit: <unit of counter>

      • counter_volume: <volume of counter>

      • message: <raw incoming data>

      • message_id: <id of message>

      • message_signature: <signature of message>

      • resource_metadata: raw metadata for corresponding resource of the meter

      • project_id: <id of project>

      • resource_id: <id of resource>

      • user_id: <id of user>

      • recorded_at: <datetime when sample has been recorded (utc.now)>

      • flattened metadata with prefix r_metadata. e.g.:

        f:r_metadata.display_name or f:r_metadata.tag
        
      • rts: <reversed timestamp of entry>

      • timestamp: <meter’s timestamp (came from message)>

      • source for meter with prefix ‘s’

  • resource:

    • row_key: uuid of resource

    • Column Families:

      f: contains the following qualifiers:

      • resource_metadata: raw metadata for corresponding resource

      • project_id: <id of project>

      • resource_id: <id of resource>

      • user_id: <id of user>

      • flattened metadata with prefix r_metadata. e.g.:

        f:r_metadata.display_name or f:r_metadata.tag
        
      • sources for all corresponding meters with prefix ‘s’

      • all meters with prefix ‘m’ for this resource in format:

        "%s:%s:%s:%s:%s" % (rts, source, counter_name, counter_type,
        counter_unit)
        
clear()[source]
get_meter_statistics(sample_filter, period=None, groupby=None, aggregate=None)[source]

Return an iterable of models.Statistics instances.

Items are containing meter statistics described by the query parameters. The filter must have a meter value set.

Note

Due to HBase limitations the aggregations are implemented in the driver itself, therefore this method will be quite slow because of all the Thrift traffic it is going to create.

get_meters(user=None, project=None, resource=None, source=None, metaquery=None, limit=None, unique=False)[source]

Return an iterable of models.Meter instances

Parameters:
  • user – Optional ID for user that owns the resource.
  • project – Optional ID for project that owns the resource.
  • resource – Optional resource filter.
  • source – Optional source filter.
  • metaquery – Optional dict with metadata to match on.
  • limit – Maximum number of results to return.
  • unique – If set to true, return only unique meter information.
get_resources(user=None, project=None, source=None, start_timestamp=None, start_timestamp_op=None, end_timestamp=None, end_timestamp_op=None, metaquery=None, resource=None, limit=None)[source]

Return an iterable of models.Resource instances

Parameters:
  • user – Optional ID for user that owns the resource.
  • project – Optional ID for project that owns the resource.
  • source – Optional source filter.
  • start_timestamp – Optional modified timestamp start range.
  • start_timestamp_op – Optional start time operator, like ge, gt.
  • end_timestamp – Optional modified timestamp end range.
  • end_timestamp_op – Optional end time operator, like lt, le.
  • metaquery – Optional dict with metadata to match on.
  • resource – Optional resource filter.
  • limit – Maximum number of results to return.
get_samples(sample_filter, limit=None)[source]

Return an iterable of models.Sample instances.

Parameters:
  • sample_filter – Filter.
  • limit – Maximum number of results to return.
record_metering_data(data)[source]

Write the data to the backend storage system.

Parameters:data – a dictionary such as returned by ceilometer.meter.meter_message_from_counter
upgrade()[source]

Previous topic

The ceilometer.storage.impl_db2 Module

Next topic

The ceilometer.storage.impl_log Module

Project Source

This Page