)]}'
{"ceilometer/alarm/storage/impl_cassandra.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e1f0ffb329016d8e4d486a8e7c00163bfb605b76","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class Connection(base.Connection):"},{"line_number":103,"context_line":"    \"\"\"Stores alarm data in C*.\"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    CAPABILITIES \u003d utils.update_nested(base.Connection.CAPABILITIES,"},{"line_number":106,"context_line":"                                       AVAILABLE_CAPABILITIES)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_866417e6","line":103,"updated":"2014-11-13 10:00:08.000000000","message":"out of curiosity, i assume you use Cassandra but does it even make sense to store alarms in Cassandra ie. structured data, relatively small set (i\u0027m sure no one has millions of alarms set)","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"},{"author":{"_account_id":144,"name":"justinsb","email":"justin@fathomdb.com","username":"justin-fathomdb"},"change_message_id":"bb2507016011c55b868427d847515d23771264dd","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class Connection(base.Connection):"},{"line_number":103,"context_line":"    \"\"\"Stores alarm data in C*.\"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    CAPABILITIES \u003d utils.update_nested(base.Connection.CAPABILITIES,"},{"line_number":106,"context_line":"                                       AVAILABLE_CAPABILITIES)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_9de38132","line":103,"in_reply_to":"5a890539_866417e6","updated":"2014-11-13 12:53:02.000000000","message":"It\u0027s easier to manage one data store than two, so I imagine a lot of people will choose it for this reason.\n\nAlso, C* supports geographically distributed operation; I don\u0027t think any of the other back-end drivers do yet.  I think this could be very important for some use-cases.","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"ffcc7f2e7b3486ac248e5a4d53d3a44f7519b554","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        :param alarm: The alarm to create/update."},{"line_number":155,"context_line":"        \"\"\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        LOG.debug(\"Updating alarm: %s\", alarm)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        alarm_id \u003d alarm.alarm_id"},{"line_number":160,"context_line":"        row \u003d alarm.as_dict()"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_85aea4e4","line":157,"updated":"2014-11-14 09:32:43.000000000","message":"Log and exception messages should to be marked for translation by wrapping them with the underscore function like so LOG.debug(_(\"Updating alarm: %s\", alarm)). \"from ceilometer.openstack.common.gettextutils import _\" need for this.","commit_id":"d798591ed81b339fe38b028a431247daef4c454c"},{"author":{"_account_id":144,"name":"justinsb","email":"justin@fathomdb.com","username":"justin-fathomdb"},"change_message_id":"023e4b771e75d70da7bd23a057ae942047576978","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        :param alarm: The alarm to create/update."},{"line_number":155,"context_line":"        \"\"\""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        LOG.debug(\"Updating alarm: %s\", alarm)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        alarm_id \u003d alarm.alarm_id"},{"line_number":160,"context_line":"        row \u003d alarm.as_dict()"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_e40f4a86","line":157,"in_reply_to":"5a890539_85aea4e4","updated":"2014-11-15 15:54:33.000000000","message":"Good point - will do!","commit_id":"d798591ed81b339fe38b028a431247daef4c454c"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"ffcc7f2e7b3486ac248e5a4d53d3a44f7519b554","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                                               {\u0027alarm_id\u0027: alarm_id}, limit\u003d1)"},{"line_number":174,"context_line":"            for alarm in stored_alarm:"},{"line_number":175,"context_line":"                return self._row_to_alarm_model(alarm)"},{"line_number":176,"context_line":"            LOG.warning(\"Could not find alarm immediately after update: %s\","},{"line_number":177,"context_line":"                        alarm)"},{"line_number":178,"context_line":"            return None"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_c5b42c37","line":176,"updated":"2014-11-14 09:32:43.000000000","message":"Also need translation mark","commit_id":"d798591ed81b339fe38b028a431247daef4c454c"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"ffcc7f2e7b3486ac248e5a4d53d3a44f7519b554","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    def get_alarms(self, name\u003dNone, user\u003dNone, state\u003dNone, meter\u003dNone,"},{"line_number":188,"context_line":"                   project\u003dNone, enabled\u003dNone, alarm_id\u003dNone, pagination\u003dNone):"},{"line_number":189,"context_line":"        if pagination:"},{"line_number":190,"context_line":"            raise ceilometer.NotImplementedError(\u0027Pagination not implemented\u0027)"},{"line_number":191,"context_line":"        if meter:"},{"line_number":192,"context_line":"            raise ceilometer.NotImplementedError(\u0027Filter by meter not implemented\u0027)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_e584c85f","line":190,"updated":"2014-11-14 09:32:43.000000000","message":"Also need translation mark","commit_id":"d798591ed81b339fe38b028a431247daef4c454c"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"ffcc7f2e7b3486ac248e5a4d53d3a44f7519b554","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if pagination:"},{"line_number":190,"context_line":"            raise ceilometer.NotImplementedError(\u0027Pagination not implemented\u0027)"},{"line_number":191,"context_line":"        if meter:"},{"line_number":192,"context_line":"            raise ceilometer.NotImplementedError(\u0027Filter by meter not implemented\u0027)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        q \u003d {\u0027alarm_id\u0027: alarm_id,"},{"line_number":195,"context_line":"             \u0027name\u0027: name,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_257b307c","line":192,"updated":"2014-11-14 09:32:43.000000000","message":"Also need translation mark","commit_id":"d798591ed81b339fe38b028a431247daef4c454c"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"ffcc7f2e7b3486ac248e5a4d53d3a44f7519b554","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                    user_id\u003drow.user_id,"},{"line_number":232,"context_line":"                    project_id\u003drow.project_id,"},{"line_number":233,"context_line":"                    on_behalf_of\u003drow.on_behalf_of,"},{"line_number":234,"context_line":"                    timestamp\u003dcassandra_utils.timeuuid_to_timestamp("},{"line_number":235,"context_line":"                        row.event_id)))"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # We need to return these sorted by recentness (sadly)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_85e6a413","line":234,"updated":"2014-11-14 09:32:43.000000000","message":"In HBase we are using reversed timestamp for native descend sorting by ts[1]. Maybe it will be interesting for you.\n[1] - https://github.com/openstack/ceilometer/blob/master/ceilometer/storage/hbase/utils.py#L42","commit_id":"d798591ed81b339fe38b028a431247daef4c454c"},{"author":{"_account_id":144,"name":"justinsb","email":"justin@fathomdb.com","username":"justin-fathomdb"},"change_message_id":"023e4b771e75d70da7bd23a057ae942047576978","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                    user_id\u003drow.user_id,"},{"line_number":232,"context_line":"                    project_id\u003drow.project_id,"},{"line_number":233,"context_line":"                    on_behalf_of\u003drow.on_behalf_of,"},{"line_number":234,"context_line":"                    timestamp\u003dcassandra_utils.timeuuid_to_timestamp("},{"line_number":235,"context_line":"                        row.event_id)))"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # We need to return these sorted by recentness (sadly)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_441e5ebc","line":234,"in_reply_to":"5a890539_85e6a413","updated":"2014-11-15 15:54:33.000000000","message":"Yes - I was very inspired by the HBase driver - it was only by looking at it that I was able to convince myself that Cassandra support would be possible!\n\ntimeuuid has a few problems in Cassandra, but it is the recommended native type for this, so I think I should probably stick with it.\n\nCassandra can also sort on this, but I _think_ that it is normally better to sort on the (much easier to scale) python server than the (much harder to scale) database server.\n\nBut maybe I\u0027m still just stuck in a SQL mindset, and not in a Cassandra/HBase mindset!","commit_id":"d798591ed81b339fe38b028a431247daef4c454c"}],"ceilometer/storage/cassandra/connection.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e1f0ffb329016d8e4d486a8e7c00163bfb605b76","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from ceilometer.openstack.common import log"},{"line_number":33,"context_line":"from ceilometer.storage.cassandra import eventletreactor"},{"line_number":34,"context_line":"from ceilometer.storage.cassandra import inmemory as cassandra_inmem"},{"line_number":35,"context_line":"from ceilometer.storage.cassandra import utils as cassandra_utils"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_86c0977d","line":35,"updated":"2014-11-13 10:00:08.000000000","message":"seems like nothing in this module is tested... is it for testing or are you missing tests?","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"c20f04160c3df09c7983f100da0fa4d199260653","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from ceilometer.openstack.common import log"},{"line_number":33,"context_line":"from ceilometer.storage.cassandra import eventletreactor"},{"line_number":34,"context_line":"from ceilometer.storage.cassandra import inmemory as cassandra_inmem"},{"line_number":35,"context_line":"from ceilometer.storage.cassandra import utils as cassandra_utils"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_e01cda79","line":35,"in_reply_to":"5a890539_1dcf91b1","updated":"2014-11-13 13:22:35.000000000","message":"just asking, partly due to code size and partly due to me being way too lazy, but i have no idea what is being covered here. it seems like there\u0027s a bit of code that is used as an in_memory mock of cassandra... maybe we should move that to it\u0027s own folder for tests?","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"},{"author":{"_account_id":144,"name":"justinsb","email":"justin@fathomdb.com","username":"justin-fathomdb"},"change_message_id":"bb2507016011c55b868427d847515d23771264dd","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from ceilometer.openstack.common import log"},{"line_number":33,"context_line":"from ceilometer.storage.cassandra import eventletreactor"},{"line_number":34,"context_line":"from ceilometer.storage.cassandra import inmemory as cassandra_inmem"},{"line_number":35,"context_line":"from ceilometer.storage.cassandra import utils as cassandra_utils"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_1dcf91b1","line":35,"in_reply_to":"5a890539_86c0977d","updated":"2014-11-13 12:53:02.000000000","message":"Correct; it is tested indirectly, not directly.  I believe we have good code coverage of these functions.  What code coverage are you seeing?","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"},{"author":{"_account_id":144,"name":"justinsb","email":"justin@fathomdb.com","username":"justin-fathomdb"},"change_message_id":"c7b986043a1aad23cc2019f4b4a1b317f82c26d6","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from ceilometer.openstack.common import log"},{"line_number":33,"context_line":"from ceilometer.storage.cassandra import eventletreactor"},{"line_number":34,"context_line":"from ceilometer.storage.cassandra import inmemory as cassandra_inmem"},{"line_number":35,"context_line":"from ceilometer.storage.cassandra import utils as cassandra_utils"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_d9cb54a3","line":35,"in_reply_to":"5a890539_e01cda79","updated":"2014-11-13 15:51:50.000000000","message":"Good point.  Yes, the in-memory mock is only used by the tests (well, I guess you _could_ use it in production, but that doesn\u0027t make a whole lot of sense!)\n\nI modeled this after the HBase implementation though: I\u0027m now unsure whether it makes sense to inject the mock storage driver in the tests (Java-style) or whether to use a magic URL (HBase-driver-style)?","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"}],"ceilometer/tests/storage/test_storage_scenarios.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e1f0ffb329016d8e4d486a8e7c00163bfb605b76","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            if resource.resource_id !\u003d \u0027resource-id\u0027:"},{"line_number":137,"context_line":"                continue"},{"line_number":138,"context_line":"            first_ts \u003d resource.first_sample_timestamp"},{"line_number":139,"context_line":"            self.assertTrue(first_ts \u003c\u003d expected_first_sample_timestamp)"},{"line_number":140,"context_line":"            last_ts \u003d resource.last_sample_timestamp"},{"line_number":141,"context_line":"            self.assertTrue(last_ts \u003e\u003d expected_last_sample_timestamp)"},{"line_number":142,"context_line":"            self.assertEqual(resource.resource_id, \u0027resource-id\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_c6b53f32","line":139,"updated":"2014-11-13 10:00:08.000000000","message":"why?","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"},{"author":{"_account_id":144,"name":"justinsb","email":"justin@fathomdb.com","username":"justin-fathomdb"},"change_message_id":"bb2507016011c55b868427d847515d23771264dd","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            if resource.resource_id !\u003d \u0027resource-id\u0027:"},{"line_number":137,"context_line":"                continue"},{"line_number":138,"context_line":"            first_ts \u003d resource.first_sample_timestamp"},{"line_number":139,"context_line":"            self.assertTrue(first_ts \u003c\u003d expected_first_sample_timestamp)"},{"line_number":140,"context_line":"            last_ts \u003d resource.last_sample_timestamp"},{"line_number":141,"context_line":"            self.assertTrue(last_ts \u003e\u003d expected_last_sample_timestamp)"},{"line_number":142,"context_line":"            self.assertEqual(resource.resource_id, \u0027resource-id\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_5df599c9","line":139,"in_reply_to":"5a890539_c6b53f32","updated":"2014-11-13 12:53:02.000000000","message":"Good question.  I\u0027ll double-check!\n\nAt first glance, this looks like one of those little things that is actually really expensive, but I think it might just be expensive, not _really_ expensive ;-)","commit_id":"2a4716ec10b478deffaf2246e1be807976e32481"}]}
