'Write the data to the backend storage system.
:param data: a dictionary such as returned by
ceilometer.publisher.utils.meter_message_from_counter'

def record_metering_data(self, data):

    data.pop('monotonic_time', None)
    with self.conn_pool.connection() as conn:
        resource_table = conn.table(self.RESOURCE_TABLE)
        meter_table = conn.table(self.METER_TABLE)
        resource_metadata = data.get('resource_metadata', {})
        rts = hbase_utils.timestamp(data['timestamp'])
        new_meter = hbase_utils.prepare_key(rts, data['source'], data['counter_name'], data['counter_type'], data['counter_unit'])
        resource = hbase_utils.serialize_entry(**{'source': data['source'], 'meter': {new_meter: data['timestamp']}, 'resource_metadata': resource_metadata, 'resource_id': data['resource_id'], 'project_id': data['project_id'], 'user_id': data['user_id']})
        ts = int((time.mktime(data['timestamp'].timetuple()) * 1000))
        resource_table.put(hbase_utils.encode_unicode(data['resource_id']), resource, ts)
        row = hbase_utils.prepare_key(data['counter_name'], rts, data['message_id'])
        record = hbase_utils.serialize_entry(data, **{'source': data['source'], 'rts': rts, 'message': data, 'recorded_at': timeutils.utcnow()})
        meter_table.put(row, record)
