)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"dafad9860f465e55b0764e9a863ea7bb65764bad","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Yunhong, Jiang \u003cyunhong.jiang@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-01-30 19:04:26 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Muitiple publisher pipeline framework"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"With multiple publisher support, a meter data can be sent to multiple"},{"line_number":10,"context_line":"conduit, like message bus, CW API etc."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAM3%2F%2FQNE%3D","line":7,"updated":"2013-01-31 09:02:43.000000000","message":"Multiple!","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Yunhong, Jiang \u003cyunhong.jiang@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-01-30 19:04:26 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Muitiple publisher pipeline framework"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"With multiple publisher support, a meter data can be sent to multiple"},{"line_number":10,"context_line":"conduit, like message bus, CW API etc."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAM3%2F%2FQIg%3D","line":7,"in_reply_to":"AAAAM3%2F%2FQNE%3D","updated":"2013-01-31 10:10:05.000000000","message":"Oops, even misspelling in the title :(\n\nDone","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"dafad9860f465e55b0764e9a863ea7bb65764bad","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Pipeline framework transfers the data from pollster and notification"},{"line_number":13,"context_line":"handler to the publisher, through multiple pipelines."},{"line_number":14,"context_line":"Each pipeline is composed of 1 or more transformers and one or more"},{"line_number":15,"context_line":"publishers. The transformer transformed the data, like summary, drop,"},{"line_number":16,"context_line":"delta etc."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"For bp: multi-publisher"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAM3%2F%2FQNA%3D","line":15,"updated":"2013-01-31 09:02:43.000000000","message":"\"transforms data\"","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Pipeline framework transfers the data from pollster and notification"},{"line_number":13,"context_line":"handler to the publisher, through multiple pipelines."},{"line_number":14,"context_line":"Each pipeline is composed of 1 or more transformers and one or more"},{"line_number":15,"context_line":"publishers. The transformer transformed the data, like summary, drop,"},{"line_number":16,"context_line":"delta etc."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"For bp: multi-publisher"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAM3%2F%2FQIc%3D","line":15,"in_reply_to":"AAAAM3%2F%2FQNA%3D","updated":"2013-01-31 10:10:05.000000000","message":"Done","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"}],"ceilometer/pipeline.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \"\"\"Sample handling pipeline"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    Pipeline describes a chain of handlers. The chain starts with tranformer,"},{"line_number":53,"context_line":"    includes 0~multiple tranformers as middle step, and ends with publishers."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    The first transformer in the chain gets sample from data collector, i.e."},{"line_number":56,"context_line":"    pollster or notification handler, takes some action like dropping,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1dY%3D","line":53,"updated":"2012-12-13 12:28:31.000000000","message":"typo? \"0~\"","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \"\"\"Sample handling pipeline"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    Pipeline describes a chain of handlers. The chain starts with tranformer,"},{"line_number":53,"context_line":"    includes 0~multiple tranformers as middle step, and ends with publishers."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    The first transformer in the chain gets sample from data collector, i.e."},{"line_number":56,"context_line":"    pollster or notification handler, takes some action like dropping,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0a4%3D","line":53,"in_reply_to":"AAAAMX%2F%2F1dY%3D","updated":"2012-12-16 10:10:29.000000000","message":"Not typo. It means possibly only one transformer and ends with publisher, without anymore transformer as middle step.\n\nPossibly should be \"The chain starts with one or more transformers and ends with one or more publishers\".","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    aggregation, changing field etc, then passes the updated sampler to next"},{"line_number":58,"context_line":"    step."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    The followed transformers, if any, handle the data similarly."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    In the end of the chain, publishers publish the data. The exact publishing"},{"line_number":63,"context_line":"    method depends on publisher type, for example, pushing into data storage"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1dU%3D","line":60,"updated":"2012-12-13 12:28:31.000000000","message":"s/followed/subsequent/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    aggregation, changing field etc, then passes the updated sampler to next"},{"line_number":58,"context_line":"    step."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    The followed transformers, if any, handle the data similarly."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    In the end of the chain, publishers publish the data. The exact publishing"},{"line_number":63,"context_line":"    method depends on publisher type, for example, pushing into data storage"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0a0%3D","line":60,"in_reply_to":"AAAAMX%2F%2F1dU%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self, counters, transformers, publishers):"},{"line_number":69,"context_line":"        super(Pipeline, self).__init__()"},{"line_number":70,"context_line":"        self.counters \u003d counters"},{"line_number":71,"context_line":"        self.publishers \u003d publishers"},{"line_number":72,"context_line":"        self.transformers \u003d transformers"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1dQ%3D","line":69,"updated":"2012-12-13 12:28:31.000000000","message":"Is this line needed, given that Pipeline derives from object?","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self, counters, transformers, publishers):"},{"line_number":69,"context_line":"        super(Pipeline, self).__init__()"},{"line_number":70,"context_line":"        self.counters \u003d counters"},{"line_number":71,"context_line":"        self.publishers \u003d publishers"},{"line_number":72,"context_line":"        self.transformers \u003d transformers"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0ac%3D","line":69,"in_reply_to":"AAAAMX%2F%2F1dQ%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        super(Pipeline, self).__init__()"},{"line_number":70,"context_line":"        self.counters \u003d counters"},{"line_number":71,"context_line":"        self.publishers \u003d publishers"},{"line_number":72,"context_line":"        self.transformers \u003d transformers"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":75,"context_line":"        \"\"\"Push counter into pipeline for publishing."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1dI%3D","line":72,"updated":"2012-12-13 12:28:31.000000000","message":"Neater to order these assignments to match the parameter order in the function signature.","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        super(Pipeline, self).__init__()"},{"line_number":70,"context_line":"        self.counters \u003d counters"},{"line_number":71,"context_line":"        self.publishers \u003d publishers"},{"line_number":72,"context_line":"        self.transformers \u003d transformers"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":75,"context_line":"        \"\"\"Push counter into pipeline for publishing."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0aY%3D","line":72,"in_reply_to":"AAAAMX%2F%2F1dI%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self.transformers \u003d transformers"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":75,"context_line":"        \"\"\"Push counter into pipeline for publishing."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        Each transformer will get two data, one is the original counter"},{"line_number":78,"context_line":"        which will not be changed by the transformer chains"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1dE%3D","line":75,"updated":"2012-12-13 12:28:31.000000000","message":"s/counter/counters/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self.transformers \u003d transformers"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":75,"context_line":"        \"\"\"Push counter into pipeline for publishing."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        Each transformer will get two data, one is the original counter"},{"line_number":78,"context_line":"        which will not be changed by the transformer chains"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0aU%3D","line":75,"in_reply_to":"AAAAMX%2F%2F1dE%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":75,"context_line":"        \"\"\"Push counter into pipeline for publishing."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        Each transformer will get two data, one is the original counter"},{"line_number":78,"context_line":"        which will not be changed by the transformer chains"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        Another one is the transformed data which will be published later."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1dA%3D","line":77,"updated":"2012-12-13 12:28:31.000000000","message":"s/will get two data/will get two pieces of data/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":75,"context_line":"        \"\"\"Push counter into pipeline for publishing."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        Each transformer will get two data, one is the original counter"},{"line_number":78,"context_line":"        which will not be changed by the transformer chains"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        Another one is the transformed data which will be published later."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0aQ%3D","line":77,"in_reply_to":"AAAAMX%2F%2F1dA%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        Such arrangement is to simplify the transformer implementation, so"},{"line_number":83,"context_line":"        that it can always refers to the original data"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        param counters: a list of counters"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1c8%3D","line":83,"updated":"2012-12-13 12:28:31.000000000","message":"s/refers/refer/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        Such arrangement is to simplify the transformer implementation, so"},{"line_number":83,"context_line":"        that it can always refers to the original data"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        param counters: a list of counters"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0aM%3D","line":83,"in_reply_to":"AAAAMX%2F%2F1c8%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                                                  counter_pairs,"},{"line_number":94,"context_line":"                                                  source)"},{"line_number":95,"context_line":"            if counter_pairs is None:"},{"line_number":96,"context_line":"                LOG.warn(\"Counter absorbed by transformer %s\", transformer)"},{"line_number":97,"context_line":"                return"},{"line_number":98,"context_line":"        counters \u003d [c[1] for c in counter_pairs]"},{"line_number":99,"context_line":"        for publisher in self.publishers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1c4%3D","line":96,"updated":"2012-12-13 12:28:31.000000000","message":"s/absorbed/discarded/\n\nWould adding the counter to the log message make sense?","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                                                  counter_pairs,"},{"line_number":94,"context_line":"                                                  source)"},{"line_number":95,"context_line":"            if counter_pairs is None:"},{"line_number":96,"context_line":"                LOG.warn(\"Counter absorbed by transformer %s\", transformer)"},{"line_number":97,"context_line":"                return"},{"line_number":98,"context_line":"        counters \u003d [c[1] for c in counter_pairs]"},{"line_number":99,"context_line":"        for publisher in self.publishers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0aI%3D","line":96,"in_reply_to":"AAAAMX%2F%2F1c4%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                return"},{"line_number":98,"context_line":"        counters \u003d [c[1] for c in counter_pairs]"},{"line_number":99,"context_line":"        for publisher in self.publishers:"},{"line_number":100,"context_line":"            publisher.publish_counters(ctxt, counters, source)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class PipelineManager(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1cw%3D","line":100,"updated":"2012-12-13 12:28:31.000000000","message":"A little bit of asymmetry there as transformers get to see the original data, but not publishers.\n\nWould it make to keep the interaction model consistent?\n\nI\u0027m struggling to think of a use-case, so maybe not. Perhaps it would lead to the publisher undermining the action of transformers. Anyway, just a thought ...","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                return"},{"line_number":98,"context_line":"        counters \u003d [c[1] for c in counter_pairs]"},{"line_number":99,"context_line":"        for publisher in self.publishers:"},{"line_number":100,"context_line":"            publisher.publish_counters(ctxt, counters, source)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class PipelineManager(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0Zs%3D","line":100,"in_reply_to":"AAAAMX%2F%2F1cw%3D","updated":"2012-12-16 10:10:29.000000000","message":"I\u0027d prefer to not passing the original data to publisher. \nThe logic behind is, transformers are utility transform data from original counters to format required by publisher, so it make sense to have both original counters and the transformed one, while publishers are the utilities that publish transformed data, which has been transformed already.\n\nSo if any reason that publisher need the original data, it should be separated into a new transformer. This will make the logic more clear.\n\nAny idea?","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":103,"context_line":"class PipelineManager(object):"},{"line_number":104,"context_line":"    \"\"\"Pipeline Manager"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    Piepeline manager setups pipelines according to config file and dispatches"},{"line_number":107,"context_line":"    counters to pipelines."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Usually only one pipeline manager exists in the system."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1cs%3D","line":106,"updated":"2012-12-13 12:28:31.000000000","message":"s/setups/sets up/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":103,"context_line":"class PipelineManager(object):"},{"line_number":104,"context_line":"    \"\"\"Pipeline Manager"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    Piepeline manager setups pipelines according to config file and dispatches"},{"line_number":107,"context_line":"    counters to pipelines."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Usually only one pipeline manager exists in the system."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0Zo%3D","line":106,"in_reply_to":"AAAAMX%2F%2F1cs%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def _sanitize_publishers(self, cfg):"},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            publishers \u003d filter(lambda x: len(x) !\u003d 0,"},{"line_number":115,"context_line":"                                map(lambda x: x.strip(), cfg[\u0027publishers\u0027]))"},{"line_number":116,"context_line":"        except KeyError:"},{"line_number":117,"context_line":"            raise PipelineException(\"No publisher definition\", cfg)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1cU%3D","line":115,"updated":"2012-12-13 12:28:31.000000000","message":"Is this just discarding publishers composed only of whitespace?\n\nSeems an unlikely enough formatting error, but in any case can be factored out so that the same-ish code isn\u0027t in both this and the method below.","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def _sanitize_publishers(self, cfg):"},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            publishers \u003d filter(lambda x: len(x) !\u003d 0,"},{"line_number":115,"context_line":"                                map(lambda x: x.strip(), cfg[\u0027publishers\u0027]))"},{"line_number":116,"context_line":"        except KeyError:"},{"line_number":117,"context_line":"            raise PipelineException(\"No publisher definition\", cfg)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0VY%3D","line":115,"in_reply_to":"AAAAMX%2F%2F1cU%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        if \u0027*\u0027 in counters and len(counters) \u003e 1:"},{"line_number":148,"context_line":"            raise PipelineException("},{"line_number":149,"context_line":"                        \"Included counters specified with wildcard\","},{"line_number":150,"context_line":"                        cfg)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        cfg[\u0027counters\u0027] \u003d counters"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1b0%3D","line":150,"updated":"2012-12-13 12:28:31.000000000","message":"I\u0027m not sure this case really needs to be reported as an error.\n\nFor example, say I want to exclude foobar and include everything else?\n\nSay: [\"!foobar\", \"*\"]","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        if \u0027*\u0027 in counters and len(counters) \u003e 1:"},{"line_number":148,"context_line":"            raise PipelineException("},{"line_number":149,"context_line":"                        \"Included counters specified with wildcard\","},{"line_number":150,"context_line":"                        cfg)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        cfg[\u0027counters\u0027] \u003d counters"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0ZQ%3D","line":150,"in_reply_to":"AAAAMX%2F%2F1b0%3D","updated":"2012-12-16 10:10:29.000000000","message":"Glad to hear this.\n\nThis was discussed internally. Followed 3 formats are all agreed:\n[\u0027a\u0027, \u0027b\u0027, \u0027c\u0027]\n[\u0027!a\u0027, \u0027!b\u0027, \u0027!c\u0027]\n[*]\n\nAs to [\u0027!a\u0027, *], it\u0027s argued that it has same meaning with [!a], with the \u0027*\u0027 as redundant. \n\nI will remove the check. I agree such redundant is harmless and is  nature translation to \"everything other .than \u0027a\u0027\"\n\nBut [*, \u0027a\u0027] is invalid, because that really purely redundancy, and  possibly typo for [*, \u0027!a\u0027].","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        return list(self._setup_transformer("},{"line_number":193,"context_line":"                                cfg,"},{"line_number":194,"context_line":"                                transformer_manager,"},{"line_number":195,"context_line":"                                publishers))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def _setup_pipeline(self, cfg, transformer_manager,"},{"line_number":198,"context_line":"                        publisher_manager):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1cI%3D","line":195,"updated":"2012-12-13 12:28:31.000000000","message":"Would it make sense to roll _setup_transformers into _setup_tranformer?","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        return list(self._setup_transformer("},{"line_number":193,"context_line":"                                cfg,"},{"line_number":194,"context_line":"                                transformer_manager,"},{"line_number":195,"context_line":"                                publishers))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def _setup_pipeline(self, cfg, transformer_manager,"},{"line_number":198,"context_line":"                        publisher_manager):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0VU%3D","line":195,"in_reply_to":"AAAAMX%2F%2F1cI%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        }"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        Valid counter format is \u0027*\u0027, \u0027!counter_name\u0027, or \u0027counter_name\u0027."},{"line_number":235,"context_line":"        \u0027*\u0027 is wildcard symbole means any counters; \u0027!counter_name\u0027 means"},{"line_number":236,"context_line":"        \"counter_name\" be excluded; \u0027counter_name\u0027 means \u0027counter_name\u0027"},{"line_number":237,"context_line":"        be included. The \u0027counter_name\" is Counter named tuple\u0027s name field."},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1cE%3D","line":235,"updated":"2012-12-13 12:28:31.000000000","message":"s/symbole/symbol/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        }"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        Valid counter format is \u0027*\u0027, \u0027!counter_name\u0027, or \u0027counter_name\u0027."},{"line_number":235,"context_line":"        \u0027*\u0027 is wildcard symbole means any counters; \u0027!counter_name\u0027 means"},{"line_number":236,"context_line":"        \"counter_name\" be excluded; \u0027counter_name\u0027 means \u0027counter_name\u0027"},{"line_number":237,"context_line":"        be included. The \u0027counter_name\" is Counter named tuple\u0027s name field."},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0VQ%3D","line":235,"in_reply_to":"AAAAMX%2F%2F1cE%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        Valid counter format is \u0027*\u0027, \u0027!counter_name\u0027, or \u0027counter_name\u0027."},{"line_number":235,"context_line":"        \u0027*\u0027 is wildcard symbole means any counters; \u0027!counter_name\u0027 means"},{"line_number":236,"context_line":"        \"counter_name\" be excluded; \u0027counter_name\u0027 means \u0027counter_name\u0027"},{"line_number":237,"context_line":"        be included. The \u0027counter_name\" is Counter named tuple\u0027s name field."},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        Valid counters definition is either all \"included counter names\", all"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1cA%3D","line":236,"updated":"2012-12-13 12:28:31.000000000","message":"s/be/will be/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        Valid counter format is \u0027*\u0027, \u0027!counter_name\u0027, or \u0027counter_name\u0027."},{"line_number":235,"context_line":"        \u0027*\u0027 is wildcard symbole means any counters; \u0027!counter_name\u0027 means"},{"line_number":236,"context_line":"        \"counter_name\" be excluded; \u0027counter_name\u0027 means \u0027counter_name\u0027"},{"line_number":237,"context_line":"        be included. The \u0027counter_name\" is Counter named tuple\u0027s name field."},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        Valid counters definition is either all \"included counter names\", all"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0VI%3D","line":236,"in_reply_to":"AAAAMX%2F%2F1cA%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        be included. The \u0027counter_name\" is Counter named tuple\u0027s name field."},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        Valid counters definition is either all \"included counter names\", all"},{"line_number":240,"context_line":"        \"excluded counter names\", only wildcard."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        Transformer\u0027s name is plugin name in setup.py."},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1b8%3D","line":240,"updated":"2012-12-13 12:28:31.000000000","message":"s/only wildcard/or only wildcard/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        be included. The \u0027counter_name\" is Counter named tuple\u0027s name field."},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        Valid counters definition is either all \"included counter names\", all"},{"line_number":240,"context_line":"        \"excluded counter names\", only wildcard."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        Transformer\u0027s name is plugin name in setup.py."},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0VE%3D","line":240,"in_reply_to":"AAAAMX%2F%2F1b8%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":17,"context_line":"# under the License."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import yaml"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from ceilometer import extension_manager"},{"line_number":22,"context_line":"from ceilometer.openstack.common import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fno%3D","line":19,"updated":"2012-12-17 11:12:11.000000000","message":"Why yaml?\nI don\u0027t have anything against yaml, JSON is a better choice, rather than bringing a new technology. It\u0027s what we used everywhere so far in the OS ecosystem and in Ceilometer itself.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":17,"context_line":"# under the License."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import yaml"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from ceilometer import extension_manager"},{"line_number":22,"context_line":"from ceilometer.openstack.common import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BsM%3D","line":19,"in_reply_to":"AAAAM3%2F%2F%2Fno%3D","updated":"2012-12-18 05:53:26.000000000","message":"The key reason is yaml is much human readable and easier to edit. And according to nijaba, Heat using yaml as an option also.\n\nAlso, now the parameter to pipeline manager is dictionary, instead of config file. The setup_pipeline() will do the parse. Wit this change, it\u0027s easy to add support to json format later if we do want to. Per my experience (Version 1 was json format), json format is really not so human readable, and is prone to be wrong.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \"\"\"Push counters into pipeline for publishing."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        Each transformer will get two pieces of data, one is the original"},{"line_number":77,"context_line":"        counter which will not be changed by the transformer chains"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fnc%3D","line":77,"updated":"2012-12-17 11:12:11.000000000","message":"+ final dot :)","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \"\"\"Push counters into pipeline for publishing."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        Each transformer will get two pieces of data, one is the original"},{"line_number":77,"context_line":"        counter which will not be changed by the transformer chains"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BmY%3D","line":77,"in_reply_to":"AAAAM3%2F%2F%2Fnc%3D","updated":"2012-12-18 05:53:26.000000000","message":"Done","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        Such arrangement is to simplify the transformer implementation, so"},{"line_number":82,"context_line":"        that it can always refer to the original data"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        param counters: a list of counters"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2FnY%3D","line":82,"updated":"2012-12-17 11:12:11.000000000","message":"+ final dot :)","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        Such arrangement is to simplify the transformer implementation, so"},{"line_number":82,"context_line":"        that it can always refer to the original data"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        param counters: a list of counters"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bk8%3D","line":82,"in_reply_to":"AAAAM3%2F%2F%2FnY%3D","updated":"2012-12-18 05:53:26.000000000","message":"Done","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        Such arrangement is to simplify the transformer implementation, so"},{"line_number":82,"context_line":"        that it can always refer to the original data"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        param counters: a list of counters"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BmQ%3D","line":82,"in_reply_to":"AAAAM3%2F%2F%2FnY%3D","updated":"2012-12-18 05:53:26.000000000","message":"Done","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        Such arrangement is to simplify the transformer implementation, so"},{"line_number":82,"context_line":"        that it can always refer to the original data"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        param counters: a list of counters"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2FnU%3D","line":84,"updated":"2012-12-17 11:12:11.000000000","message":"Missing params","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        Such arrangement is to simplify the transformer implementation, so"},{"line_number":82,"context_line":"        that it can always refer to the original data"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        param counters: a list of counters"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bk4%3D","line":84,"in_reply_to":"AAAAM3%2F%2F%2FnU%3D","updated":"2012-12-18 05:53:26.000000000","message":"Done","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"},{"line_number":88,"context_line":"        LOG.info(\"Publish counters %s in %s\", counters, self)"},{"line_number":89,"context_line":"        for transformer in self.transformers:"},{"line_number":90,"context_line":"            counter_pairs \u003d transformer.handle_samples("},{"line_number":91,"context_line":"                                                  ctxt,"},{"line_number":92,"context_line":"                                                  counter_pairs,"},{"line_number":93,"context_line":"                                                  source)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2FnE%3D","line":90,"updated":"2012-12-17 11:12:11.000000000","message":"I think it\u0027d be better to not assume handler_samples() is going to return the origin counter too.\nJust do something like:\n\ncounter_pairs \u003d zip(counters, transformer.handler_samples(....))\n\nBtw, I don\u0027t know why you give the original counter too. Is this really useful?","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"03d3577114d712bf60b86d442f4a310d6647002d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"},{"line_number":88,"context_line":"        LOG.info(\"Publish counters %s in %s\", counters, self)"},{"line_number":89,"context_line":"        for transformer in self.transformers:"},{"line_number":90,"context_line":"            counter_pairs \u003d transformer.handle_samples("},{"line_number":91,"context_line":"                                                  ctxt,"},{"line_number":92,"context_line":"                                                  counter_pairs,"},{"line_number":93,"context_line":"                                                  source)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BSA%3D","line":90,"in_reply_to":"AAAAM3%2F%2F%2BS4%3D","updated":"2012-12-18 10:58:31.000000000","message":"Currently transformer will always return the original counter, not the one from previous transformer.\n\nSeems your only concern is we depends on transformer to keep the original counter, right?  If yes, an alternative method is to passing only one counter to the transformer and the pipeline framework will keep the paring.\n\nThis has some side effect. For example, take vnic data as example. Currently pollster publish all data for all vnic in one polling, Metric need sums network-out data from all vnic into a simple one. If we passing one counter each time, this summary transformer will have no idea when should it stop cache and begin calculation. So possibly we need a special function in transformer to notify the transformer that the iterator is finished.\n\nAny idea?","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5bcc9f1ea127bbed45c320109e4f3c322b27a067","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"},{"line_number":88,"context_line":"        LOG.info(\"Publish counters %s in %s\", counters, self)"},{"line_number":89,"context_line":"        for transformer in self.transformers:"},{"line_number":90,"context_line":"            counter_pairs \u003d transformer.handle_samples("},{"line_number":91,"context_line":"                                                  ctxt,"},{"line_number":92,"context_line":"                                                  counter_pairs,"},{"line_number":93,"context_line":"                                                  source)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BS4%3D","line":90,"in_reply_to":"AAAAM3%2F%2F%2BTg%3D","updated":"2012-12-18 10:30:08.000000000","message":"\u003e If some transformer want to know the counter linked to same original counter, it can be achieved easily by scan the counter pairs with same original counter.\n\nYes, but I\u0027m not comfortable with the handle_samples() being in charge of returning the original counters. I\u0027m confident sooner or later bad things will happen and some transformer will mess with the original counters list.\n\nI didn\u0027t think about having transformers that would split again counters, but that could be a use case indeed, you\u0027re right, so my proposal is not going to be enough, or too complicated as you point out.\n\n\nBut then that raises again the problem of what for and what the original counter list should be? Currently what you propose seems to be the list of counters before the last transformers did its changes:\n\nFirst call:\n handle_samples1(zip(original_list, orignal_list) \u003d\u003e zip(original_list, samples1_list)  \n\nSecond call:\n  handle_samples2(zip(original_list, samples1_list)) \u003d\u003e zip(samples1_list, samples2_list)\n\netc...\n\n(\"\u003d\u003e\" meaning returns)\n\nThis doesn\u0027t sound like a good idea to have transformers that rely on the ability to discover what the transformer which ran *just before* changed on the counter list.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"756241fe6a9797596bd06baffb1505ae5db849d0","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"},{"line_number":88,"context_line":"        LOG.info(\"Publish counters %s in %s\", counters, self)"},{"line_number":89,"context_line":"        for transformer in self.transformers:"},{"line_number":90,"context_line":"            counter_pairs \u003d transformer.handle_samples("},{"line_number":91,"context_line":"                                                  ctxt,"},{"line_number":92,"context_line":"                                                  counter_pairs,"},{"line_number":93,"context_line":"                                                  source)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BTg%3D","line":90,"in_reply_to":"AAAAM3%2F%2F%2BV8%3D","updated":"2012-12-18 10:19:04.000000000","message":"If some transformer want to know the counter linked to same original counter, it can be achieved easily by scan the counter pairs with same original counter.\n\nI\u0027m not sure if we need passing the relationship between (Counter 3a, Counter 3b) down the pipeline. For example, the next transformer return (Counter 3a_1, Counter 3a_2) for Counter 3a, and (Counter 3b_1, Counter 3b_2) for Counter 3b (will we have such complex transformer chain? My God!). Do we need keep such relationship still? If yes,  totally agree that we need use the tuple. If not, possibly we don\u0027t need it. \nBTW, it will be complex IMHO if we do want to keep such relationship down the pipeline, because it in fact means the relationship between transformer is kept, at least partially. While I\u0027d assume transformers are independently utility to transform counters.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"cd95fd4feb46539b5fd86e468b201948b445f4bd","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"},{"line_number":88,"context_line":"        LOG.info(\"Publish counters %s in %s\", counters, self)"},{"line_number":89,"context_line":"        for transformer in self.transformers:"},{"line_number":90,"context_line":"            counter_pairs \u003d transformer.handle_samples("},{"line_number":91,"context_line":"                                                  ctxt,"},{"line_number":92,"context_line":"                                                  counter_pairs,"},{"line_number":93,"context_line":"                                                  source)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BV8%3D","line":90,"in_reply_to":"AAAAM3%2F%2F%2Bj8%3D","updated":"2012-12-18 09:17:33.000000000","message":"What I\u0027d propose then is the following:\n\nAssume that transformer.handler_samples() returns a list of counter or counter tuple, like:\n\n  return [Counter1, Counter2, (Counter3a, Counter3b), Counter4]\n\nSo you feed it with the list zip(original counter list, modified counter list) but it only returns something you can zip() over again.\n\nThe ability to return tuple is useful in the case where the transformer split up a counter in different sub-counters, or add a new one related to the original counter. That would allow to link the original counter to subcounters.\n\nIf a transformer needs to add counters that do not come from any original counter, it can just add them at the end (be careful that zip() will not include them). \n\nDo I make sense?","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        counter_pairs \u003d zip(counters, counters)"},{"line_number":88,"context_line":"        LOG.info(\"Publish counters %s in %s\", counters, self)"},{"line_number":89,"context_line":"        for transformer in self.transformers:"},{"line_number":90,"context_line":"            counter_pairs \u003d transformer.handle_samples("},{"line_number":91,"context_line":"                                                  ctxt,"},{"line_number":92,"context_line":"                                                  counter_pairs,"},{"line_number":93,"context_line":"                                                  source)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bj8%3D","line":90,"in_reply_to":"AAAAM3%2F%2F%2FnE%3D","updated":"2012-12-18 05:53:26.000000000","message":"I\u0027m not sure if we can always use zip to achieve it. For example, if  transformer will discard some counter (like interval), or will yield several result for a single counter (if we need publish several dimension metric for a counter), it\u0027s not easy to achieve this.\n\nI assume most of the transformer will be based on plugin.TransformerBase. The tranformer need only provide handle_sample() which return only transformed result, instead of handle_samples().\n\nThe reason to keep original counter is to be more flexible. For example, considering followed scenario: first transformer return an new empty metric, second transformer copy some fields from counter to the new metric, third transformer translate some fields from counter to the new metric. Without the original counter, all the transformer has to happen on the counter, and possibly not that easy.\n\nThe logic behind is, the transformer changes data from Counter format to target format. With original counter along the transformer chain,  each transformer can have the information of original counter and can do the transformer needed. Otherwise, every transformer has to keep as much information as possible and need care for the  transformers followed it.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    Usually only one pipeline manager exists in the system."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    \"\"\""},{"line_number":117,"context_line":"    def _sanitize_counters(self, counters):"},{"line_number":118,"context_line":"        \"\"\"Counter rules checking"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        At least one meaningful counter exist"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fmo%3D","line":117,"updated":"2012-12-17 11:12:11.000000000","message":"\"sanitize\" is an action and made me think you\u0027re going to modify counters, but you\u0027re not. You\u0027re just doing checks. So call this \"check\" or something like that rather.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    Usually only one pipeline manager exists in the system."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    \"\"\""},{"line_number":117,"context_line":"    def _sanitize_counters(self, counters):"},{"line_number":118,"context_line":"        \"\"\"Counter rules checking"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        At least one meaningful counter exist"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BjU%3D","line":117,"in_reply_to":"AAAAM3%2F%2F%2Fmo%3D","updated":"2012-12-18 05:53:26.000000000","message":"In fact, we did change in first patchset to strip the counters. Later, the strip logic is moved out.\n\nChanged to check already and thanks for suggestion.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        if [x for x in counters if x[0] \u003d\u003d \u0027!\u0027] and \\"},{"line_number":129,"context_line":"           [x for x in counters if x[0] !\u003d \u0027!\u0027]:"},{"line_number":130,"context_line":"            raise PipelineException("},{"line_number":131,"context_line":"                        \"Both included and exceluded counters specified\","},{"line_number":132,"context_line":"                        cfg)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if \u0027*\u0027 in counters and [x for x in counters if x[0] not in \u0027!*\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fms%3D","line":131,"updated":"2012-12-17 11:12:11.000000000","message":"excluded","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        if [x for x in counters if x[0] \u003d\u003d \u0027!\u0027] and \\"},{"line_number":129,"context_line":"           [x for x in counters if x[0] !\u003d \u0027!\u0027]:"},{"line_number":130,"context_line":"            raise PipelineException("},{"line_number":131,"context_line":"                        \"Both included and exceluded counters specified\","},{"line_number":132,"context_line":"                        cfg)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if \u0027*\u0027 in counters and [x for x in counters if x[0] not in \u0027!*\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bi0%3D","line":131,"in_reply_to":"AAAAM3%2F%2F%2Fms%3D","updated":"2012-12-18 05:53:26.000000000","message":"Done","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        publishers \u003d map(lambda x: x.obj,"},{"line_number":144,"context_line":"                         extension_manager.get_extensions("},{"line_number":145,"context_line":"                                publisher_manager,"},{"line_number":146,"context_line":"                                cfg[\"publishers\"]))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if len(publishers) \u003c len(cfg[\"publishers\"]):"},{"line_number":149,"context_line":"            raise PipelineException(\"Some publishers not loaded\", cfg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fmk%3D","line":146,"updated":"2012-12-17 11:12:11.000000000","message":"Probably a matter of taste but I think this is more readable:\n\n[x.obj for x in extension_manager.get_extensions()]","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        publishers \u003d map(lambda x: x.obj,"},{"line_number":144,"context_line":"                         extension_manager.get_extensions("},{"line_number":145,"context_line":"                                publisher_manager,"},{"line_number":146,"context_line":"                                cfg[\"publishers\"]))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if len(publishers) \u003c len(cfg[\"publishers\"]):"},{"line_number":149,"context_line":"            raise PipelineException(\"Some publishers not loaded\", cfg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bg8%3D","line":146,"in_reply_to":"AAAAM3%2F%2F%2Fmk%3D","updated":"2012-12-18 05:53:26.000000000","message":"Done","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                cfg[\"publishers\"]))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if len(publishers) \u003c len(cfg[\"publishers\"]):"},{"line_number":149,"context_line":"            raise PipelineException(\"Some publishers not loaded\", cfg)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return publishers"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fmg%3D","line":149,"updated":"2012-12-17 11:12:11.000000000","message":"Could you be more verbose about this error? Like what caused it?","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"756241fe6a9797596bd06baffb1505ae5db849d0","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                cfg[\"publishers\"]))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if len(publishers) \u003c len(cfg[\"publishers\"]):"},{"line_number":149,"context_line":"            raise PipelineException(\"Some publishers not loaded\", cfg)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return publishers"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BTc%3D","line":149,"in_reply_to":"AAAAM3%2F%2F%2BV4%3D","updated":"2012-12-18 10:19:04.000000000","message":"Thanks, and I have change the logic, please have a look. Now I gives the name of the publisher, so that the user can check if anything wrong.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"cd95fd4feb46539b5fd86e468b201948b445f4bd","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                cfg[\"publishers\"]))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if len(publishers) \u003c len(cfg[\"publishers\"]):"},{"line_number":149,"context_line":"            raise PipelineException(\"Some publishers not loaded\", cfg)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return publishers"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BV4%3D","line":149,"in_reply_to":"AAAAM3%2F%2F%2Bgw%3D","updated":"2012-12-18 09:17:33.000000000","message":"Yeah, I meant to add more information in the error message of the exception. I just imagined myself getting this error and being confused about what it would mean and what I should do, if I should do anything.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                cfg[\"publishers\"]))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if len(publishers) \u003c len(cfg[\"publishers\"]):"},{"line_number":149,"context_line":"            raise PipelineException(\"Some publishers not loaded\", cfg)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return publishers"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bgw%3D","line":149,"in_reply_to":"AAAAM3%2F%2F%2Fmg%3D","updated":"2012-12-18 05:53:26.000000000","message":"Several reason may happen. For example, typo in the config file, specify publishers not supported in the current release (like H\u0027s publishers in G release config file).\n\nOr you mean we need add more information on the exception error message?\n\nI  change the extension_manager.get_extensions() to be get_extension() with only one name. If the publisher not found, then an exception will be raised, and we can give more detailed information here.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        try:"},{"line_number":183,"context_line":"            for item in (\u0027counters\u0027, \u0027publishers\u0027):"},{"line_number":184,"context_line":"                cfg[item] \u003d filter(lambda x: len(x) !\u003d 0,"},{"line_number":185,"context_line":"                                   map(lambda x: x.strip(), cfg[item]))"},{"line_number":186,"context_line":"        except KeyError:"},{"line_number":187,"context_line":"            raise PipelineException(\"No %s definition\" % item, cfg)"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fmw%3D","line":185,"updated":"2012-12-17 11:12:11.000000000","message":"You can write:\ncfg[item] \u003d filter(len, [x.strip() for x in cfg[item]])\n\nI guess. :)\n\nAlso, the exception handling is probably better put out of this function itself, which you can probably remove and include in _setup_pipeline to be clearer, since it\u0027s only used once. It\u0027s a one liner after all.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        try:"},{"line_number":183,"context_line":"            for item in (\u0027counters\u0027, \u0027publishers\u0027):"},{"line_number":184,"context_line":"                cfg[item] \u003d filter(lambda x: len(x) !\u003d 0,"},{"line_number":185,"context_line":"                                   map(lambda x: x.strip(), cfg[item]))"},{"line_number":186,"context_line":"        except KeyError:"},{"line_number":187,"context_line":"            raise PipelineException(\"No %s definition\" % item, cfg)"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bf0%3D","line":185,"in_reply_to":"AAAAM3%2F%2F%2Fmw%3D","updated":"2012-12-18 05:53:26.000000000","message":"Seems you like list comprehension and I prefer to lambda :) Changed already.\n\nI\u0027d keep the exception handling here, the exception is to catch the config/publishers is specified in the config, so not part of the functionality of this function.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        Publisher\u0027s name is plugin name in setup.py"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        \"\"\""},{"line_number":243,"context_line":"        self.pipelines \u003d []"},{"line_number":244,"context_line":"        for pipedef in cfg:"},{"line_number":245,"context_line":"            pipeline \u003d self._setup_pipeline(pipedef, transformer_manager,"},{"line_number":246,"context_line":"                                            publisher_manager)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fm4%3D","line":243,"updated":"2012-12-17 11:12:11.000000000","message":"self.pipelines \u003d [self._setup_pipeline(pipedef, transformer_manager, publisher_manager) for pipedef in cfg]","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        Publisher\u0027s name is plugin name in setup.py"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        \"\"\""},{"line_number":243,"context_line":"        self.pipelines \u003d []"},{"line_number":244,"context_line":"        for pipedef in cfg:"},{"line_number":245,"context_line":"            pipeline \u003d self._setup_pipeline(pipedef, transformer_manager,"},{"line_number":246,"context_line":"                                            publisher_manager)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bfo%3D","line":243,"in_reply_to":"AAAAM3%2F%2F%2Fm4%3D","updated":"2012-12-18 05:53:26.000000000","message":"good point.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"bbc56f316444004e5290fad595d99331a9282062","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \"\"\"Push counters into pipeline for publishing."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        Each transformer will get two pieces of data, one is the original"},{"line_number":77,"context_line":"        counter which will not be changed by the transformer chains."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        Another one is the transformed data which will be published later."},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2F6JY%3D","line":77,"updated":"2012-12-21 16:40:30.000000000","message":"I think this is now wrong. :)","commit_id":"3b2ce784d42bf385a513b014c73580123d5997be"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"bbc56f316444004e5290fad595d99331a9282062","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        param source: counter source"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        LOG.info(\"Publish counters %s in %s\", counters, self)"},{"line_number":90,"context_line":"        for transformer in self.transformers:"},{"line_number":91,"context_line":"            counters \u003d transformer.handle_samples("},{"line_number":92,"context_line":"                                                  ctxt,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2F6JU%3D","line":89,"updated":"2012-12-21 16:40:30.000000000","message":"I\u0027d change info into audit or something, and that\u0027s publish, that\u0027s more transform at this point.","commit_id":"3b2ce784d42bf385a513b014c73580123d5997be"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"bbc56f316444004e5290fad595d99331a9282062","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    Usually only one pipeline manager exists in the system."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    \"\"\""},{"line_number":118,"context_line":"    def _check_counters(self, counters):"},{"line_number":119,"context_line":"        \"\"\"Counter rules checking"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        At least one meaningful counter exist"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2F6JA%3D","line":118,"updated":"2012-12-21 16:40:30.000000000","message":"This should be a @staticmethod","commit_id":"3b2ce784d42bf385a513b014c73580123d5997be"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"bbc56f316444004e5290fad595d99331a9282062","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                        \"Included counters specified with wildcard\","},{"line_number":138,"context_line":"                        cfg)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _setup_publishers(self, cfg, publisher_manager):"},{"line_number":141,"context_line":"        if len(cfg[\u0027publishers\u0027]) \u003d\u003d 0:"},{"line_number":142,"context_line":"            raise PipelineException(\"No publisher specified\", cfg)"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2F6I8%3D","line":140,"updated":"2012-12-21 16:40:30.000000000","message":"@staticmethod","commit_id":"3b2ce784d42bf385a513b014c73580123d5997be"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"bbc56f316444004e5290fad595d99331a9282062","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        return publisher_objs"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _setup_transformers(self, cfg, transformer_manager, publishers):"},{"line_number":157,"context_line":"        transformers \u003d []"},{"line_number":158,"context_line":"        try:"},{"line_number":159,"context_line":"            for transformer in cfg[\u0027transformers\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2F6Iw%3D","line":156,"updated":"2012-12-21 16:40:30.000000000","message":"@staticmethod","commit_id":"3b2ce784d42bf385a513b014c73580123d5997be"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"bbc56f316444004e5290fad595d99331a9282062","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        else:"},{"line_number":183,"context_line":"            return transformers"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _strip_config(self, cfg):"},{"line_number":186,"context_line":"        try:"},{"line_number":187,"context_line":"            for item in (\u0027counters\u0027, \u0027publishers\u0027):"},{"line_number":188,"context_line":"                cfg[item] \u003d filter(len, [x.strip() for x in cfg[item]])"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2F6Io%3D","line":185,"updated":"2012-12-21 16:40:30.000000000","message":"@staticmethod","commit_id":"3b2ce784d42bf385a513b014c73580123d5997be"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"bbc56f316444004e5290fad595d99331a9282062","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        self._setup_pipelines(cfg, transformer_manager, publisher_manager)"},{"line_number":254,"context_line":"        self.pipeline_mapping \u003d {}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _pipeline_support_counter(self, pipeline, counter):"},{"line_number":257,"context_line":"        # True for wildcard format unless excluded explicitly"},{"line_number":258,"context_line":"        if \u0027*\u0027 in pipeline.counters:"},{"line_number":259,"context_line":"            return len(pipeline.counters) \u003d\u003d 1 and True \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2F6JE%3D","line":256,"updated":"2012-12-21 16:40:30.000000000","message":"This should be a @staticmethod","commit_id":"3b2ce784d42bf385a513b014c73580123d5997be"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":103,"context_line":"class PipelineManager(object):"},{"line_number":104,"context_line":"    \"\"\"Pipeline Manager"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    Piepeline manager sets up pipelines according to config file and dispatches"},{"line_number":107,"context_line":"    counters to pipelines."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Usually only one pipeline manager exists in the system."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3yk%3D","line":106,"updated":"2012-12-28 16:28:53.000000000","message":"Typo: Piepeline","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":103,"context_line":"class PipelineManager(object):"},{"line_number":104,"context_line":"    \"\"\"Pipeline Manager"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    Piepeline manager sets up pipelines according to config file and dispatches"},{"line_number":107,"context_line":"    counters to pipelines."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Usually only one pipeline manager exists in the system."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FsX8%3D","line":106,"in_reply_to":"AAAAM3%2F%2F3yk%3D","updated":"2013-01-16 09:15:30.000000000","message":"Thanks and will fix it.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        try:"},{"line_number":142,"context_line":"            # If typo in the config file, or some publishers not supported"},{"line_number":143,"context_line":"            # in the release, may fail to find the publishers"},{"line_number":144,"context_line":"            publisher_objs \u003d [extension_manager.get_extension("},{"line_number":145,"context_line":"                                     publisher_manager,"},{"line_number":146,"context_line":"                                     publisher).obj"},{"line_number":147,"context_line":"                              for publisher in cfg[\u0027publishers\u0027]]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3yg%3D","line":144,"updated":"2012-12-28 16:28:53.000000000","message":"This looks like it duplicates the work of the NamedExtensionManager from stevedore, loading specific named extensions. It also iterates over all of the available extensions searching for each desired extension. Is there some way to use NamedExtensionManager for this logic, or at least remove the n^2 looping?","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        try:"},{"line_number":142,"context_line":"            # If typo in the config file, or some publishers not supported"},{"line_number":143,"context_line":"            # in the release, may fail to find the publishers"},{"line_number":144,"context_line":"            publisher_objs \u003d [extension_manager.get_extension("},{"line_number":145,"context_line":"                                     publisher_manager,"},{"line_number":146,"context_line":"                                     publisher).obj"},{"line_number":147,"context_line":"                              for publisher in cfg[\u0027publishers\u0027]]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjXc%3D","line":144,"in_reply_to":"AAAAM3%2F%2F3yg%3D","updated":"2013-01-16 09:15:30.000000000","message":"Done.\nUse NamedDispatchExtensionManager for it.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        transformers \u003d []"},{"line_number":156,"context_line":"        try:"},{"line_number":157,"context_line":"            for transformer in cfg[\u0027transformers\u0027]:"},{"line_number":158,"context_line":"                transformer_ext \u003d extension_manager.get_extension("},{"line_number":159,"context_line":"                                                transformer_manager,"},{"line_number":160,"context_line":"                                                transformer[\u0027name\u0027].strip())"},{"line_number":161,"context_line":"                parameter \u003d transformer[\u0027parameters\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3yc%3D","line":158,"updated":"2012-12-28 16:28:53.000000000","message":"See above comment about looping and NamedExtensionManager.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        transformers \u003d []"},{"line_number":156,"context_line":"        try:"},{"line_number":157,"context_line":"            for transformer in cfg[\u0027transformers\u0027]:"},{"line_number":158,"context_line":"                transformer_ext \u003d extension_manager.get_extension("},{"line_number":159,"context_line":"                                                transformer_manager,"},{"line_number":160,"context_line":"                                                transformer[\u0027name\u0027].strip())"},{"line_number":161,"context_line":"                parameter \u003d transformer[\u0027parameters\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjXY%3D","line":158,"in_reply_to":"AAAAM3%2F%2F3yc%3D","updated":"2013-01-16 09:15:30.000000000","message":"Done.\n\nUse ExtensionManager.\nThe publisher_manager and transformer_manager is a bit different. For transformer, an instance is created for each pipeline. For publisher, only one instance created in the system and this instance is shared between pipelines.\n\nThe reason is, possibly publisher need some special resource like UDP link etc, so it\u0027s better to keep only one instance in the system.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            for item in (\u0027counters\u0027, \u0027publishers\u0027):"},{"line_number":187,"context_line":"                cfg[item] \u003d filter(len, [x.strip() for x in cfg[item]])"},{"line_number":188,"context_line":"        except KeyError:"},{"line_number":189,"context_line":"            raise PipelineException(\"No %s definition\" % item, cfg)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _setup_pipeline(self, cfg, transformer_manager,"},{"line_number":192,"context_line":"                        publisher_manager):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3yQ%3D","line":189,"updated":"2012-12-28 16:28:53.000000000","message":"The code that parses the configuration file should clean up the data (strip whitespace, etc.). The error handling for missing keys can move to the code that is going to try to use them, and this method can be removed.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            for item in (\u0027counters\u0027, \u0027publishers\u0027):"},{"line_number":187,"context_line":"                cfg[item] \u003d filter(len, [x.strip() for x in cfg[item]])"},{"line_number":188,"context_line":"        except KeyError:"},{"line_number":189,"context_line":"            raise PipelineException(\"No %s definition\" % item, cfg)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _setup_pipeline(self, cfg, transformer_manager,"},{"line_number":192,"context_line":"                        publisher_manager):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjXU%3D","line":189,"in_reply_to":"AAAAM3%2F%2F3yQ%3D","updated":"2013-01-16 09:15:30.000000000","message":"Done","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        transformers \u003d self._setup_transformers(cfg, transformer_manager,"},{"line_number":200,"context_line":"                                                 publishers)"},{"line_number":201,"context_line":"        if len(transformers) \u003d\u003d 0:"},{"line_number":202,"context_line":"            LOG.warn(\"No valid transformer specified\", cfg)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        pipeline \u003d Pipeline(cfg[\u0027counters\u0027], transformers, publishers)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3x8%3D","line":201,"updated":"2012-12-28 16:28:53.000000000","message":"This can just be \"if not transformers:\".\n\nThere should be similar checks for publishers and counters, right? And all of that validation should go into the Pipeline() constructor.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        transformers \u003d self._setup_transformers(cfg, transformer_manager,"},{"line_number":200,"context_line":"                                                 publishers)"},{"line_number":201,"context_line":"        if len(transformers) \u003d\u003d 0:"},{"line_number":202,"context_line":"            LOG.warn(\"No valid transformer specified\", cfg)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        pipeline \u003d Pipeline(cfg[\u0027counters\u0027], transformers, publishers)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjXQ%3D","line":201,"in_reply_to":"AAAAM3%2F%2F3x8%3D","updated":"2013-01-16 09:15:30.000000000","message":"Done","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        Pipeline definition is an dictionary specifying the target counters,"},{"line_number":217,"context_line":"        the tranformers involved, and the target publishers:"},{"line_number":218,"context_line":"        {"},{"line_number":219,"context_line":"            \"counters\" :  [\"counter_1\", \"counter_2\"],"},{"line_number":220,"context_line":"            \"tranformers\":["},{"line_number":221,"context_line":"                              {\"name\": \"Transformer_1\","}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3yI%3D","line":218,"updated":"2012-12-28 16:28:53.000000000","message":"Do pipelines need names so we can identify them in error and log messages? It would make tracking down a configuration issue a little easier, I think.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        Pipeline definition is an dictionary specifying the target counters,"},{"line_number":217,"context_line":"        the tranformers involved, and the target publishers:"},{"line_number":218,"context_line":"        {"},{"line_number":219,"context_line":"            \"counters\" :  [\"counter_1\", \"counter_2\"],"},{"line_number":220,"context_line":"            \"tranformers\":["},{"line_number":221,"context_line":"                              {\"name\": \"Transformer_1\","}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjXM%3D","line":218,"in_reply_to":"AAAAM3%2F%2F3yI%3D","updated":"2013-01-16 09:15:30.000000000","message":"Done","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        self.pipeline_mapping \u003d {}"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    @staticmethod"},{"line_number":256,"context_line":"    def _pipeline_support_counter(pipeline, counter):"},{"line_number":257,"context_line":"        # True for wildcard format unless excluded explicitly"},{"line_number":258,"context_line":"        if \u0027*\u0027 in pipeline.counters:"},{"line_number":259,"context_line":"            return len(pipeline.counters) \u003d\u003d 1 and True \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3x4%3D","line":256,"updated":"2012-12-28 16:28:53.000000000","message":"I think you can write this method more clearly as:\n\nif (\u0027!\u0027 + counter) in pipeline.counters:\n  return False\nif \u0027*\u0027 in pipeline.counters:\n  return True\nreturn counter in pipeline.counters\n\nThis method should move to the Pipeline class, since it uses fields internal to that data structure.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        self.pipeline_mapping \u003d {}"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    @staticmethod"},{"line_number":256,"context_line":"    def _pipeline_support_counter(pipeline, counter):"},{"line_number":257,"context_line":"        # True for wildcard format unless excluded explicitly"},{"line_number":258,"context_line":"        if \u0027*\u0027 in pipeline.counters:"},{"line_number":259,"context_line":"            return len(pipeline.counters) \u003d\u003d 1 and True \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjXE%3D","line":256,"in_reply_to":"AAAAM3%2F%2F3x4%3D","updated":"2013-01-16 09:15:30.000000000","message":"Thanks for correction. One  code added in the last minutes in original code is really brain-dead :$\nI changed a bit to your example because \"!b, !c\" situation nee special handling.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            if filtered_counters:"},{"line_number":287,"context_line":"                mapping.append([pipeline, filtered_counters])"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        self.pipeline_mapping[counters] \u003d mapping"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":292,"context_line":"        \"\"\"Publish counters into pipelines"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3xw%3D","line":289,"updated":"2012-12-28 16:28:53.000000000","message":"Wouldn\u0027t it be more efficient to maintain a mapping between one counter name and all of the pipelines that want data for that counter? That way as a counter is published it can be sent into each pipeline that wants it.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            if filtered_counters:"},{"line_number":287,"context_line":"                mapping.append([pipeline, filtered_counters])"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        self.pipeline_mapping[counters] \u003d mapping"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def publish_counters(self, ctxt, counters, source):"},{"line_number":292,"context_line":"        \"\"\"Publish counters into pipelines"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjXA%3D","line":289,"in_reply_to":"AAAAM3%2F%2F3xw%3D","updated":"2013-01-16 09:15:30.000000000","message":"Updated according to discussion in the mailing list.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"26c5abc685c96bed11dec5240b8311d44107acde","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        counters \u003d list(counters)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        LOG.info(\"Publish counters %s\", counters)"},{"line_number":317,"context_line":"        counter_tuple \u003d tuple([counter.name for counter in counters])"},{"line_number":318,"context_line":"        if counter_tuple not in self.pipeline_mapping:"},{"line_number":319,"context_line":"            self._setup_counters_mapping(counter_tuple)"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2F3xs%3D","line":317,"updated":"2012-12-28 16:28:53.000000000","message":"This logic seems to be assuming that related counters will be published together. Is something else going to guarantee that?","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"d49d4358db7c3d6e302c830c594e0480f0c82f4c","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        counters \u003d list(counters)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        LOG.info(\"Publish counters %s\", counters)"},{"line_number":317,"context_line":"        counter_tuple \u003d tuple([counter.name for counter in counters])"},{"line_number":318,"context_line":"        if counter_tuple not in self.pipeline_mapping:"},{"line_number":319,"context_line":"            self._setup_counters_mapping(counter_tuple)"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FjW8%3D","line":317,"in_reply_to":"AAAAM3%2F%2F3xs%3D","updated":"2013-01-16 09:15:30.000000000","message":"Updated according to discussion in the mailing list.","commit_id":"95e8b5289d52416409f590e4ec8e022530cdc883"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright © 2012 Intel Corp."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# Author: Yunhong Jiang \u003cyunhong.jiang@intel.com\u003e"},{"line_number":6,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd%2Fs%3D","line":3,"updated":"2013-01-21 12:38:46.000000000","message":"+1 :-)","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright © 2012 Intel Corp."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# Author: Yunhong Jiang \u003cyunhong.jiang@intel.com\u003e"},{"line_number":6,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fct8%3D","line":3,"in_reply_to":"AAAAM3%2F%2Fd%2Fs%3D","updated":"2013-01-22 05:24:50.000000000","message":"Aha, it\u0027s 2013 already.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            raise PipelineException(\"No counter specified\", self.cfg)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if [x for x in counters if x[0] not in \u0027!*\u0027] and \\"},{"line_number":101,"context_line":"           [x for x in counters if x[0] \u003d\u003d \u0027!\u0027]:"},{"line_number":102,"context_line":"            raise PipelineException("},{"line_number":103,"context_line":"                \"Both included and excluded counters specified\","},{"line_number":104,"context_line":"                cfg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd%2Fg%3D","line":101,"updated":"2013-01-21 12:38:46.000000000","message":"If x[0] \u003d\u003d \u0027!\u0027 then x[0] cannot \"not be in !*\"\n\nSo IIUC, this condition is always false.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5440e74730a5ae53881012fb1a71822b9c7569d2","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            raise PipelineException(\"No counter specified\", self.cfg)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if [x for x in counters if x[0] not in \u0027!*\u0027] and \\"},{"line_number":101,"context_line":"           [x for x in counters if x[0] \u003d\u003d \u0027!\u0027]:"},{"line_number":102,"context_line":"            raise PipelineException("},{"line_number":103,"context_line":"                \"Both included and excluded counters specified\","},{"line_number":104,"context_line":"                cfg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fce0%3D","line":101,"in_reply_to":"AAAAM3%2F%2FcvY%3D","updated":"2013-01-22 09:49:45.000000000","message":"Ahah, my bad! My brain wasn\u0027t wired on list comprehension I guess.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            raise PipelineException(\"No counter specified\", self.cfg)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if [x for x in counters if x[0] not in \u0027!*\u0027] and \\"},{"line_number":101,"context_line":"           [x for x in counters if x[0] \u003d\u003d \u0027!\u0027]:"},{"line_number":102,"context_line":"            raise PipelineException("},{"line_number":103,"context_line":"                \"Both included and excluded counters specified\","},{"line_number":104,"context_line":"                cfg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FcvY%3D","line":101,"in_reply_to":"AAAAM3%2F%2Fd%2Fg%3D","updated":"2013-01-22 05:24:50.000000000","message":"It\u0027s a list comprehension, not check for a single counter.\nAs stated in the exception comments, this is to make sure include counter and exclude counter can\u0027t exist. For example,  counter spec [\u0027a\u0027, \u0027!c\u0027] will return [\u0027a\u0027] and [\u0027!c\u0027] and thus False, while [\u0027a\u0027, \u0027c\u0027] will return [\u0027a\u0027, \u0027c\u0027] and [] thus is True.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            transformer_manager \u003d TransformerExtensionManager()"},{"line_number":127,"context_line":"            for transformer in transformer_cfg:"},{"line_number":128,"context_line":"                ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])"},{"line_number":129,"context_line":"                parameter \u003d transformer[\u0027parameters\u0027]"},{"line_number":130,"context_line":"                if not parameter:"},{"line_number":131,"context_line":"                    parameter \u003d {}"},{"line_number":132,"context_line":"                transformers.append(ext.plugin(**parameter))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd%2FY%3D","line":129,"updated":"2013-01-21 12:38:46.000000000","message":"You can use something like\n\nparameters \u003d transformer[\u0027parameters\u0027] or {}\n\nI guess.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            transformer_manager \u003d TransformerExtensionManager()"},{"line_number":127,"context_line":"            for transformer in transformer_cfg:"},{"line_number":128,"context_line":"                ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])"},{"line_number":129,"context_line":"                parameter \u003d transformer[\u0027parameters\u0027]"},{"line_number":130,"context_line":"                if not parameter:"},{"line_number":131,"context_line":"                    parameter \u003d {}"},{"line_number":132,"context_line":"                transformers.append(ext.plugin(**parameter))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FcvQ%3D","line":129,"in_reply_to":"AAAAM3%2F%2Fd%2FY%3D","updated":"2013-01-22 05:24:50.000000000","message":"Good point. Will update it in next patchset.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            raise PipelineException("},{"line_number":139,"context_line":"                \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":140,"context_line":"                cfg)"},{"line_number":141,"context_line":"        else:"},{"line_number":142,"context_line":"            return transformers"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd%2FQ%3D","line":141,"updated":"2013-01-21 12:38:46.000000000","message":"You can probably drop the else.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            raise PipelineException("},{"line_number":139,"context_line":"                \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":140,"context_line":"                cfg)"},{"line_number":141,"context_line":"        else:"},{"line_number":142,"context_line":"            return transformers"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FcvI%3D","line":141,"in_reply_to":"AAAAM3%2F%2Fd%2FQ%3D","updated":"2013-01-22 05:24:50.000000000","message":"Thanks for suggestion. Will change in next patchset.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        if \u0027*\u0027 in self.counters:"},{"line_number":228,"context_line":"            return True"},{"line_number":229,"context_line":"        elif self.counters[0][0] \u003d\u003d \u0027!\u0027:"},{"line_number":230,"context_line":"            return not (\u0027!\u0027 + counter_name) in self.counters"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            return counter_name in self.counters"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd9k%3D","line":230,"updated":"2013-01-21 12:38:46.000000000","message":"I don\u0027t understand this condition. Why checking counters[0] ?","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"a75c6fb02070a1485aa7a4a4e8989db9b8ab25b6","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        if \u0027*\u0027 in self.counters:"},{"line_number":228,"context_line":"            return True"},{"line_number":229,"context_line":"        elif self.counters[0][0] \u003d\u003d \u0027!\u0027:"},{"line_number":230,"context_line":"            return not (\u0027!\u0027 + counter_name) in self.counters"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            return counter_name in self.counters"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fccc%3D","line":230,"in_reply_to":"AAAAM3%2F%2FcdI%3D","updated":"2013-01-22 14:47:36.000000000","message":"Thanks!","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"21fc7b783ee07e535fcd9e4771c4fc3319fe2c67","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        if \u0027*\u0027 in self.counters:"},{"line_number":228,"context_line":"            return True"},{"line_number":229,"context_line":"        elif self.counters[0][0] \u003d\u003d \u0027!\u0027:"},{"line_number":230,"context_line":"            return not (\u0027!\u0027 + counter_name) in self.counters"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            return counter_name in self.counters"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FcdI%3D","line":230,"in_reply_to":"AAAAM3%2F%2Fcdw%3D","updated":"2013-01-22 10:06:39.000000000","message":"Ok got it. That rules is made so the \u0027*\u0027 is implicit if your list starts with a \u0027!\u0027, got it.\n\nI\u0027m thinking about this in every way I can, and yeah that seems like a good solution indeed. It\u0027s not really \"consistent\" but I think it\u0027s simplify list writing, so I\u0027m fine with that.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"a68cfa079bd07619a9d6be27efa15d44a7422f4d","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        if \u0027*\u0027 in self.counters:"},{"line_number":228,"context_line":"            return True"},{"line_number":229,"context_line":"        elif self.counters[0][0] \u003d\u003d \u0027!\u0027:"},{"line_number":230,"context_line":"            return not (\u0027!\u0027 + counter_name) in self.counters"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            return counter_name in self.counters"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fcdw%3D","line":230,"in_reply_to":"AAAAM3%2F%2Fcek%3D","updated":"2013-01-22 10:00:07.000000000","message":"Sorry that not the situation you are talking about (so it\u0027s really not obvious!). The situation is like, the counter spec is [\u0027!b\u0027, \u0027!c\u0027], and we want to check if \u0027a\u0027 will be supported by this counter spec.\n\nI\u0027m sure there is a better method to achieve this, but didn\u0027t find it :(","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5440e74730a5ae53881012fb1a71822b9c7569d2","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        if \u0027*\u0027 in self.counters:"},{"line_number":228,"context_line":"            return True"},{"line_number":229,"context_line":"        elif self.counters[0][0] \u003d\u003d \u0027!\u0027:"},{"line_number":230,"context_line":"            return not (\u0027!\u0027 + counter_name) in self.counters"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            return counter_name in self.counters"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fcek%3D","line":230,"in_reply_to":"AAAAM3%2F%2Fcuo%3D","updated":"2013-01-22 09:49:45.000000000","message":"Oh, that doesn\u0027t sound obvious. I think I\u0027d simplify things the spec and implementation by stating that exclusion take precedence over inclusion so:\n\n[!a, a, a, a] \u003d\u003e []\n\n[b, !a, a, a] \u003d\u003e [b]\n\n[b, !b, a] \u003d\u003e [a]","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        if \u0027*\u0027 in self.counters:"},{"line_number":228,"context_line":"            return True"},{"line_number":229,"context_line":"        elif self.counters[0][0] \u003d\u003d \u0027!\u0027:"},{"line_number":230,"context_line":"            return not (\u0027!\u0027 + counter_name) in self.counters"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            return counter_name in self.counters"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fcuo%3D","line":230,"in_reply_to":"AAAAM3%2F%2Fd9k%3D","updated":"2013-01-22 05:24:50.000000000","message":"This is for Counters spec like [\u0027!c\u0027, \u0027!b\u0027], i.e. all are excluded format. \n\nAccording to the rule, if the counter spec has an excluded counter , then should have no included counter. So if we find counters[0][0] \u003d\u003d\u0027!\u0027, it means it\u0027s an excluded format. Then we only need check \u0027!a\" is not in the counter specs.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def __init__(self, cfg, publisher_manager):"},{"line_number":299,"context_line":"        \"\"\"Create the pipeline manager\"\"\""},{"line_number":300,"context_line":"        self._setup_pipelines(cfg, publisher_manager)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def pipelines_for_counter(self, counter_name):"},{"line_number":303,"context_line":"        \"\"\"Get all pipelines that support counter\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd9Y%3D","line":300,"updated":"2013-01-21 12:38:46.000000000","message":"Is there a particular reason not merge _setup_pipelines and __init__?","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5440e74730a5ae53881012fb1a71822b9c7569d2","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def __init__(self, cfg, publisher_manager):"},{"line_number":299,"context_line":"        \"\"\"Create the pipeline manager\"\"\""},{"line_number":300,"context_line":"        self._setup_pipelines(cfg, publisher_manager)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def pipelines_for_counter(self, counter_name):"},{"line_number":303,"context_line":"        \"\"\"Get all pipelines that support counter\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FceY%3D","line":300,"in_reply_to":"AAAAM3%2F%2Fcuk%3D","updated":"2013-01-22 09:49:45.000000000","message":"No strong objection, it just made me scroll for one line long code so I was upset and told you ;-)","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def __init__(self, cfg, publisher_manager):"},{"line_number":299,"context_line":"        \"\"\"Create the pipeline manager\"\"\""},{"line_number":300,"context_line":"        self._setup_pipelines(cfg, publisher_manager)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def pipelines_for_counter(self, counter_name):"},{"line_number":303,"context_line":"        \"\"\"Get all pipelines that support counter\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fcuk%3D","line":300,"in_reply_to":"AAAAM3%2F%2Fd9Y%3D","updated":"2013-01-22 05:24:50.000000000","message":"No special reason, I simply want to keep the functions be separated and cleaner (IMHO setup_pipelines() is only part of __init__()\u0027s functionality). Do you have strong objection to this? If yes, I will change it, otherwise, I\u0027d keep it as is.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        mapping cache for different interval support."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        \"\"\""},{"line_number":316,"context_line":"        # Utilize a cache"},{"line_number":317,"context_line":"        for p in self.pipelines:"},{"line_number":318,"context_line":"            if p.support_counter(counter.name):"},{"line_number":319,"context_line":"                p.publish_counter(ctxt, counter, source)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd9Q%3D","line":316,"updated":"2013-01-21 12:38:46.000000000","message":"I guess you mean TODO here?","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        mapping cache for different interval support."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        \"\"\""},{"line_number":316,"context_line":"        # Utilize a cache"},{"line_number":317,"context_line":"        for p in self.pipelines:"},{"line_number":318,"context_line":"            if p.support_counter(counter.name):"},{"line_number":319,"context_line":"                p.publish_counter(ctxt, counter, source)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fcug%3D","line":316,"in_reply_to":"AAAAM3%2F%2Fd9Q%3D","updated":"2013-01-22 05:24:50.000000000","message":"Oops, yes.","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"75e3cf38b94214af219b0f09bb12ce3a3aafca05","unresolved":false,"context_lines":[{"line_number":322,"context_line":"def setup_pipeline(publisher_manager):"},{"line_number":323,"context_line":"    \"\"\"Setup pipeline manager according to yaml config file.\"\"\""},{"line_number":324,"context_line":"    try:"},{"line_number":325,"context_line":"        with open(cfg.CONF.pipeline_cfg_file) as fap:"},{"line_number":326,"context_line":"            data \u003d fap.read()"},{"line_number":327,"context_line":"    except IOError as err:"},{"line_number":328,"context_line":"        LOG.warn(\"Failed to load pipeline config file %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fd9g%3D","line":325,"updated":"2013-01-21 12:38:46.000000000","message":"You should use cfg.CONF.find_file() (as it\u0027s done in ceilometer.policy, check it)","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3853924e921c9bda2d48a97370be866c57cdc93f","unresolved":false,"context_lines":[{"line_number":322,"context_line":"def setup_pipeline(publisher_manager):"},{"line_number":323,"context_line":"    \"\"\"Setup pipeline manager according to yaml config file.\"\"\""},{"line_number":324,"context_line":"    try:"},{"line_number":325,"context_line":"        with open(cfg.CONF.pipeline_cfg_file) as fap:"},{"line_number":326,"context_line":"            data \u003d fap.read()"},{"line_number":327,"context_line":"    except IOError as err:"},{"line_number":328,"context_line":"        LOG.warn(\"Failed to load pipeline config file %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FcuY%3D","line":325,"in_reply_to":"AAAAM3%2F%2Fd9g%3D","updated":"2013-01-22 05:24:50.000000000","message":"Thanks for suggestion. Forgot that urgent bug in G2 release :$","commit_id":"efea1a5df8b631467388ed1d9dceb9db456147a8"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"998b992c85ac774e39d3627409a5b958fddf4cbe","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        transformer_cfg \u003d cfg[\u0027transformers\u0027] or []"},{"line_number":129,"context_line":"        transformers \u003d []"},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            transformer_manager \u003d TransformerExtensionManager()"},{"line_number":132,"context_line":"            for transformer in transformer_cfg:"},{"line_number":133,"context_line":"                ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])"},{"line_number":134,"context_line":"                parameter \u003d transformer[\u0027parameters\u0027] or {}"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FXjk%3D","line":131,"updated":"2013-01-25 06:59:35.000000000","message":"I believe the transformer_manager could be a class attribute, so there is no need to create the TransofmerExtenionManger() instance every time we create a pipeline.","commit_id":"3a18bd83b5796fef07aa53fd9d9fc5ad54bfee67"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"998b992c85ac774e39d3627409a5b958fddf4cbe","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                     This is mainly for flush() invocation that transformer"},{"line_number":177,"context_line":"                     may emit counters"},{"line_number":178,"context_line":"        param ctxt: execution context from the manager or service"},{"line_number":179,"context_line":"        param counters: counter"},{"line_number":180,"context_line":"        param source: counter source"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FXig%3D","line":179,"updated":"2013-01-25 06:59:35.000000000","message":"should be \u0027counter\u0027","commit_id":"3a18bd83b5796fef07aa53fd9d9fc5ad54bfee67"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"7f49e72b3258bca9a5f34709324f62c9bc9a25b6","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        mapping cache for different interval support."},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        \"\"\""},{"line_number":336,"context_line":"        # TODO Utilize a cache"},{"line_number":337,"context_line":"        for p in self.pipelines:"},{"line_number":338,"context_line":"            if p.support_counter(counter.name):"},{"line_number":339,"context_line":"                p.publish_counter(ctxt, counter, source)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FSKw%3D","line":336,"updated":"2013-01-30 10:39:42.000000000","message":"I think HACKING says you should use TODO(your name).","commit_id":"4dc0abcada81c42ffc8ceb37775f509f664e6de3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                         \"with parameter %s\","},{"line_number":137,"context_line":"                         transformer[\u0027name\u0027],"},{"line_number":138,"context_line":"                         parameter)"},{"line_number":139,"context_line":"        except AttributeError:"},{"line_number":140,"context_line":"            raise PipelineException("},{"line_number":141,"context_line":"                \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":142,"context_line":"                cfg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRY4%3D","line":139,"updated":"2013-01-30 23:30:33.000000000","message":"What attribute are you expecting to be missing here?","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                         \"with parameter %s\","},{"line_number":137,"context_line":"                         transformer[\u0027name\u0027],"},{"line_number":138,"context_line":"                         parameter)"},{"line_number":139,"context_line":"        except AttributeError:"},{"line_number":140,"context_line":"            raise PipelineException("},{"line_number":141,"context_line":"                \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":142,"context_line":"                cfg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQY8%3D","line":139,"in_reply_to":"AAAAM3%2F%2FRY4%3D","updated":"2013-01-31 10:10:05.000000000","message":"Remove the try/exception block, and check the ext value explicitly.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            for transformer in self.transformers[start:]:"},{"line_number":159,"context_line":"                counter \u003d transformer.handle_sample(ctxt, counter, source)"},{"line_number":160,"context_line":"                if not counter:"},{"line_number":161,"context_line":"                    LOG.warn(\"Pipeline %s: Counter dropped by transformer %s\","},{"line_number":162,"context_line":"                             self, transformer)"},{"line_number":163,"context_line":"                    return"},{"line_number":164,"context_line":"            return counter"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRYk%3D","line":161,"updated":"2013-01-30 23:30:33.000000000","message":"If dropping counters is going to be common, we don\u0027t want to log it as a warning. Maybe use debug instead?","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            for transformer in self.transformers[start:]:"},{"line_number":159,"context_line":"                counter \u003d transformer.handle_sample(ctxt, counter, source)"},{"line_number":160,"context_line":"                if not counter:"},{"line_number":161,"context_line":"                    LOG.warn(\"Pipeline %s: Counter dropped by transformer %s\","},{"line_number":162,"context_line":"                             self, transformer)"},{"line_number":163,"context_line":"                    return"},{"line_number":164,"context_line":"            return counter"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQY4%3D","line":161,"in_reply_to":"AAAAM3%2F%2FRYk%3D","updated":"2013-01-31 10:10:05.000000000","message":"Done.\n\nBTW, it possibly not that common :)","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        LOG.audit(\"Pipeline %s: Published counter %s\", self, counter)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def __init__(self, cfg, publisher_manager, transformer_manager):"},{"line_number":199,"context_line":"        self.cfg \u003d cfg"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRX4%3D","line":198,"updated":"2013-01-30 23:30:33.000000000","message":"Could you move this method to the top of the class so it is clear that there is a constructor?","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        LOG.audit(\"Pipeline %s: Published counter %s\", self, counter)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def __init__(self, cfg, publisher_manager, transformer_manager):"},{"line_number":199,"context_line":"        self.cfg \u003d cfg"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQYw%3D","line":198,"in_reply_to":"AAAAM3%2F%2FRX4%3D","updated":"2013-01-31 10:10:05.000000000","message":"Done","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            self.publisher_manager \u003d publisher_manager"},{"line_number":209,"context_line":"        except KeyError as err:"},{"line_number":210,"context_line":"            LOG.exception(err)"},{"line_number":211,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":212,"context_line":"        except ValueError:"},{"line_number":213,"context_line":"            raise PipelineException(\"Invalid interval value\", cfg)"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRX0%3D","line":211,"updated":"2013-01-30 23:30:33.000000000","message":"It would be helpful if this message said which field is missing. That information should be part of err.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            self.publisher_manager \u003d publisher_manager"},{"line_number":209,"context_line":"        except KeyError as err:"},{"line_number":210,"context_line":"            LOG.exception(err)"},{"line_number":211,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":212,"context_line":"        except ValueError:"},{"line_number":213,"context_line":"            raise PipelineException(\"Invalid interval value\", cfg)"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQV0%3D","line":211,"in_reply_to":"AAAAM3%2F%2FRX0%3D","updated":"2013-01-31 10:10:05.000000000","message":"With LOG.exception(err), the filed name should have been printed already. Not sure if that\u0027s acceptable.\n\nAlthough the err has the key name, but it\u0027s not formally documented so I prefer not to use it.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            LOG.exception(err)"},{"line_number":211,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":212,"context_line":"        except ValueError:"},{"line_number":213,"context_line":"            raise PipelineException(\"Invalid interval value\", cfg)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if self.interval \u003c\u003d 0:"},{"line_number":216,"context_line":"            raise PipelineException(\"Interval value should \u003e 0\", cfg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRXo%3D","line":213,"updated":"2013-01-30 23:30:33.000000000","message":"This error message should include enough detail so the user can tell which value is invalid (the key name and the value provided, as well as the error message from trying to convert it to something else).","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            LOG.exception(err)"},{"line_number":211,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":212,"context_line":"        except ValueError:"},{"line_number":213,"context_line":"            raise PipelineException(\"Invalid interval value\", cfg)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if self.interval \u003c\u003d 0:"},{"line_number":216,"context_line":"            raise PipelineException(\"Interval value should \u003e 0\", cfg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQVw%3D","line":213,"in_reply_to":"AAAAM3%2F%2FRXo%3D","updated":"2013-01-31 10:10:05.000000000","message":"This is only for interval value. I have moved it to the corresponding code. Done","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        \"\"\"Flush data after all counter have been injected to pipeline.\"\"\""},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        LOG.audit(\"Flush pipeline %s\", self)"},{"line_number":253,"context_line":"        for (i, transformer) in zip(range(len(self.transformers)),"},{"line_number":254,"context_line":"                                    self.transformers):"},{"line_number":255,"context_line":"            for c in transformer.flush(ctxt, source):"},{"line_number":256,"context_line":"                self._publish_counter(i + 1, ctxt, c, source)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRWY%3D","line":253,"updated":"2013-01-30 23:30:33.000000000","message":"I think this zip(range(len())) construction could be reduced to enumerate(), couldn\u0027t it?","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        \"\"\"Flush data after all counter have been injected to pipeline.\"\"\""},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        LOG.audit(\"Flush pipeline %s\", self)"},{"line_number":253,"context_line":"        for (i, transformer) in zip(range(len(self.transformers)),"},{"line_number":254,"context_line":"                                    self.transformers):"},{"line_number":255,"context_line":"            for c in transformer.flush(ctxt, source):"},{"line_number":256,"context_line":"                self._publish_counter(i + 1, ctxt, c, source)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQVk%3D","line":253,"in_reply_to":"AAAAM3%2F%2FRWY%3D","updated":"2013-01-31 10:10:05.000000000","message":"Good point.\nDone","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        for (i, transformer) in zip(range(len(self.transformers)),"},{"line_number":254,"context_line":"                                    self.transformers):"},{"line_number":255,"context_line":"            for c in transformer.flush(ctxt, source):"},{"line_number":256,"context_line":"                self._publish_counter(i + 1, ctxt, c, source)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def get_interval(self):"},{"line_number":259,"context_line":"        return self.interval"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRTQ%3D","line":256,"updated":"2013-01-30 23:30:33.000000000","message":"This nested loop looks expensive (O(n^2)?), and I\u0027m concerned that it could end up causing data to be published more than once. I need some more time to think about the transformer API, but maybe we want them to be invoking each other instead of looping over them in the pipeline class to avoid all of the looping. I think we can go ahead with this patch, and adjust, but I wanted to bring it up.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        for (i, transformer) in zip(range(len(self.transformers)),"},{"line_number":254,"context_line":"                                    self.transformers):"},{"line_number":255,"context_line":"            for c in transformer.flush(ctxt, source):"},{"line_number":256,"context_line":"                self._publish_counter(i + 1, ctxt, c, source)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def get_interval(self):"},{"line_number":259,"context_line":"        return self.interval"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQUo%3D","line":256,"in_reply_to":"AAAAM3%2F%2FRTQ%3D","updated":"2013-01-31 10:10:05.000000000","message":"1) I think this situation will only happen for buffered transformer and hope it will not be common case, most of the time the flush() will have nothing returned.\n\n2) I considered to arrange the transformer as something like a link (i.e. each transformer knows which transformer behind it in the pipeline), but that logical is not so clean as this one. And that will not improve the performance either, thus I abandon that method in the end.\n\n3) I think the data will not be published more than once. Or possibly I missed something important. I can fix them later if any finding.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                   transformer_manager)"},{"line_number":316,"context_line":"                          for pipedef in cfg]"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def __init__(self, cfg, publisher_manager):"},{"line_number":319,"context_line":"        \"\"\"Create the pipeline manager\"\"\""},{"line_number":320,"context_line":"        self._setup_pipelines(cfg, publisher_manager)"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRTM%3D","line":318,"updated":"2013-01-30 23:30:33.000000000","message":"Please move this to the top of the class definition.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                   transformer_manager)"},{"line_number":316,"context_line":"                          for pipedef in cfg]"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def __init__(self, cfg, publisher_manager):"},{"line_number":319,"context_line":"        \"\"\"Create the pipeline manager\"\"\""},{"line_number":320,"context_line":"        self._setup_pipelines(cfg, publisher_manager)"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQUk%3D","line":318,"in_reply_to":"AAAAM3%2F%2FRTM%3D","updated":"2013-01-31 10:10:05.000000000","message":"Done","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":344,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":345,"context_line":"    if not os.path.exists(cfg_file):"},{"line_number":346,"context_line":"        try:"},{"line_number":347,"context_line":"            cfg_file \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":348,"context_line":"        except Exception as err:"},{"line_number":349,"context_line":"            LOG.exception(err)"},{"line_number":350,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRS4%3D","line":347,"updated":"2013-01-30 23:30:33.000000000","message":"The final filename should be logged using a debug() message.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":344,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":345,"context_line":"    if not os.path.exists(cfg_file):"},{"line_number":346,"context_line":"        try:"},{"line_number":347,"context_line":"            cfg_file \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":348,"context_line":"        except Exception as err:"},{"line_number":349,"context_line":"            LOG.exception(err)"},{"line_number":350,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQUE%3D","line":347,"in_reply_to":"AAAAM3%2F%2FRS4%3D","updated":"2013-01-31 10:10:05.000000000","message":"Done","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":347,"context_line":"            cfg_file \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":348,"context_line":"        except Exception as err:"},{"line_number":349,"context_line":"            LOG.exception(err)"},{"line_number":350,"context_line":"            return"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    try:"},{"line_number":353,"context_line":"        with open(cfg_file) as fap:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRTE%3D","line":350,"updated":"2013-01-30 23:30:33.000000000","message":"Exceptions in this function are probably fatal and should be logged by the caller, so you don\u0027t need to catch them here.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":347,"context_line":"            cfg_file \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":348,"context_line":"        except Exception as err:"},{"line_number":349,"context_line":"            LOG.exception(err)"},{"line_number":350,"context_line":"            return"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    try:"},{"line_number":353,"context_line":"        with open(cfg_file) as fap:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQUA%3D","line":350,"in_reply_to":"AAAAM3%2F%2FRTE%3D","updated":"2013-01-31 10:10:05.000000000","message":"Done.\n\nI caught them here originally to make the manager test case working, otherwise, all cases related to agent_manager will fail because of this exception that no pipeline.yaml.\n\nI changed the test cases to mock the setup_pipeline() instead and not catch the exception here anymore.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5741f1369f8679062ca9d36902d2df0162e02cd2","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            self.publisher_manager \u003d publisher_manager"},{"line_number":103,"context_line":"        except KeyError as err:"},{"line_number":104,"context_line":"            LOG.exception(err)"},{"line_number":105,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if self.interval \u003c\u003d 0:"},{"line_number":108,"context_line":"            raise PipelineException(\"Interval value should \u003e 0\", cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FPPY%3D","line":105,"updated":"2013-01-31 21:30:01.000000000","message":"The LOG.exception() call does print the key name, but that message may be very far from the message logged when the PipelineException is logged. Rather than logging a traceback here, it would make it much easier to debug issues if the key name is included in the PipelinException and the KeyError is not logged at all (because that eliminates a duplicate traceback).","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"1bd4f88ee453dfec0890b21957ec10ee089d84b6","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            self.publisher_manager \u003d publisher_manager"},{"line_number":103,"context_line":"        except KeyError as err:"},{"line_number":104,"context_line":"            LOG.exception(err)"},{"line_number":105,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if self.interval \u003c\u003d 0:"},{"line_number":108,"context_line":"            raise PipelineException(\"Interval value should \u003e 0\", cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FMPc%3D","line":105,"in_reply_to":"AAAAM3%2F%2FN7g%3D","updated":"2013-02-04 09:35:35.000000000","message":"Done","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"89d7e41c8edd745009387648afec77ce85968cfc","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            self.publisher_manager \u003d publisher_manager"},{"line_number":103,"context_line":"        except KeyError as err:"},{"line_number":104,"context_line":"            LOG.exception(err)"},{"line_number":105,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if self.interval \u003c\u003d 0:"},{"line_number":108,"context_line":"            raise PipelineException(\"Interval value should \u003e 0\", cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FN7g%3D","line":105,"in_reply_to":"AAAAM3%2F%2FOao%3D","updated":"2013-02-01 19:10:59.000000000","message":"KeyError.args[0] is the key name in Python 2.7 and 3.x. I don\u0027t see that changing, since it is common to use it even if it isn\u0027t formally documented that way. I like (a), modified to look at err.args[0] instead of str(err).","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"38eae74ab15a5662d135081c619145cd250c4493","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            self.publisher_manager \u003d publisher_manager"},{"line_number":103,"context_line":"        except KeyError as err:"},{"line_number":104,"context_line":"            LOG.exception(err)"},{"line_number":105,"context_line":"            raise PipelineException(\"Not all required fields specified\", cfg)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if self.interval \u003c\u003d 0:"},{"line_number":108,"context_line":"            raise PipelineException(\"Interval value should \u003e 0\", cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FOao%3D","line":105,"in_reply_to":"AAAAM3%2F%2FPPY%3D","updated":"2013-02-01 12:11:51.000000000","message":"You are right that the message may be very far from where the PipelineException is logged.\n\nHowever, I didn\u0027t find a good solution here.\na) fetch the key information from err like:\n       except KeyError as err:\n            LOG.exception(err)\n            raise PipelineException(\"Fields %s not specified\" % str(err), cfg)\n\nAlthough it works, but there is no document stating that str(err) is sure to return the missing key, so I\u0027m not sure if it\u0027s acceptable.\n\nb) have try...except pair for each cfg[\u0027] access like followed code and is also not good.\ntry:\n    self.name \u003d cfg[\u0027name\u0027]\nexcept KeyError as err:\n    .....\n\ntry:\n    self.interval \u003d cfg[\u0027interval\u0027]\nexcept KeyError as err:\n   .....\n\nc) Not catch here at all. Then we can have the caller to print the trace and give the key information. But then we have no chance to show user the config item.\n\nWhich one would you prefer to?\n\n--jyh","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5741f1369f8679062ca9d36902d2df0162e02cd2","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        for transformer in transformer_cfg:"},{"line_number":158,"context_line":"            parameter \u003d transformer[\u0027parameters\u0027] or {}"},{"line_number":159,"context_line":"            ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])"},{"line_number":160,"context_line":"            if not ext:"},{"line_number":161,"context_line":"                raise PipelineException("},{"line_number":162,"context_line":"                    \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":163,"context_line":"                    cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FPPM%3D","line":160,"updated":"2013-01-31 21:30:01.000000000","message":"Why not make the transformer manager raise an exception is there is no \"ext\" value? That means the caller doesn\u0027t have to check the return value, and the traceback includes the full stack to the point where the error occurred.","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"1bd4f88ee453dfec0890b21957ec10ee089d84b6","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        for transformer in transformer_cfg:"},{"line_number":158,"context_line":"            parameter \u003d transformer[\u0027parameters\u0027] or {}"},{"line_number":159,"context_line":"            ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])"},{"line_number":160,"context_line":"            if not ext:"},{"line_number":161,"context_line":"                raise PipelineException("},{"line_number":162,"context_line":"                    \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":163,"context_line":"                    cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FMPY%3D","line":160,"in_reply_to":"AAAAM3%2F%2FN7Q%3D","updated":"2013-02-04 09:35:35.000000000","message":"Done.","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"89d7e41c8edd745009387648afec77ce85968cfc","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        for transformer in transformer_cfg:"},{"line_number":158,"context_line":"            parameter \u003d transformer[\u0027parameters\u0027] or {}"},{"line_number":159,"context_line":"            ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])"},{"line_number":160,"context_line":"            if not ext:"},{"line_number":161,"context_line":"                raise PipelineException("},{"line_number":162,"context_line":"                    \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":163,"context_line":"                    cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FN7Q%3D","line":160,"in_reply_to":"AAAAM3%2F%2FOa4%3D","updated":"2013-02-01 19:10:59.000000000","message":"That looks OK, although it would be better if the transformer manager could just raise an exception with a complete message itself.","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"38eae74ab15a5662d135081c619145cd250c4493","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        for transformer in transformer_cfg:"},{"line_number":158,"context_line":"            parameter \u003d transformer[\u0027parameters\u0027] or {}"},{"line_number":159,"context_line":"            ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])"},{"line_number":160,"context_line":"            if not ext:"},{"line_number":161,"context_line":"                raise PipelineException("},{"line_number":162,"context_line":"                    \"No transformer named %s loaded\" % transformer[\u0027name\u0027],"},{"line_number":163,"context_line":"                    cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2FOa4%3D","line":160,"in_reply_to":"AAAAM3%2F%2FPPM%3D","updated":"2013-02-01 12:11:51.000000000","message":"I\u0027m fault here. The transformer_manager.get_ext(transformer[\u0027name\u0027]) will raise an exception indeed, thus the code of \"if not ext:\" will not be executed at all.\n\nI\u0027d change it to be followed code, would it be ok? This way the PipelineException provide everything and user don\u0027t need not the calltrace in transformer_manager.get_ext.\n\n\n            try:\n                ext \u003d transformer_manager.get_ext(transformer[\u0027name\u0027])\n            except KeyError:\n                raise PipelineException(\n                    \"No transformer named %s loaded\" % transformer[\u0027name\u0027],\n                    cfg)","commit_id":"5706c7781fe0497a2e4eddbea5f9df228a581763"}],"ceilometer/plugin.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __metaclass__ \u003d abc.ABCMeta"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _handle_sample(self, context, original, transformed, source):"},{"line_number":102,"context_line":"        \"\"\"Overwriten by subclass if needed\"\"\""},{"line_number":103,"context_line":"        pass"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1bs%3D","line":101,"updated":"2012-12-13 12:28:31.000000000","message":"The leading underscore looks wrong for a method intended to be overridden by a subclass.","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __metaclass__ \u003d abc.ABCMeta"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _handle_sample(self, context, original, transformed, source):"},{"line_number":102,"context_line":"        \"\"\"Overwriten by subclass if needed\"\"\""},{"line_number":103,"context_line":"        pass"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0U8%3D","line":101,"in_reply_to":"AAAAMX%2F%2F1bs%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                           transformed data from previous transformer"},{"line_number":117,"context_line":"            source: Passed from data collect."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def __init__(self, counters, publishers, **kwargs):"},{"line_number":122,"context_line":"        \"\"\"Setup transformer"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1bw%3D","line":119,"updated":"2012-12-13 12:28:31.000000000","message":"Shouldn\u0027t the docstring be above the function code?","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                           transformed data from previous transformer"},{"line_number":117,"context_line":"            source: Passed from data collect."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def __init__(self, counters, publishers, **kwargs):"},{"line_number":122,"context_line":"        \"\"\"Setup transformer"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0U4%3D","line":119,"in_reply_to":"AAAAMX%2F%2F1bw%3D","updated":"2012-12-16 10:10:29.000000000","message":"Oops, this paragraph are added before sending out :$","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"35a59321d68931802aae06e839d1b7236f8c92d7","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __metaclass__ \u003d abc.ABCMeta"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def handle_sample(self, context, original, transformed, source):"},{"line_number":102,"context_line":"        \"\"\"Overwriten by subclass if needed\"\"\""},{"line_number":103,"context_line":"        pass"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Fmc%3D","line":101,"updated":"2012-12-17 11:12:11.000000000","message":"You\u0027re supposed to use @abc.abstractmethod I think.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"756241fe6a9797596bd06baffb1505ae5db849d0","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __metaclass__ \u003d abc.ABCMeta"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def handle_sample(self, context, original, transformed, source):"},{"line_number":102,"context_line":"        \"\"\"Overwriten by subclass if needed\"\"\""},{"line_number":103,"context_line":"        pass"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BTY%3D","line":101,"in_reply_to":"AAAAM3%2F%2F%2BVw%3D","updated":"2012-12-18 10:19:04.000000000","message":"Ooops, Can\u0027t imagine that I forgot NotImplemented!","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"cd95fd4feb46539b5fd86e468b201948b445f4bd","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __metaclass__ \u003d abc.ABCMeta"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def handle_sample(self, context, original, transformed, source):"},{"line_number":102,"context_line":"        \"\"\"Overwriten by subclass if needed\"\"\""},{"line_number":103,"context_line":"        pass"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2BVw%3D","line":101,"in_reply_to":"AAAAM3%2F%2F%2Bfg%3D","updated":"2012-12-18 09:17:33.000000000","message":"Ok, but pass doesn\u0027t look like a good default to me. At least raise NotImplemented or do something that makes sense by default, rather than silently drop samples :)","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"23cbb340c8975597490d7cd2c1c65574ffa4252e","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __metaclass__ \u003d abc.ABCMeta"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def handle_sample(self, context, original, transformed, source):"},{"line_number":102,"context_line":"        \"\"\"Overwriten by subclass if needed\"\"\""},{"line_number":103,"context_line":"        pass"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F%2Bfg%3D","line":101,"in_reply_to":"AAAAM3%2F%2F%2Fmc%3D","updated":"2012-12-18 05:53:26.000000000","message":"Some subclass may provide the handle_samples() and thus will not implement the handle_sample(), for example, if multiple transformed for a single counter.","commit_id":"0b09bfe5612125bbd077fedc13d28fa2a6f1e44a"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @abc.abstractmethod"},{"line_number":92,"context_line":"    def publish_counter(self, context, counter, source):"},{"line_number":93,"context_line":"        \"publish counters into final conduit\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"class TransformerBase(PluginBase):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRSw%3D","line":93,"updated":"2013-01-30 23:30:33.000000000","message":"What is the source argument?","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @abc.abstractmethod"},{"line_number":92,"context_line":"    def publish_counter(self, context, counter, source):"},{"line_number":93,"context_line":"        \"publish counters into final conduit\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"class TransformerBase(PluginBase):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQhg%3D","line":93,"in_reply_to":"AAAAM3%2F%2FRSw%3D","updated":"2013-01-31 10:10:05.000000000","message":"It\u0027s left from current publish code, which is in fact cfg.CONF.counter_source. As this is a generic configuration about counter, thus I keep it still in the multiple publisher code.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        \"\"\"Flush counters cached previously\"\"\""},{"line_number":114,"context_line":"        return []"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def __init__(self, **parameter):"},{"line_number":117,"context_line":"        \"\"\"Setup transformer"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        Each time a transformed is involved in a pipeline, a new transformer"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FRSo%3D","line":116,"updated":"2013-01-30 23:30:33.000000000","message":"This constructor doesn\u0027t seem to do anything, and it discards all of the input arguments. Is it needed?\n\nPerhaps instead of **parameter, the argument should just be parameters and be passed as a dictionary instance? That way the names of the parameters don\u0027t always have to be valid Python argument identifiers.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        \"\"\"Flush counters cached previously\"\"\""},{"line_number":114,"context_line":"        return []"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def __init__(self, **parameter):"},{"line_number":117,"context_line":"        \"\"\"Setup transformer"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        Each time a transformed is involved in a pipeline, a new transformer"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQSM%3D","line":116,"in_reply_to":"AAAAM3%2F%2FRSo%3D","updated":"2013-01-31 10:10:05.000000000","message":"My purpose is, if an transformer class have no parameter, the __init__ defined here can be used. If a transformer class need parameter input, it can provide it\u0027s self-defined __init__() function.\n\nThe parameter will be transformer specific. For example, considering followed transformer definition, the key will be \"append_name\", and value will be \"_new\". \n\n            \u0027transformers\u0027: [{\n                \u0027name\u0027: \u0027update\u0027,\n                \u0027parameters\u0027:\n                {\n                    \"append_name\": \"_new\",\n                }\n            }],","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"}],"tests/test_pipeline.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        samples \u003d []"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        def __init__(self, counters, publishers, **kwargs):"},{"line_number":45,"context_line":"            self.__class__.samples \u003d []"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        def handle_samples(self, ctxt, counters, source):"},{"line_number":48,"context_line":"            for c in counters:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1bg%3D","line":45,"updated":"2012-12-13 12:28:31.000000000","message":"s/self.__class__/TransformerClass/","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        samples \u003d []"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        def __init__(self, counters, publishers, **kwargs):"},{"line_number":45,"context_line":"            self.__class__.samples \u003d []"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        def handle_samples(self, ctxt, counters, source):"},{"line_number":48,"context_line":"            for c in counters:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0Uw%3D","line":45,"in_reply_to":"AAAAMX%2F%2F1bg%3D","updated":"2012-12-16 10:10:29.000000000","message":"We have to use __class__. The reason is, the transformer is created in the pipeline setup environment, and I think at that time, it\u0027s in different scope, and  \"TransformerClass\" is not valid.","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        def handle_samples(self, ctxt, counters, source):"},{"line_number":48,"context_line":"            for c in counters:"},{"line_number":49,"context_line":"                self.samples.append(c[0])"},{"line_number":50,"context_line":"                yield c[0], c[1]._replace(name\u003d\u0027update\u0027)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    class TransformerClassNew(object):"},{"line_number":53,"context_line":"        samples \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1bU%3D","line":50,"updated":"2012-12-13 12:28:31.000000000","message":"Why not append \u0027_update\u0027 instead of replacing?\n\nThen the multi-transformer test can check if name \u003d \"a_update_update2..._updateN\" etc. to ensure that all transformers have run in the expected order.","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        def handle_samples(self, ctxt, counters, source):"},{"line_number":48,"context_line":"            for c in counters:"},{"line_number":49,"context_line":"                self.samples.append(c[0])"},{"line_number":50,"context_line":"                yield c[0], c[1]._replace(name\u003d\u0027update\u0027)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    class TransformerClassNew(object):"},{"line_number":53,"context_line":"        samples \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0Us%3D","line":50,"in_reply_to":"AAAAMX%2F%2F1bU%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0e5796b47da1e4ec3d598544689de065714f3a3e","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        self.assertTrue(getattr(self.new_publisher.counters[0], \"name\")"},{"line_number":272,"context_line":"                        \u003d\u003d \u0027new\u0027)"},{"line_number":273,"context_line":"        self.assertTrue(getattr(self.TransformerClassNew.samples[0], \"name\")"},{"line_number":274,"context_line":"                        \u003d\u003d \u0027b\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1bQ%3D","line":274,"updated":"2012-12-13 12:28:31.000000000","message":"Do you need tests for:\n\n- a multi-transformer pipeline where the first transform discards, assert second transfromer not called\n\n- a multi-transformer pipeline that asserts if the original counter (first item in counter tuple) is passed through unchanged\n\n- a multi-publisher pipeline that asserts that all publishers called in the correct order\n\n- a multi-publisher pipeline that asserts a failure in one publisher doesn\u0027t prevent the rest of the chain being traversed","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"ed474b58b380564eaf1b06f1fef8f939557519cb","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        self.assertTrue(getattr(self.new_publisher.counters[0], \"name\")"},{"line_number":272,"context_line":"                        \u003d\u003d \u0027new\u0027)"},{"line_number":273,"context_line":"        self.assertTrue(getattr(self.TransformerClassNew.samples[0], \"name\")"},{"line_number":274,"context_line":"                        \u003d\u003d \u0027b\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0NQ%3D","line":274,"in_reply_to":"AAAAMX%2F%2F1bQ%3D","updated":"2012-12-16 10:10:29.000000000","message":"Done.\nDo you think any special reason to guarantee the publisher order? I don\u0027t think we need keep that.\n\nOthers are added, with more test like exception in one pipeline, the other one should not be impacted.","commit_id":"aa7d8d7b8a13c14fe098de86f7371458f599437a"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        pipe_1 \u003d pipeline_manager.pipelines_for_counter(\u0027b\u0027)[0]"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        pipe.publish_counter(None, self.test_counter, None)"},{"line_number":412,"context_line":"        self.test_counter \u003d self.test_counter._replace(name\u003d\u0027b\u0027)"},{"line_number":413,"context_line":"        pipe_1.publish_counter(None, self.test_counter, None)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        self.assertTrue(len(self.publisher.counters) \u003d\u003d 1)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FROM%3D","line":412,"updated":"2013-01-30 23:30:33.000000000","message":"Why not make a new counter instance here?","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        pipe_1 \u003d pipeline_manager.pipelines_for_counter(\u0027b\u0027)[0]"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        pipe.publish_counter(None, self.test_counter, None)"},{"line_number":412,"context_line":"        self.test_counter \u003d self.test_counter._replace(name\u003d\u0027b\u0027)"},{"line_number":413,"context_line":"        pipe_1.publish_counter(None, self.test_counter, None)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        self.assertTrue(len(self.publisher.counters) \u003d\u003d 1)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FQnM%3D","line":412,"in_reply_to":"AAAAM3%2F%2FROM%3D","updated":"2013-01-31 10:10:05.000000000","message":"Counter\u0027s _replace() will return a new instance because namedtuple is immutable.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"}],"tools/pip-requires":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"24fb5e7f327c880edd3bf77b85d2b505db8e05c3","unresolved":false,"context_lines":[{"line_number":18,"context_line":"lxml"},{"line_number":19,"context_line":"requests\u003c1.0"},{"line_number":20,"context_line":"extras"},{"line_number":21,"context_line":"pyyaml"}],"source_content_type":"application/octet-stream","patch_set":12,"id":"AAAAM3%2F%2FQ9k%3D","line":21,"updated":"2013-01-30 23:30:33.000000000","message":"We should specify a version for the new dependency.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"86ad8c87d4ebb7db69d0729ae76f41c95e324ed1","unresolved":false,"context_lines":[{"line_number":18,"context_line":"lxml"},{"line_number":19,"context_line":"requests\u003c1.0"},{"line_number":20,"context_line":"extras"},{"line_number":21,"context_line":"pyyaml"}],"source_content_type":"application/octet-stream","patch_set":12,"id":"AAAAM3%2F%2FQl8%3D","line":21,"in_reply_to":"AAAAM3%2F%2FQ9k%3D","updated":"2013-01-31 10:10:05.000000000","message":"Should we always specify dependency version? We only use very simple yaml functionality,","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"bd0008c8ad40ef3cf9ef205f558c291a765dc43c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"lxml"},{"line_number":19,"context_line":"requests\u003c1.0"},{"line_number":20,"context_line":"extras"},{"line_number":21,"context_line":"pyyaml"}],"source_content_type":"application/octet-stream","patch_set":12,"id":"AAAAM3%2F%2FPOo%3D","line":21,"in_reply_to":"AAAAM3%2F%2FQl8%3D","updated":"2013-01-31 21:30:13.000000000","message":"Yes, we want to protect against API changes.","commit_id":"37b2f7aa21ab3f05b5e289a18023ffc94bacd49b"}]}
