[ambari] branch trunk updated: AMBARI-24054. Making queries against kerberos_principal.principal_name and kerberos_keytab_principal.principal name case sensitive in MySQL/MariaDB (#1490)
This is an automated email from the ASF dual-hosted git repository. smolnar pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new 8c0452e AMBARI-24054. Making queries against kerberos_principal.principal_name and kerberos_keytab_principal.principal name case sensitive in MySQL/MariaDB (#1490) 8c0452e is described below commit 8c0452e100c2d5eea043bf9afdecb7693722c3df Author: Sandor Molnar AuthorDate: Thu Jun 7 23:16:32 2018 +0200 AMBARI-24054. Making queries against kerberos_principal.principal_name and kerberos_keytab_principal.principal name case sensitive in MySQL/MariaDB (#1490) --- ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql index af64142..e028957 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql @@ -969,7 +969,7 @@ ALTER TABLE clusters ADD CONSTRAINT FK_clusters_upgrade_id FOREIGN KEY (upgrade_ -- Kerberos CREATE TABLE kerberos_principal ( - principal_name VARCHAR(255) NOT NULL, + principal_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, is_service SMALLINT NOT NULL DEFAULT 1, cached_keytab_path VARCHAR(255), CONSTRAINT PK_kerberos_principal PRIMARY KEY (principal_name) @@ -989,7 +989,7 @@ CREATE TABLE kerberos_keytab ( CREATE TABLE kerberos_keytab_principal ( kkp_id BIGINT NOT NULL DEFAULT 0, keytab_path VARCHAR(255) NOT NULL, - principal_name VARCHAR(255) NOT NULL, + principal_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, host_id BIGINT, is_distributed SMALLINT NOT NULL DEFAULT 0, CONSTRAINT PK_kkp PRIMARY KEY (kkp_id), -- To stop receiving notification emails like this one, please contact smol...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-mpack-advisor updated: [AMBARI-23643] Mpack Advisor integration in Install Wizard (#1487)
This is an automated email from the ASF dual-hosted git repository. jgolieb pushed a commit to branch branch-feature-AMBARI-14714-mpack-advisor in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-mpack-advisor by this push: new 85ecd56 [AMBARI-23643] Mpack Advisor integration in Install Wizard (#1487) 85ecd56 is described below commit 85ecd5675e290af840370e377423a19ff80c23ea Author: Jason Golieb AuthorDate: Thu Jun 7 13:36:12 2018 -0400 [AMBARI-23643] Mpack Advisor integration in Install Wizard (#1487) * Remove references to deleted unit test files and fix broken tests. * [AMBARI-23969] UI should load stack services from multiple mpacks. (#1403) * [AMBARI-23969] UI should load stack services from multiple mpacks. * Removed stack version number * AMBARI-23972. Update code for : (1). 'mpack-recommendations' directory creation and (2). putting 'mpack_advisor_wrapper.py' in '/var/lib/ambari-server/resources/scripts/' folder. * AMBARI-14714. Fix some unit tests * AMBARI-14714. Fix ServiceResourceProviderTest * AMBARI-23746. Cannot create same named service in different service groups in same request * AMBARI-23746. Cannot create same named component in different service groups in same request * AMBARI-22875. Service group name mismatch * AMBARI-23746. Cannot query services with same name * AMBARI-23746. Use List for componentID duplicate check * AMBARI-23987. Set 'skip.service.checks' = true during deploy. * Clear clusterData when user is not logged in. * [AMBARI-23993] Mpack Instance Manager should create pid dir and log dir for each instance (#1424) * AMBARI-23993: Mpack Instance Manager should create pid dir and log dir for each instance * AMBARI-23993: Mpack Instance Manager should create pid dir and log dir for each instance * AMBARI-23993-2: Mpack Instance Manager should create pid dir and log dir for each instance: add get_log_dir and get_run_dir to import * AMBARI-23999 Remove hardcoded logic in UI to create HDPCORE service group and create multiple service groups * AMBARI-24011: Add workaround to hide client modules in the dashboard (jluniya) (#1443) Change-Id: Ie69b4e0ca654d59952807694cf2f3f24d6b74c0d * BUG-104321: Python Mpack Advisor should return MpackInstance block during Host Component Layout Recommendation * AMBARI-24025 Display Mpack Info on Service Summary Page * AMBARI-24025 Display Mpack Info on Service Summary Page * AMBARI-23986. Host components API call doesn't return all host components (#1450) * AMBARI-24030. Fixes the following : 1. Reading the Node Manager Host (nmHost) correctly. 2. Comments the incorrectly implemented fn : isServiceDeployed(). * AMBARI-24025 Display Mpack Info on Service Summary Page * [AMBARI-24039] Quicklinks for HBASE are not displayed. * [AMBARI-24033] Use servicegroup api instead of service to show installed services in the UI. * AMBARI-14714. Fix some unit tests (#1464) * AMBARI-24046. Fix the incorrect string from config_name to config-name in mpack_advisor.py (#1480) * [AMBARI-23643] Mpack Advisor integration in Install wizard. --- ambari-web/app/controllers/installer.js| 1 + ambari-web/app/controllers/wizard.js | 83 ++- .../app/controllers/wizard/step7_controller.js | 2 - .../app/controllers/wizard/step8_controller.js | 92 -- ambari-web/app/mixins/common/blueprint.js | 6 +- .../app/mixins/common/configs/enhanced_configs.js | 52 ++-- .../hosts/host_component_recommendation_mixin.js | 46 ++- .../hosts/host_component_validation_mixin.js | 46 +++ ambari-web/app/mixins/common/serverValidator.js| 87 .../app/mixins/wizard/assign_master_components.js | 43 -- ambari-web/app/utils/ajax/ajax.js | 36 + 11 files changed, 289 insertions(+), 205 deletions(-) diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index 06c41f0..c2ca8cf 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -387,6 +387,7 @@ App.InstallerController = App.WizardController.extend(App.Persist, { }, loadCurrentHostGroups: function () { +this.set("content.recommendations", this.getDBProperty('recommendations')); this.set("content.recommendationsHostGroups", this.getDBProperty('recommendationsHostGroups')); }, diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index feccd7d..cb3fcf5 100644 --- a/ambari-web/app/controllers/wizard.js +++
[ambari] branch trunk updated: AMBARI-24051 Save button is disabled after adding the custom property. (ababiichuk)
This is an automated email from the ASF dual-hosted git repository. ababiichuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new 78730df AMBARI-24051 Save button is disabled after adding the custom property. (ababiichuk) 78730df is described below commit 78730df4677532a5c9fbba37a301cae588c718a2 Author: ababiichuk AuthorDate: Thu Jun 7 14:47:51 2018 +0300 AMBARI-24051 Save button is disabled after adding the custom property. (ababiichuk) --- .../app/mixins/common/configs/enhanced_configs.js | 172 - .../configs/service_config_layout_tab_view.js | 111 - .../views/common/configs/service_config_view.js| 36 - .../app/views/wizard/step7/databases_tab_view.js | 6 +- .../app/views/wizard/step7/directories_tab_view.js | 1 - 5 files changed, 172 insertions(+), 154 deletions(-) diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index 26ab7db..78e65a9 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -71,8 +71,36 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP currentlyChangedConfig: null, dependenciesGroupMessage: Em.I18n.t('popup.dependent.configs.dependencies.for.groups'), + /** - * message fro alert box for dependent configs + * ConfigType-Widget map + * key - widget type + * value - widget view + * @type {object} + */ + widgetTypeMap: { +checkbox: 'CheckboxConfigWidgetView', +combo: 'ComboConfigWidgetView', +directory: 'TextFieldConfigWidgetView', +directories: 'DirectoryConfigWidgetView', +list: 'ListConfigWidgetView', +password: 'PasswordConfigWidgetView', +'radio-buttons': 'RadioButtonConfigWidgetView', +slider: 'SliderConfigWidgetView', +'text-field': 'TextFieldConfigWidgetView', +'time-interval-spinner': 'TimeIntervalSpinnerView', +toggle: 'ToggleConfigWidgetView', +'text-area': 'StringConfigWidgetView', +'label': 'LabelView', +'test-db-connection': 'TestDbConnectionWidgetView' + }, + + configNameWidgetMixinMap: { +num_llap_nodes: App.NumLlapNodesWidgetMixin + }, + + /** + * message for alert box for dependent configs * @type {string} */ dependenciesMessage: function() { @@ -611,6 +639,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP }, updateAttributesFromTheme: function (serviceName) { +this.prepareSectionsConfigProperties(serviceName); const serviceConfigs = this.get('stepConfigs').findProperty('serviceName', serviceName).get('configs'), configConditions = App.ThemeCondition.find().filter(condition => { const dependentConfigName = condition.get('configName'), @@ -629,6 +658,110 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP this.updateAttributesFromConditions(configConditions, serviceConfigs, serviceName); }, + prepareSectionsConfigProperties: function (serviceName) { +const tabs = App.Tab.find().filterProperty('serviceName', serviceName); +tabs.forEach(tab => { + this.processTab(tab); + tab.get('sectionRows').forEach(row => { +row.forEach(section => { + section.get('subsectionRows').forEach(subRow => { +subRow.forEach(subsection => { + this.setConfigsToContainer(subsection); + subsection.get('subSectionTabs').forEach(subSectionTab => { +this.setConfigsToContainer(subSectionTab); + }); +}); + }); +}); + }); +}); + }, + + /** + * set {code} configs {code} array of subsection or subsection tab. + * Also correct widget should be used for each config (it's selected according to widget.type and + * widgetTypeMap). It may throw an error if needed widget can't be found in the widgetTypeMap + * @param containerObject + */ + setConfigsToContainer: function (containerObject) { +containerObject.set('configs', []); + +containerObject.get('configProperties').forEach(function (configId) { + const config = App.configsCollection.getConfig(configId); + if (Em.get(config, 'widgetType')) { +const stepConfig = this.get('stepConfigs').findProperty('serviceName', Em.get(config, 'serviceName')); +if (!stepConfig) return; + +const configProperty = stepConfig.get('configs').findProperty('id', Em.get(config, 'id')); +if (!configProperty) return; + +containerObject.get('configs').pushObject(configProperty); + +const widget = this.getWidgetView(config); +Em.assert('Unknown config widget view for config ' + configProperty.get('id') + ' with type ' + Em.get(config, 'widgetType'), widget); + +
[ambari] branch branch-feature-AMBARI-14714-mpack-advisor updated: Revert previous commit (#1486)
This is an automated email from the ASF dual-hosted git repository. jgolieb pushed a commit to branch branch-feature-AMBARI-14714-mpack-advisor in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-mpack-advisor by this push: new 22496b6 Revert previous commit (#1486) 22496b6 is described below commit 22496b6bd6dcdd25cbc43b1c0c2616814d9f39f7 Author: Jason Golieb AuthorDate: Thu Jun 7 09:45:43 2018 -0400 Revert previous commit (#1486) * Remove references to deleted unit test files and fix broken tests. * [AMBARI-23969] UI should load stack services from multiple mpacks. (#1403) * [AMBARI-23969] UI should load stack services from multiple mpacks. * Removed stack version number * AMBARI-23972. Update code for : (1). 'mpack-recommendations' directory creation and (2). putting 'mpack_advisor_wrapper.py' in '/var/lib/ambari-server/resources/scripts/' folder. * AMBARI-14714. Fix some unit tests * AMBARI-14714. Fix ServiceResourceProviderTest * AMBARI-23746. Cannot create same named service in different service groups in same request * AMBARI-23746. Cannot create same named component in different service groups in same request * AMBARI-22875. Service group name mismatch * AMBARI-23746. Cannot query services with same name * AMBARI-23746. Use List for componentID duplicate check * AMBARI-23987. Set 'skip.service.checks' = true during deploy. * Clear clusterData when user is not logged in. * [AMBARI-23993] Mpack Instance Manager should create pid dir and log dir for each instance (#1424) * AMBARI-23993: Mpack Instance Manager should create pid dir and log dir for each instance * AMBARI-23993: Mpack Instance Manager should create pid dir and log dir for each instance * AMBARI-23993-2: Mpack Instance Manager should create pid dir and log dir for each instance: add get_log_dir and get_run_dir to import * AMBARI-23999 Remove hardcoded logic in UI to create HDPCORE service group and create multiple service groups * AMBARI-24011: Add workaround to hide client modules in the dashboard (jluniya) (#1443) Change-Id: Ie69b4e0ca654d59952807694cf2f3f24d6b74c0d * BUG-104321: Python Mpack Advisor should return MpackInstance block during Host Component Layout Recommendation * AMBARI-24025 Display Mpack Info on Service Summary Page * AMBARI-24025 Display Mpack Info on Service Summary Page * AMBARI-23986. Host components API call doesn't return all host components (#1450) * AMBARI-24030. Fixes the following : 1. Reading the Node Manager Host (nmHost) correctly. 2. Comments the incorrectly implemented fn : isServiceDeployed(). * AMBARI-24025 Display Mpack Info on Service Summary Page * [AMBARI-24039] Quicklinks for HBASE are not displayed. * [AMBARI-24033] Use servicegroup api instead of service to show installed services in the UI. * AMBARI-14714. Fix some unit tests (#1464) * AMBARI-24046. Fix the incorrect string from config_name to config-name in mpack_advisor.py (#1480) * [AMBARI-23643] Mpack Advisor integration in Install wizard. * Revert "[AMBARI-23643] Mpack Advisor integration in Install wizard." This reverts commit 01efc2ce9b3e5d3be67add4c3f262607d3e34390. -- To stop receiving notification emails like this one, please contact jgol...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-mpack-advisor updated: Merge from main feature branch. (#1485)
This is an automated email from the ASF dual-hosted git repository. jgolieb pushed a commit to branch branch-feature-AMBARI-14714-mpack-advisor in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-mpack-advisor by this push: new 10e0d33 Merge from main feature branch. (#1485) 10e0d33 is described below commit 10e0d33d25b78d32348bccd36c28a41832ae2cd6 Author: Jason Golieb AuthorDate: Thu Jun 7 09:27:51 2018 -0400 Merge from main feature branch. (#1485) * Remove references to deleted unit test files and fix broken tests. * [AMBARI-23969] UI should load stack services from multiple mpacks. (#1403) * [AMBARI-23969] UI should load stack services from multiple mpacks. * Removed stack version number * AMBARI-23972. Update code for : (1). 'mpack-recommendations' directory creation and (2). putting 'mpack_advisor_wrapper.py' in '/var/lib/ambari-server/resources/scripts/' folder. * AMBARI-14714. Fix some unit tests * AMBARI-14714. Fix ServiceResourceProviderTest * AMBARI-23746. Cannot create same named service in different service groups in same request * AMBARI-23746. Cannot create same named component in different service groups in same request * AMBARI-22875. Service group name mismatch * AMBARI-23746. Cannot query services with same name * AMBARI-23746. Use List for componentID duplicate check * AMBARI-23987. Set 'skip.service.checks' = true during deploy. * Clear clusterData when user is not logged in. * [AMBARI-23993] Mpack Instance Manager should create pid dir and log dir for each instance (#1424) * AMBARI-23993: Mpack Instance Manager should create pid dir and log dir for each instance * AMBARI-23993: Mpack Instance Manager should create pid dir and log dir for each instance * AMBARI-23993-2: Mpack Instance Manager should create pid dir and log dir for each instance: add get_log_dir and get_run_dir to import * AMBARI-23999 Remove hardcoded logic in UI to create HDPCORE service group and create multiple service groups * AMBARI-24011: Add workaround to hide client modules in the dashboard (jluniya) (#1443) Change-Id: Ie69b4e0ca654d59952807694cf2f3f24d6b74c0d * BUG-104321: Python Mpack Advisor should return MpackInstance block during Host Component Layout Recommendation * AMBARI-24025 Display Mpack Info on Service Summary Page * AMBARI-24025 Display Mpack Info on Service Summary Page * AMBARI-23986. Host components API call doesn't return all host components (#1450) * AMBARI-24030. Fixes the following : 1. Reading the Node Manager Host (nmHost) correctly. 2. Comments the incorrectly implemented fn : isServiceDeployed(). * AMBARI-24025 Display Mpack Info on Service Summary Page * [AMBARI-24039] Quicklinks for HBASE are not displayed. * [AMBARI-24033] Use servicegroup api instead of service to show installed services in the UI. * AMBARI-14714. Fix some unit tests (#1464) * AMBARI-24046. Fix the incorrect string from config_name to config-name in mpack_advisor.py (#1480) --- ambari-server/src/main/resources/stacks/mpack_advisor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-server/src/main/resources/stacks/mpack_advisor.py b/ambari-server/src/main/resources/stacks/mpack_advisor.py index f5c3530..ddb9058 100644 --- a/ambari-server/src/main/resources/stacks/mpack_advisor.py +++ b/ambari-server/src/main/resources/stacks/mpack_advisor.py @@ -1548,13 +1548,13 @@ class MpackAdvisorImpl(MpackAdvisor): userValue = convertToNumber(configurations[configName]["properties"][propertyName]) maxValue = convertToNumber(recommendedDefaults[configName]["property_attributes"][propertyName]["maximum"]) if userValue > maxValue: -validationItems.extend([{"config_name": propertyName, "item": self.getWarnItem("Value is greater than the recommended maximum of {0} ".format(maxValue))}]) +validationItems.extend([{"config-name": propertyName, "item": self.getWarnItem("Value is greater than the recommended maximum of {0} ".format(maxValue))}]) if "minimum" in recommendedDefaults[configName]["property_attributes"][propertyName] and \ propertyName in recommendedDefaults[configName]["properties"]: userValue = convertToNumber(configurations[configName]["properties"][propertyName]) minValue = convertToNumber(recommendedDefaults[configName]["property_attributes"][propertyName]["minimum"]) if userValue < minValue: -validationItems.extend([{"config_name": propertyName, "item": self.getWarnItem("Value is less than the recommended minimum of {0}
[ambari] 02/02: AMBARI-24049. Ambari-agent should report when message is received (aonishuk)
This is an automated email from the ASF dual-hosted git repository. aonishuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git commit d743faf5f1233dac1cf596058f4e054bbd47 Author: Andrew Onishuk AuthorDate: Thu Jun 7 11:53:54 2018 +0300 AMBARI-24049. Ambari-agent should report when message is received (aonishuk) --- ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py b/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py index 49e0ce5..3403bb2 100644 --- a/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py +++ b/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py @@ -125,7 +125,6 @@ class HeartbeatThread(threading.Thread): logger.info("Sending registration request") logger.debug("Registration request is {0}".format(registration_request)) -self.server_responses_listener.connection = self.connection response = self.blocking_request(registration_request, Constants.REGISTRATION_ENDPOINT) logger.info("Registration response received") @@ -134,7 +133,6 @@ class HeartbeatThread(threading.Thread): self.handle_registration_response(response) for endpoint, cache, listener, subscribe_to in self.post_registration_requests: - listener.connection = self.connection # should not hang forever on these requests response = self.blocking_request({'hash': cache.hash}, endpoint, log_handler=listener.get_log_message) try: -- To stop receiving notification emails like this one, please contact aonis...@apache.org.
[ambari] branch trunk updated (269db6f -> d743faf)
This is an automated email from the ASF dual-hosted git repository. aonishuk pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git. from 269db6f AMBARI-24044. Widget Browser add/hide functionality is not working correctly (akovalenko) new d08278d AMBARI-24049. Ambari-agent should report when message is received (aonishuk) new d743faf AMBARI-24049. Ambari-agent should report when message is received (aonishuk) The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../python/ambari_agent/ClusterTopologyCache.py| 10 +++--- .../src/main/python/ambari_agent/Constants.py | 2 ++ .../main/python/ambari_agent/HeartbeatThread.py| 12 +++ .../main/python/ambari_agent/InitializerModule.py | 2 +- ambari-agent/src/main/python/ambari_agent/Utils.py | 5 +++ .../ambari_agent/listeners/AgentActionsListener.py | 2 +- .../listeners/AlertDefinitionsEventListener.py | 7 ++-- .../listeners/CommandsEventListener.py | 5 +-- .../listeners/ConfigurationEventListener.py| 9 ++--- .../listeners/HostLevelParamsEventListener.py | 7 ++-- .../listeners/MetadataEventListener.py | 7 ++-- .../listeners/ServerResponsesListener.py | 3 +- .../listeners/TopologyEventListener.py | 5 +-- .../main/python/ambari_agent/listeners/__init__.py | 42 -- .../src/main/python/ambari_ws4py/websocket.py | 6 ++-- 15 files changed, 90 insertions(+), 34 deletions(-) -- To stop receiving notification emails like this one, please contact aonis...@apache.org.
[ambari] 01/02: AMBARI-24049. Ambari-agent should report when message is received (aonishuk)
This is an automated email from the ASF dual-hosted git repository. aonishuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git commit d08278dde2e5fc6bc779fe8e9ecbb32c94284bd2 Author: Andrew Onishuk AuthorDate: Thu Jun 7 11:28:19 2018 +0300 AMBARI-24049. Ambari-agent should report when message is received (aonishuk) --- .../python/ambari_agent/ClusterTopologyCache.py| 10 +++--- .../src/main/python/ambari_agent/Constants.py | 2 ++ .../main/python/ambari_agent/HeartbeatThread.py| 14 .../main/python/ambari_agent/InitializerModule.py | 2 +- ambari-agent/src/main/python/ambari_agent/Utils.py | 5 +++ .../ambari_agent/listeners/AgentActionsListener.py | 2 +- .../listeners/AlertDefinitionsEventListener.py | 7 ++-- .../listeners/CommandsEventListener.py | 5 +-- .../listeners/ConfigurationEventListener.py| 9 ++--- .../listeners/HostLevelParamsEventListener.py | 7 ++-- .../listeners/MetadataEventListener.py | 7 ++-- .../listeners/ServerResponsesListener.py | 3 +- .../listeners/TopologyEventListener.py | 5 +-- .../main/python/ambari_agent/listeners/__init__.py | 42 -- .../src/main/python/ambari_ws4py/websocket.py | 6 ++-- 15 files changed, 92 insertions(+), 34 deletions(-) diff --git a/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py b/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py index f23c7f7..830f202 100644 --- a/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py +++ b/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py @@ -79,10 +79,12 @@ class ClusterTopologyCache(ClusterCache): continue current_host_id = self.current_host_ids_to_cluster[cluster_id] - for component_dict in self[cluster_id].components: -if 'hostIds' in component_dict and current_host_id in component_dict.hostIds: - if current_host_id in component_dict.hostIds: - self.cluster_local_components[cluster_id].append(component_dict.componentName) + + if 'components' in self[cluster_id]: +for component_dict in self[cluster_id].components: + if 'hostIds' in component_dict and current_host_id in component_dict.hostIds: +if current_host_id in component_dict.hostIds: + self.cluster_local_components[cluster_id].append(component_dict.componentName) self.hosts_to_id = ImmutableDictionary(hosts_to_id) diff --git a/ambari-agent/src/main/python/ambari_agent/Constants.py b/ambari-agent/src/main/python/ambari_agent/Constants.py index 367e8c4..09381eb 100644 --- a/ambari-agent/src/main/python/ambari_agent/Constants.py +++ b/ambari-agent/src/main/python/ambari_agent/Constants.py @@ -31,6 +31,7 @@ AGENT_ACTIONS_TOPIC = '/user/agent_actions' PRE_REGISTRATION_TOPICS_TO_SUBSCRIBE = [SERVER_RESPONSES_TOPIC, AGENT_ACTIONS_TOPIC] POST_REGISTRATION_TOPICS_TO_SUBSCRIBE = [COMMANDS_TOPIC] +AGENT_RESPONSES_TOPIC = '/agents/responses' TOPOLOGY_REQUEST_ENDPOINT = '/agents/topologies' METADATA_REQUEST_ENDPOINT = '/agents/metadata' CONFIGURATIONS_REQUEST_ENDPOINT = '/agents/configs' @@ -45,3 +46,4 @@ HEARTBEAT_ENDPOINT = '/heartbeat' REGISTRATION_ENDPOINT = '/register' CORRELATION_ID_STRING = 'correlationId' +MESSAGE_ID = 'messageId' diff --git a/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py b/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py index 179cf6b..49e0ce5 100644 --- a/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py +++ b/ambari-agent/src/main/python/ambari_agent/HeartbeatThread.py @@ -59,12 +59,12 @@ class HeartbeatThread(threading.Thread): # listeners self.server_responses_listener = initializer_module.server_responses_listener -self.commands_events_listener = CommandsEventListener(initializer_module.action_queue) -self.metadata_events_listener = MetadataEventListener(initializer_module.metadata_cache, initializer_module.config) -self.topology_events_listener = TopologyEventListener(initializer_module.topology_cache) -self.configuration_events_listener = ConfigurationEventListener(initializer_module.configurations_cache) -self.host_level_params_events_listener = HostLevelParamsEventListener(initializer_module.host_level_params_cache, initializer_module.recovery_manager) -self.alert_definitions_events_listener = AlertDefinitionsEventListener(initializer_module.alert_definitions_cache, initializer_module.alert_scheduler_handler) +self.commands_events_listener = CommandsEventListener(initializer_module) +self.metadata_events_listener = MetadataEventListener(initializer_module) +self.topology_events_listener = TopologyEventListener(initializer_module) +self.configuration_events_listener = ConfigurationEventListener(initializer_module) +self.host_level_params_events_listener =