)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ca0548adb113f46ef84dd972d9a713434c33cbee","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch added the support of unavailable metrics in the metric"},{"line_number":10,"context_line":"weigher. Based on the configuration, if an unavailable metric is met,"},{"line_number":11,"context_line":"the metric weigher might eigher throw an exception, or treat the"},{"line_number":12,"context_line":"unavailable metric as the most nagative factor."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"By giving the infinity value to the host\u0027s weight value, we can make"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FRV4%3D","line":11,"updated":"2014-01-15 17:01:39.000000000","message":"s/eigher/either","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d3013074a89ed46ac97de683cdda9a097d4c17f5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch added the support of unavailable metrics in the metric"},{"line_number":10,"context_line":"weigher. Based on the configuration, if an unavailable metric is met,"},{"line_number":11,"context_line":"the metric weigher might eigher throw an exception, or treat the"},{"line_number":12,"context_line":"unavailable metric as the most nagative factor."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"By giving the infinity value to the host\u0027s weight value, we can make"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FPIY%3D","line":11,"in_reply_to":"AAAAUH%2F%2FRV4%3D","updated":"2014-01-16 02:54:43.000000000","message":"Done","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ca0548adb113f46ef84dd972d9a713434c33cbee","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch added the support of unavailable metrics in the metric"},{"line_number":10,"context_line":"weigher. Based on the configuration, if an unavailable metric is met,"},{"line_number":11,"context_line":"the metric weigher might eigher throw an exception, or treat the"},{"line_number":12,"context_line":"unavailable metric as the most nagative factor."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"By giving the infinity value to the host\u0027s weight value, we can make"},{"line_number":15,"context_line":"sure the host with the unavailable metric would be at the end of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FRV0%3D","line":12,"updated":"2014-01-15 17:01:39.000000000","message":"s/nagative/negative/","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d3013074a89ed46ac97de683cdda9a097d4c17f5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch added the support of unavailable metrics in the metric"},{"line_number":10,"context_line":"weigher. Based on the configuration, if an unavailable metric is met,"},{"line_number":11,"context_line":"the metric weigher might eigher throw an exception, or treat the"},{"line_number":12,"context_line":"unavailable metric as the most nagative factor."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"By giving the infinity value to the host\u0027s weight value, we can make"},{"line_number":15,"context_line":"sure the host with the unavailable metric would be at the end of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FPIU%3D","line":12,"in_reply_to":"AAAAUH%2F%2FRV0%3D","updated":"2014-01-16 02:54:43.000000000","message":"Done","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ca0548adb113f46ef84dd972d9a713434c33cbee","unresolved":false,"context_lines":[{"line_number":14,"context_line":"By giving the infinity value to the host\u0027s weight value, we can make"},{"line_number":15,"context_line":"sure the host with the unavailable metric would be at the end of the"},{"line_number":16,"context_line":"ordered weighed host list as returned by"},{"line_number":17,"context_line":"nova.wegihts.HostWeightHandler.get_weighed_objects()."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Also modified the weight normalization to support the infinity value."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FRVs%3D","line":17,"updated":"2014-01-15 17:01:39.000000000","message":"s/wegihts/weights","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d3013074a89ed46ac97de683cdda9a097d4c17f5","unresolved":false,"context_lines":[{"line_number":14,"context_line":"By giving the infinity value to the host\u0027s weight value, we can make"},{"line_number":15,"context_line":"sure the host with the unavailable metric would be at the end of the"},{"line_number":16,"context_line":"ordered weighed host list as returned by"},{"line_number":17,"context_line":"nova.wegihts.HostWeightHandler.get_weighed_objects()."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Also modified the weight normalization to support the infinity value."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FPIQ%3D","line":17,"in_reply_to":"AAAAUH%2F%2FRVs%3D","updated":"2014-01-16 02:54:43.000000000","message":"Done","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"71bf6b9fe0ddc4bcefc0c0831a858595d6e05ff6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Also modified the weight handler to skip those hosts with infinity"},{"line_number":20,"context_line":"values in the normalization process."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This is part of the blueprint utilization-aware-scheduling."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Icb951605aae28487b00a12d172a3ac4dafda2cdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAUX%2F%2FcGM%3D","line":22,"updated":"2014-02-13 07:39:17.000000000","message":"DocImpact is needed here","commit_id":"92583907bebae11e1982baffa8a6ba91f41495e3"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"e468cf6b896015e2f8a4a03cf759b9788de4033d","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Also modified the weight handler to skip those hosts with infinity"},{"line_number":20,"context_line":"values in the normalization process."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This is part of the blueprint utilization-aware-scheduling."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Icb951605aae28487b00a12d172a3ac4dafda2cdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAUX%2F%2Fb8g%3D","line":22,"in_reply_to":"AAAAUX%2F%2FcGM%3D","updated":"2014-02-13 08:20:40.000000000","message":"Done","commit_id":"92583907bebae11e1982baffa8a6ba91f41495e3"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"3e37816e410783c5ed95b86082820fa275866588","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This is part of the blueprint utilization-aware-scheduling."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"DocImpact: support of unavailable metrics."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Icb951605aae28487b00a12d172a3ac4dafda2cdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAUX%2F%2Fbsk%3D","line":24,"updated":"2014-02-13 08:49:56.000000000","message":"IMHO, it is better add some explanation for your new parameters.","commit_id":"ca72842fa7bdebecbc2eda7a40e92094919c96e8"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"4b675711a5f8a86601f4a609a2f7ac7bfa960fd3","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This is part of the blueprint utilization-aware-scheduling."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"DocImpact: support of unavailable metrics."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Icb951605aae28487b00a12d172a3ac4dafda2cdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAUX%2F%2FUR8%3D","line":24,"in_reply_to":"AAAAUX%2F%2Fbsk%3D","updated":"2014-02-14 01:07:55.000000000","message":"Done","commit_id":"ca72842fa7bdebecbc2eda7a40e92094919c96e8"}],"nova/scheduler/weights/metrics.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ad7208022a620939e1ea69f3bb3684a077d84ab7","unresolved":false,"context_lines":[{"line_number":49,"context_line":"       cfg.BoolOpt(\u0027required\u0027,"},{"line_number":50,"context_line":"                    default\u003dTrue,"},{"line_number":51,"context_line":"                    help\u003d\u0027How to treat the unavailable metrics. When a \u0027"},{"line_number":52,"context_line":"                         \u0027metric is NOT avaiable for a host, if it is set \u0027"},{"line_number":53,"context_line":"                         \u0027to be true, it would raise an exception, so it \u0027"},{"line_number":54,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":55,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F863k%3D","line":52,"updated":"2013-12-18 19:45:49.000000000","message":"available","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"8268d62f23a9f7619f9fd6f59ccf6a38269b95cc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"       cfg.BoolOpt(\u0027required\u0027,"},{"line_number":50,"context_line":"                    default\u003dTrue,"},{"line_number":51,"context_line":"                    help\u003d\u0027How to treat the unavailable metrics. When a \u0027"},{"line_number":52,"context_line":"                         \u0027metric is NOT avaiable for a host, if it is set \u0027"},{"line_number":53,"context_line":"                         \u0027to be true, it would raise an exception, so it \u0027"},{"line_number":54,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":55,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F85RE%3D","line":52,"in_reply_to":"AAAATn%2F863k%3D","updated":"2013-12-19 03:09:33.000000000","message":"Done","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ad7208022a620939e1ea69f3bb3684a077d84ab7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":55,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":56,"context_line":"                         \u0027set to be false, the unavaiable metric would be \u0027"},{"line_number":57,"context_line":"                         \u0027treated as a nagative factor in weighing \u0027"},{"line_number":58,"context_line":"                         \u0027process.\u0027),"},{"line_number":59,"context_line":"]"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F863c%3D","line":57,"updated":"2013-12-18 19:45:49.000000000","message":"unavailable","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"8268d62f23a9f7619f9fd6f59ccf6a38269b95cc","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":55,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":56,"context_line":"                         \u0027set to be false, the unavaiable metric would be \u0027"},{"line_number":57,"context_line":"                         \u0027treated as a nagative factor in weighing \u0027"},{"line_number":58,"context_line":"                         \u0027process.\u0027),"},{"line_number":59,"context_line":"]"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F85RA%3D","line":57,"in_reply_to":"AAAATn%2F863c%3D","updated":"2013-12-19 03:09:33.000000000","message":"Done","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ad7208022a620939e1ea69f3bb3684a077d84ab7","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                            node\u003dhost_state.nodename,"},{"line_number":95,"context_line":"                            name\u003dname)"},{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    # We treat the unavaiable metric as the most negative"},{"line_number":98,"context_line":"                    # factor, i.e. set the value to make this obj would be"},{"line_number":99,"context_line":"                    # at the end of the ordered weighed obj list"},{"line_number":100,"context_line":"                    combined_ratio \u003d ratio * self.weight_multiplier()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F863Y%3D","line":97,"updated":"2013-12-18 19:45:49.000000000","message":"unavailable","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"8268d62f23a9f7619f9fd6f59ccf6a38269b95cc","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                            node\u003dhost_state.nodename,"},{"line_number":95,"context_line":"                            name\u003dname)"},{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    # We treat the unavaiable metric as the most negative"},{"line_number":98,"context_line":"                    # factor, i.e. set the value to make this obj would be"},{"line_number":99,"context_line":"                    # at the end of the ordered weighed obj list"},{"line_number":100,"context_line":"                    combined_ratio \u003d ratio * self.weight_multiplier()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F85Q8%3D","line":97,"in_reply_to":"AAAATn%2F863Y%3D","updated":"2013-12-19 03:09:33.000000000","message":"Done","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ad7208022a620939e1ea69f3bb3684a077d84ab7","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                    # at the end of the ordered weighed obj list"},{"line_number":100,"context_line":"                    combined_ratio \u003d ratio * self.weight_multiplier()"},{"line_number":101,"context_line":"                    if combined_ratio \u003e 0:"},{"line_number":102,"context_line":"                        value +\u003d float(\"-inf\") * ratio"},{"line_number":103,"context_line":"                    elif combined_ratio \u003c 0:"},{"line_number":104,"context_line":"                        value +\u003d float(\"inf\") * ratio"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F861o%3D","line":102,"updated":"2013-12-18 19:45:49.000000000","message":"Isn\u0027t (infinity * anything) still infinity?  I\u0027m a little confused here.\n\nYou could probably just return float(\u0027-inf\u0027) or a configurable negative value.","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"8268d62f23a9f7619f9fd6f59ccf6a38269b95cc","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                    # at the end of the ordered weighed obj list"},{"line_number":100,"context_line":"                    combined_ratio \u003d ratio * self.weight_multiplier()"},{"line_number":101,"context_line":"                    if combined_ratio \u003e 0:"},{"line_number":102,"context_line":"                        value +\u003d float(\"-inf\") * ratio"},{"line_number":103,"context_line":"                    elif combined_ratio \u003c 0:"},{"line_number":104,"context_line":"                        value +\u003d float(\"inf\") * ratio"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F85Qs%3D","line":102,"in_reply_to":"AAAATn%2F861o%3D","updated":"2013-12-19 03:09:33.000000000","message":"Done","commit_id":"94bb77e93f76d8f33b2754efb237cc9e6db2f6ff"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ca0548adb113f46ef84dd972d9a713434c33cbee","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":53,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":54,"context_line":"                         \u0027set to be false, the unavailable metric would be \u0027"},{"line_number":55,"context_line":"                         \u0027treated as a nagative factor in weighing \u0027"},{"line_number":56,"context_line":"                         \u0027process.\u0027),"},{"line_number":57,"context_line":"]"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FRPQ%3D","line":55,"updated":"2014-01-15 17:01:39.000000000","message":"s/nagative/negative/","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d3013074a89ed46ac97de683cdda9a097d4c17f5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":53,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":54,"context_line":"                         \u0027set to be false, the unavailable metric would be \u0027"},{"line_number":55,"context_line":"                         \u0027treated as a nagative factor in weighing \u0027"},{"line_number":56,"context_line":"                         \u0027process.\u0027),"},{"line_number":57,"context_line":"]"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FPJE%3D","line":55,"in_reply_to":"AAAAUH%2F%2FRPQ%3D","updated":"2014-01-16 02:54:43.000000000","message":"Done","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"0f6e895ea9c1a49fb19f021e3207625da5b6258b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                    default\u003dTrue,"},{"line_number":49,"context_line":"                    help\u003d\u0027How to treat the unavailable metrics. When a \u0027"},{"line_number":50,"context_line":"                         \u0027metric is NOT available for a host, if it is set \u0027"},{"line_number":51,"context_line":"                         \u0027to be true, it would raise an exception, so it \u0027"},{"line_number":52,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":53,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":54,"context_line":"                         \u0027set to be false, the unavailable metric would be \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B%2BKA%3D","line":51,"updated":"2014-01-20 09:56:48.000000000","message":"True","commit_id":"3b7c8b45f4547368c8011ee05b1ea4493688d95d"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"bd5acee0d4c0d9f7832808778141c93b7a0f5e5c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                    default\u003dTrue,"},{"line_number":49,"context_line":"                    help\u003d\u0027How to treat the unavailable metrics. When a \u0027"},{"line_number":50,"context_line":"                         \u0027metric is NOT available for a host, if it is set \u0027"},{"line_number":51,"context_line":"                         \u0027to be true, it would raise an exception, so it \u0027"},{"line_number":52,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":53,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":54,"context_line":"                         \u0027set to be false, the unavailable metric would be \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B90w%3D","line":51,"in_reply_to":"AAAAUH%2F%2B%2BKA%3D","updated":"2014-01-20 10:28:18.000000000","message":"Done","commit_id":"3b7c8b45f4547368c8011ee05b1ea4493688d95d"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"0f6e895ea9c1a49fb19f021e3207625da5b6258b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                         \u0027to be true, it would raise an exception, so it \u0027"},{"line_number":52,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":53,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":54,"context_line":"                         \u0027set to be false, the unavailable metric would be \u0027"},{"line_number":55,"context_line":"                         \u0027treated as a negative factor in weighing \u0027"},{"line_number":56,"context_line":"                         \u0027process.\u0027),"},{"line_number":57,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B%2BJ8%3D","line":54,"updated":"2014-01-20 09:56:48.000000000","message":"False","commit_id":"3b7c8b45f4547368c8011ee05b1ea4493688d95d"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"bd5acee0d4c0d9f7832808778141c93b7a0f5e5c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                         \u0027to be true, it would raise an exception, so it \u0027"},{"line_number":52,"context_line":"                         \u0027is recommended to use the scheduler filter \u0027"},{"line_number":53,"context_line":"                         \u0027MetricFilter to filter out those hosts. If it is \u0027"},{"line_number":54,"context_line":"                         \u0027set to be false, the unavailable metric would be \u0027"},{"line_number":55,"context_line":"                         \u0027treated as a negative factor in weighing \u0027"},{"line_number":56,"context_line":"                         \u0027process.\u0027),"},{"line_number":57,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B90s%3D","line":54,"in_reply_to":"AAAAUH%2F%2B%2BJ8%3D","updated":"2014-01-20 10:28:18.000000000","message":"Done","commit_id":"3b7c8b45f4547368c8011ee05b1ea4493688d95d"}],"nova/weights.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f9719c784b562d46ea416c2e85c3930c3450c9f9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    If there are infinity values, they don\u0027t participate in the"},{"line_number":36,"context_line":"    normalization and are left untouched."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    weight_list_woinf \u003d [i for i in weight_list if not math.isinf(i)]"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    if not weight_list_woinf:"},{"line_number":41,"context_line":"        return weight_list"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Ftto%3D","line":38,"updated":"2014-01-09 09:45:39.000000000","message":"the variable name here is very confusing. what is woinf?","commit_id":"efa772bf70039bb97e98ee46e07629a947097df7"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f0284a7c978b3aa6d1e93fa1bc085e0fc18728fa","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    If there are infinity values, they don\u0027t participate in the"},{"line_number":36,"context_line":"    normalization and are left untouched."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    weight_list_woinf \u003d [i for i in weight_list if not math.isinf(i)]"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    if not weight_list_woinf:"},{"line_number":41,"context_line":"        return weight_list"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Ftnw%3D","line":38,"in_reply_to":"AAAAUH%2F%2Ftto%3D","updated":"2014-01-09 10:11:27.000000000","message":"it means \u0027without infinity\u0027","commit_id":"efa772bf70039bb97e98ee46e07629a947097df7"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ca0548adb113f46ef84dd972d9a713434c33cbee","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            # Record the min and max values if they are None. If they anything"},{"line_number":109,"context_line":"            # but none we assume that the weigher has set them."},{"line_number":110,"context_line":"            # Skip infinity values"},{"line_number":111,"context_line":"            if not math.isinf(weight):"},{"line_number":112,"context_line":"                if self.minval is None:"},{"line_number":113,"context_line":"                    self.minval \u003d weight"},{"line_number":114,"context_line":"                if self.maxval is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FRKY%3D","line":111,"updated":"2014-01-15 17:01:39.000000000","message":"I don\u0027t understand this.  Why is infinity ignored?","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"3d61b73e767d967d470979712188d2e5041e6a7a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            # Record the min and max values if they are None. If they anything"},{"line_number":109,"context_line":"            # but none we assume that the weigher has set them."},{"line_number":110,"context_line":"            # Skip infinity values"},{"line_number":111,"context_line":"            if not math.isinf(weight):"},{"line_number":112,"context_line":"                if self.minval is None:"},{"line_number":113,"context_line":"                    self.minval \u003d weight"},{"line_number":114,"context_line":"                if self.maxval is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FI9Y%3D","line":111,"in_reply_to":"AAAAUH%2F%2FKuo%3D","updated":"2014-01-17 02:30:50.000000000","message":"@Brian,\n\nHere we don\u0027t ignore the inf in the weights list, but just not to set max/min to be inf. Actually, this kind of ignoring is just how we do to avoid skewing the normalization calculation, e.g.\n\nnormalize([20, float(\u0027inf\u0027), 50], min\u003d0, max\u003d100) gives us the result of (0.2, float(\u0027inf\u0027), 0.5), exactly what we want. \n\nI think min/max is meant to represent the \u0027legal\u0027 max/min weight values for a weigher might return in normal situation, and our \u0027inf\u0027 value should be considered \u0027illegal\u0027 or special situation. Though picking a discrete number to be set to max/min won\u0027t affect the final sorting of the values, it might be confusing to figure out what\u0027s \u0027legal\u0027 or \u0027illegal\u0027. Actually, our current approach could be considered the same as picking a discrete number, the number we pick is just the same number as the current max/min value we have ever recorded.","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"cd34f5f9004a3cbd49f3a4d32e87270b064c4bd6","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            # Record the min and max values if they are None. If they anything"},{"line_number":109,"context_line":"            # but none we assume that the weigher has set them."},{"line_number":110,"context_line":"            # Skip infinity values"},{"line_number":111,"context_line":"            if not math.isinf(weight):"},{"line_number":112,"context_line":"                if self.minval is None:"},{"line_number":113,"context_line":"                    self.minval \u003d weight"},{"line_number":114,"context_line":"                if self.maxval is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FKuo%3D","line":111,"in_reply_to":"AAAAUH%2F%2FPIc%3D","updated":"2014-01-16 19:40:22.000000000","message":"Seems hacky.  Maybe picking a discrete number would work better rather than hiding certain values?  Won\u0027t ignoring certain values skew the normalization calculation?","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d3013074a89ed46ac97de683cdda9a097d4c17f5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            # Record the min and max values if they are None. If they anything"},{"line_number":109,"context_line":"            # but none we assume that the weigher has set them."},{"line_number":110,"context_line":"            # Skip infinity values"},{"line_number":111,"context_line":"            if not math.isinf(weight):"},{"line_number":112,"context_line":"                if self.minval is None:"},{"line_number":113,"context_line":"                    self.minval \u003d weight"},{"line_number":114,"context_line":"                if self.maxval is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FPIc%3D","line":111,"in_reply_to":"AAAAUH%2F%2FRKY%3D","updated":"2014-01-16 02:54:43.000000000","message":"Because the min/max values are used during the normalization(see the normalize function above). If we use inf as the min/max value in normalization, we can\u0027t get the correct result as we expected, all we could get is either 0 or float(\u0027nan\u0027).","commit_id":"21e6100aae99d1568af1e11766ad5fd1ed735bc6"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"0f6e895ea9c1a49fb19f021e3207625da5b6258b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    If all the values are equal, they are normalized to 0."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    If there are infinity values, they don\u0027t participate in the"},{"line_number":36,"context_line":"    normalization and are left untouched."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    weight_list_woinf \u003d [i for i in weight_list if not math.isinf(i)]"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B%2BMY%3D","line":36,"updated":"2014-01-20 09:56:48.000000000","message":"I don\u0027t like this. The normalization function is expected to return values between 0 and 1, and \"inf\" and \"-inf\" are not in that range.","commit_id":"3b7c8b45f4547368c8011ee05b1ea4493688d95d"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"072c3f3286917175c2821f87c32091317036ba33","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            # processed by the normalization code."},{"line_number":141,"context_line":"            valid_weighed_objs \u003d []"},{"line_number":142,"context_line":"            valid_weights \u003d []"},{"line_number":143,"context_line":"            for obj, weight in zip(weighed_objs, weights):"},{"line_number":144,"context_line":"                if math.isinf(weight):"},{"line_number":145,"context_line":"                    obj.weight \u003d float(\u0027-inf\u0027)"},{"line_number":146,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2FcPM%3D","line":143,"updated":"2014-02-13 07:18:06.000000000","message":"Not sure if this is the best way to handle unavailable metircs, take following case:\n                 hosta   hostb\nweighta       10        inf\nweightb       inf         20\n\nThen you will use weighta from hosta to compare weightb from hostb if require metrics is set as TRUE, what about if one host does not report one metrics, then ignore all same metrics from other nodes?","commit_id":"92583907bebae11e1982baffa8a6ba91f41495e3"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"4ecb6d7a16d2d7ac0c4a32f2815e7142497227e5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            # processed by the normalization code."},{"line_number":141,"context_line":"            valid_weighed_objs \u003d []"},{"line_number":142,"context_line":"            valid_weights \u003d []"},{"line_number":143,"context_line":"            for obj, weight in zip(weighed_objs, weights):"},{"line_number":144,"context_line":"                if math.isinf(weight):"},{"line_number":145,"context_line":"                    obj.weight \u003d float(\u0027-inf\u0027)"},{"line_number":146,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2FcCg%3D","line":143,"in_reply_to":"AAAAUX%2F%2FcDg%3D","updated":"2014-02-13 07:52:09.000000000","message":"@Lianhao, that\u0027s really what I expected, thanks. ;-)","commit_id":"92583907bebae11e1982baffa8a6ba91f41495e3"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1ee678d02b4ed4af4bdfe274664d40175a07bbc1","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            # processed by the normalization code."},{"line_number":141,"context_line":"            valid_weighed_objs \u003d []"},{"line_number":142,"context_line":"            valid_weights \u003d []"},{"line_number":143,"context_line":"            for obj, weight in zip(weighed_objs, weights):"},{"line_number":144,"context_line":"                if math.isinf(weight):"},{"line_number":145,"context_line":"                    obj.weight \u003d float(\u0027-inf\u0027)"},{"line_number":146,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2FcDg%3D","line":143,"in_reply_to":"AAAAUX%2F%2FcPM%3D","updated":"2014-02-13 07:46:57.000000000","message":"@Jay,\n\nIn your example, I don\u0027t think we\u0027ll end up using weighta form hosta to compare weightb from hostb. On the contrary, we\u0027ll have both hosta and hostb of having the final weight value of \u0027-inf\u0027 to be participated in the final sorting process, which is exactly what we want.\n\nIf one weigher returns unavailable(i.e. infinity value) for a host, we set the host\u0027s weight value to be infinity,  because inf+anything\u003dinf, so in other terms we\u0027re ignoring the same metrics from other nodes now.","commit_id":"92583907bebae11e1982baffa8a6ba91f41495e3"}]}
