)]}'
{"specs/mitaka/cdh-plugin-refactoring.rst":[{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b8623cc5f2fe00e17519204cb076f1f809a1e064","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/sahara/+spec/cdh-plugin-refactoring"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This spec is to do some refactor to the code to allow easier support to new"},{"line_number":14,"context_line":"versions in future."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_4f2237bb","line":13,"updated":"2015-11-13 17:19:45.000000000","message":"s/refactor/refactoring\nin the future","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":7710,"name":"Sergey Reshetnyak","email":"sreshetniak@mirantis.com","username":"sreshetniak"},"change_message_id":"c087721da8b62f0d0bcf0be9291fc07c7f4e3480","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Problem description"},{"line_number":17,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"CDH plugin contains many duplicated code. Current implemention extracts some"},{"line_number":20,"context_line":"general and base behavior of th plugin, and each version has it\u0027s own"},{"line_number":21,"context_line":"implemention for something not included in base classes and modules. But there"},{"line_number":22,"context_line":"are many overlaps between versions because of the downward compatibility. For"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_16074782","line":19,"range":{"start_line":19,"start_character":50,"end_line":19,"end_character":62},"updated":"2015-11-15 22:41:01.000000000","message":"implementation","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b8623cc5f2fe00e17519204cb076f1f809a1e064","unresolved":false,"context_lines":[{"line_number":17,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"CDH plugin contains many duplicated code. Current implemention extracts some"},{"line_number":20,"context_line":"general and base behavior of th plugin, and each version has it\u0027s own"},{"line_number":21,"context_line":"implemention for something not included in base classes and modules. But there"},{"line_number":22,"context_line":"are many overlaps between versions because of the downward compatibility. For"},{"line_number":23,"context_line":"example, sahara.plugins.cdh.v5.db_helper extends"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_cf1ce779","line":20,"updated":"2015-11-13 17:19:45.000000000","message":"the","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":7710,"name":"Sergey Reshetnyak","email":"sreshetniak@mirantis.com","username":"sreshetniak"},"change_message_id":"c087721da8b62f0d0bcf0be9291fc07c7f4e3480","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"CDH plugin contains many duplicated code. Current implemention extracts some"},{"line_number":20,"context_line":"general and base behavior of th plugin, and each version has it\u0027s own"},{"line_number":21,"context_line":"implemention for something not included in base classes and modules. But there"},{"line_number":22,"context_line":"are many overlaps between versions because of the downward compatibility. For"},{"line_number":23,"context_line":"example, sahara.plugins.cdh.v5.db_helper extends"},{"line_number":24,"context_line":"sahara.plugins.cdh.db_helper, but functions such as get_hive_db_password are"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_76f8137d","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":12},"updated":"2015-11-15 22:41:01.000000000","message":"implementation","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b8623cc5f2fe00e17519204cb076f1f809a1e064","unresolved":false,"context_lines":[{"line_number":24,"context_line":"sahara.plugins.cdh.db_helper, but functions such as get_hive_db_password are"},{"line_number":25,"context_line":"writed again in sahara.plugins.cdh.v5_3_0.db_helper."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"And currently the low test coverage of CDH plugin mades it hard to guarantee"},{"line_number":28,"context_line":"the quality of the new code after refactor. So some new unit test cases need"},{"line_number":29,"context_line":"to be added. And some old test cases may be altered according to refactor."},{"line_number":30,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_0a489d5a","line":27,"updated":"2015-11-13 17:19:45.000000000","message":"s/mades/makes","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b8623cc5f2fe00e17519204cb076f1f809a1e064","unresolved":false,"context_lines":[{"line_number":25,"context_line":"writed again in sahara.plugins.cdh.v5_3_0.db_helper."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"And currently the low test coverage of CDH plugin mades it hard to guarantee"},{"line_number":28,"context_line":"the quality of the new code after refactor. So some new unit test cases need"},{"line_number":29,"context_line":"to be added. And some old test cases may be altered according to refactor."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_caedb526","line":28,"updated":"2015-11-13 17:19:45.000000000","message":"s/refactor/refactoring","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b8623cc5f2fe00e17519204cb076f1f809a1e064","unresolved":false,"context_lines":[{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Considering the features of relations between different versions of plugin, we"},{"line_number":35,"context_line":"may let a new version extends a old one instead of all extends from base."},{"line_number":36,"context_line":"This design can well support the downward compatibility. For some"},{"line_number":37,"context_line":"deprecations or changes in new version, just overide it. And should keep them"},{"line_number":38,"context_line":"looks the same as before from ouside."}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_aa3631b2","line":35,"updated":"2015-11-13 17:19:45.000000000","message":"This could be a problem if we want to deprecate an older version.","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":18399,"name":"Jaxon Wang","email":"jiexingx.wang@intel.com","username":"jxwang"},"change_message_id":"26362856c3e7b06926a22927a6760f13b9dad23b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Considering the features of relations between different versions of plugin, we"},{"line_number":35,"context_line":"may let a new version extends a old one instead of all extends from base."},{"line_number":36,"context_line":"This design can well support the downward compatibility. For some"},{"line_number":37,"context_line":"deprecations or changes in new version, just overide it. And should keep them"},{"line_number":38,"context_line":"looks the same as before from ouside."}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_2f030aba","line":35,"in_reply_to":"da85f559_aa3631b2","updated":"2015-11-16 02:52:01.000000000","message":"I think we may pull something in deprecated version into the base class, which the oldest version derived from, to make the others work well. Or a alternative way, change the VersionFactory to deprecate older versions.","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b8623cc5f2fe00e17519204cb076f1f809a1e064","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Considering the features of relations between different versions of plugin, we"},{"line_number":35,"context_line":"may let a new version extends a old one instead of all extends from base."},{"line_number":36,"context_line":"This design can well support the downward compatibility. For some"},{"line_number":37,"context_line":"deprecations or changes in new version, just overide it. And should keep them"},{"line_number":38,"context_line":"looks the same as before from ouside."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"As for some modules such as db_helper, again, only provides functions to be"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_2a4b212d","line":37,"updated":"2015-11-13 17:19:45.000000000","message":"override","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b8623cc5f2fe00e17519204cb076f1f809a1e064","unresolved":false,"context_lines":[{"line_number":35,"context_line":"may let a new version extends a old one instead of all extends from base."},{"line_number":36,"context_line":"This design can well support the downward compatibility. For some"},{"line_number":37,"context_line":"deprecations or changes in new version, just overide it. And should keep them"},{"line_number":38,"context_line":"looks the same as before from ouside."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"As for some modules such as db_helper, again, only provides functions to be"},{"line_number":41,"context_line":"called by other modules. To be better extends, we may encapsulate them into a"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_ea5439cb","line":38,"updated":"2015-11-13 17:19:45.000000000","message":"the outside","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":7710,"name":"Sergey Reshetnyak","email":"sreshetniak@mirantis.com","username":"sreshetniak"},"change_message_id":"c087721da8b62f0d0bcf0be9291fc07c7f4e3480","unresolved":false,"context_lines":[{"line_number":42,"context_line":"class."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Example of ClouderaUtils for CDH plugin::"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"  class ClouderaUtilsV5(cu.ClouderaUtils):"},{"line_number":47,"context_line":"    #do something"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_d6377f4b","line":45,"updated":"2015-11-15 22:41:01.000000000","message":"please add syntax highlight","commit_id":"a1e81071c37470a6c25afc201ae617d0ddc5b4fc"},{"author":{"_account_id":12038,"name":"Vitaly Gridnev","email":"gridnevvvit@gmail.com","username":"vgridnev"},"change_message_id":"20adda589b7613b6bb464d01cf92de1ce1b5bb31","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  class ClouderaUtilsV5(cu.ClouderaUtils):"},{"line_number":49,"context_line":"      #do something"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"  class ClouderaUtilsV530(ClouderaUtilsV5):"},{"line_number":52,"context_line":"      #do something"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_f5c5f55a","line":51,"updated":"2015-11-25 09:54:01.000000000","message":"Agreed with Telles, inheritance from the other version of plugin doesn\u0027t work when we need to deprecate or remove some plugin version. That can be avoided by extension of common classes and utils, I think.\n\nLet\u0027s keep different versions of plugin separated.","commit_id":"03c2d3e4c7dc75d6c23c05b8fd58fa9de0ac8eb3"},{"author":{"_account_id":18399,"name":"Jaxon Wang","email":"jiexingx.wang@intel.com","username":"jxwang"},"change_message_id":"86ccaa57e850dbc3a16aca81787cd4442979433b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  class ClouderaUtilsV5(cu.ClouderaUtils):"},{"line_number":49,"context_line":"      #do something"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"  class ClouderaUtilsV530(ClouderaUtilsV5):"},{"line_number":52,"context_line":"      #do something"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_7b90e143","line":51,"in_reply_to":"9a8ffd7b_f5c5f55a","updated":"2015-11-26 03:18:32.000000000","message":"Unlike other plugins, CDH plugins has more version to maintain and more works to do  in a specific version.  Some new services may added to a new version and be kept in future version. So inheritance from the other version of plugin I think will minimize the redundant code but it brings high coupling for each version, that\u0027s why deprecation need some more works to do in this way. Do you have any good idea for the trade off?","commit_id":"03c2d3e4c7dc75d6c23c05b8fd58fa9de0ac8eb3"},{"author":{"_account_id":12038,"name":"Vitaly Gridnev","email":"gridnevvvit@gmail.com","username":"vgridnev"},"change_message_id":"20adda589b7613b6bb464d01cf92de1ce1b5bb31","unresolved":false,"context_lines":[{"line_number":109,"context_line":"  Classes need to be modified:"},{"line_number":110,"context_line":"  sahara/plugin/cdh/version/cloudera_utils.py: ClouderaUtils"},{"line_number":111,"context_line":"  sahara/plugin/cdh/version/edp_engine.py: EdpOozieEngine, EdpSparkEngine"},{"line_number":112,"context_line":"  sahara/plugin/cdh/version/plugin_utils.py: PluginUtils"},{"line_number":113,"context_line":"  sahara/plugin/cdh/version/versionhandler.py: VersionHandler"},{"line_number":114,"context_line":"* Functions in modules need to be encapsulate into class:"},{"line_number":115,"context_line":"  sahara/plugin/cdh/version/config_helper.py:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_35661dee","line":112,"updated":"2015-11-25 09:54:01.000000000","message":"We have PluginUtils and ClouderaUtils. What is the actual difference between this two classes?","commit_id":"03c2d3e4c7dc75d6c23c05b8fd58fa9de0ac8eb3"},{"author":{"_account_id":18399,"name":"Jaxon Wang","email":"jiexingx.wang@intel.com","username":"jxwang"},"change_message_id":"86ccaa57e850dbc3a16aca81787cd4442979433b","unresolved":false,"context_lines":[{"line_number":109,"context_line":"  Classes need to be modified:"},{"line_number":110,"context_line":"  sahara/plugin/cdh/version/cloudera_utils.py: ClouderaUtils"},{"line_number":111,"context_line":"  sahara/plugin/cdh/version/edp_engine.py: EdpOozieEngine, EdpSparkEngine"},{"line_number":112,"context_line":"  sahara/plugin/cdh/version/plugin_utils.py: PluginUtils"},{"line_number":113,"context_line":"  sahara/plugin/cdh/version/versionhandler.py: VersionHandler"},{"line_number":114,"context_line":"* Functions in modules need to be encapsulate into class:"},{"line_number":115,"context_line":"  sahara/plugin/cdh/version/config_helper.py:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_380d7f90","line":112,"in_reply_to":"9a8ffd7b_35661dee","updated":"2015-11-26 03:18:32.000000000","message":"ClouderaUtils interacts with Cloudera Manager by calling it\u0027s api, while PluginUtils just alters the cluster by executing some commands. And PluginUtils provide some basic method to a cluster such as get_manager which returns a CM instance.","commit_id":"03c2d3e4c7dc75d6c23c05b8fd58fa9de0ac8eb3"},{"author":{"_account_id":12038,"name":"Vitaly Gridnev","email":"gridnevvvit@gmail.com","username":"vgridnev"},"change_message_id":"20adda589b7613b6bb464d01cf92de1ce1b5bb31","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  sahara/plugin/cdh/version/config_helper.py:"},{"line_number":116,"context_line":"  sahara/plugin/cdh/version/db_helper.py:"},{"line_number":117,"context_line":"  sahara/plugin/cdh/version/deploy.py:"},{"line_number":118,"context_line":"  sahara/plugin/cdh/version/validation.py:"},{"line_number":119,"context_line":"* Add unit test case for low covered modules."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_153bd9d2","line":118,"updated":"2015-11-25 09:54:01.000000000","message":"we should rewrite validation in other way: now we have in here all-in-one method that should be definitely divided into logic of several functions like: validate_spark(cluster); validate_impala(cluster) and so on. That make code more readable and easy to find something.","commit_id":"03c2d3e4c7dc75d6c23c05b8fd58fa9de0ac8eb3"},{"author":{"_account_id":18399,"name":"Jaxon Wang","email":"jiexingx.wang@intel.com","username":"jxwang"},"change_message_id":"86ccaa57e850dbc3a16aca81787cd4442979433b","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  sahara/plugin/cdh/version/config_helper.py:"},{"line_number":116,"context_line":"  sahara/plugin/cdh/version/db_helper.py:"},{"line_number":117,"context_line":"  sahara/plugin/cdh/version/deploy.py:"},{"line_number":118,"context_line":"  sahara/plugin/cdh/version/validation.py:"},{"line_number":119,"context_line":"* Add unit test case for low covered modules."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a8ffd7b_755f92e5","line":118,"in_reply_to":"9a8ffd7b_153bd9d2","updated":"2015-11-26 03:18:32.000000000","message":"Good idea, i\u0027ll add it to spec later.","commit_id":"03c2d3e4c7dc75d6c23c05b8fd58fa9de0ac8eb3"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b99ddfb40b4f988b63fa8b74516da572ea206de3","unresolved":false,"context_lines":[{"line_number":22,"context_line":"there are many overlaps between versions because of the downward compatibility."},{"line_number":23,"context_line":"For example, sahara.plugins.cdh.v5.config_helper extends"},{"line_number":24,"context_line":"sahara.plugins.cdh.db_helper, but functions such as get_plugin_configs are"},{"line_number":25,"context_line":"writed again in sahara.plugins.cdh.v5_3_0.config_helper."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"And currently the low test coverage of CDH plugin makes it hard to guarantee"},{"line_number":28,"context_line":"the quality of the new code after refactoring. So some new unit test cases need"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a7b0d38_223d26c4","line":25,"updated":"2015-12-28 12:21:46.000000000","message":"written","commit_id":"3172b8ee4e4f6ab2a2bd82fbb6793e3b0633c5e7"},{"author":{"_account_id":18399,"name":"Jaxon Wang","email":"jiexingx.wang@intel.com","username":"jxwang"},"change_message_id":"47a1b5fd08b4da8e94c755db68f46388c5cfa192","unresolved":false,"context_lines":[{"line_number":22,"context_line":"there are many overlaps between versions because of the downward compatibility."},{"line_number":23,"context_line":"For example, sahara.plugins.cdh.v5.config_helper extends"},{"line_number":24,"context_line":"sahara.plugins.cdh.db_helper, but functions such as get_plugin_configs are"},{"line_number":25,"context_line":"writed again in sahara.plugins.cdh.v5_3_0.config_helper."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"And currently the low test coverage of CDH plugin makes it hard to guarantee"},{"line_number":28,"context_line":"the quality of the new code after refactoring. So some new unit test cases need"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a7b0d38_b46702e8","line":25,"in_reply_to":"1a7b0d38_223d26c4","updated":"2015-12-29 02:18:09.000000000","message":"Done","commit_id":"3172b8ee4e4f6ab2a2bd82fbb6793e3b0633c5e7"},{"author":{"_account_id":8932,"name":"Telles Mota Vidal Nóbrega","email":"tellesnobrega@gmail.com","username":"tellesnobrega"},"change_message_id":"b99ddfb40b4f988b63fa8b74516da572ea206de3","unresolved":false,"context_lines":[{"line_number":36,"context_line":"easily. Seprate it into serveral small clearly functions."},{"line_number":37,"context_line":"We can encapsulate funtions in module into a class for better extensibility."},{"line_number":38,"context_line":"ClouderaUtils and deploy modules are not going to be changed util CDH v5 are"},{"line_number":39,"context_line":"totally removed, because the these modules\u0027 codes in v5 are quite differenti"},{"line_number":40,"context_line":"from other versions."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a7b0d38_82717aaa","line":39,"updated":"2015-12-28 12:21:46.000000000","message":"the these/these\ndifferenti/different","commit_id":"3172b8ee4e4f6ab2a2bd82fbb6793e3b0633c5e7"},{"author":{"_account_id":18399,"name":"Jaxon Wang","email":"jiexingx.wang@intel.com","username":"jxwang"},"change_message_id":"47a1b5fd08b4da8e94c755db68f46388c5cfa192","unresolved":false,"context_lines":[{"line_number":36,"context_line":"easily. Seprate it into serveral small clearly functions."},{"line_number":37,"context_line":"We can encapsulate funtions in module into a class for better extensibility."},{"line_number":38,"context_line":"ClouderaUtils and deploy modules are not going to be changed util CDH v5 are"},{"line_number":39,"context_line":"totally removed, because the these modules\u0027 codes in v5 are quite differenti"},{"line_number":40,"context_line":"from other versions."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a7b0d38_34a232fe","line":39,"in_reply_to":"1a7b0d38_82717aaa","updated":"2015-12-29 02:18:09.000000000","message":"Thanks！","commit_id":"3172b8ee4e4f6ab2a2bd82fbb6793e3b0633c5e7"}]}
