git commit: AMBARI-6765 Unable to discard one of ZK Server components at step 5 of Install Wizard. (Max Shepel via atkach)
Repository: ambari Updated Branches: refs/heads/trunk 8d464c2b2 - ebb4217b2 AMBARI-6765 Unable to discard one of ZK Server components at step 5 of Install Wizard. (Max Shepel via atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ebb4217b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ebb4217b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ebb4217b Branch: refs/heads/trunk Commit: ebb4217b2e4617613127d2420ad6f692a4049a68 Parents: 8d464c2 Author: atkach atk...@hortonworks.com Authored: Thu Aug 7 13:22:13 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Thu Aug 7 13:22:13 2014 +0300 -- ambari-web/app/controllers/wizard/step5_controller.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ebb4217b/ambari-web/app/controllers/wizard/step5_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step5_controller.js b/ambari-web/app/controllers/wizard/step5_controller.js index 0c6af07..1f42717 100644 --- a/ambari-web/app/controllers/wizard/step5_controller.js +++ b/ambari-web/app/controllers/wizard/step5_controller.js @@ -252,9 +252,10 @@ App.WizardStep5Controller = Em.Controller.extend({ var showControl = !services.contains(currentService); if (showControl) { - if (this.get(selectedServicesMasters).filterProperty(component_name, componentName).length this.get(hosts.length) !this.get('isReassignWizard') !this.get('isHighAvailabilityWizard')) { + var mastersLength = this.get(selectedServicesMasters).filterProperty(component_name, componentName).length; + if (mastersLength this.get(hosts.length) !this.get('isReassignWizard') !this.get('isHighAvailabilityWizard')) { component.set('showAddControl', true); - } else { + } else if (mastersLength == 1 || this.get('isReassignWizard') || this.get('isHighAvailabilityWizard')) { component.set('showRemoveControl', false); } }
git commit: AMBARI-6767. Web Client Should Consult Service Check Availability. (Denys Buzhor via akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk 5a56e80cd - 2e432f3b4 AMBARI-6767. Web Client Should Consult Service Check Availability. (Denys Buzhor via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2e432f3b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2e432f3b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2e432f3b Branch: refs/heads/trunk Commit: 2e432f3b496cc15547b9c6b3664c5b9c64084dba Parents: 5a56e80 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Thu Aug 7 15:07:41 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Thu Aug 7 15:07:54 2014 +0300 -- ambari-web/app/app.js | 4 + ambari-web/app/mappers/stack_service_mapper.js | 3 + ambari-web/app/models/stack_service.js | 1 + .../app/models/stack_service_component.js | 1 + ambari-web/app/views/main/service/item.js | 13 +- .../test/models/stack_service_component_test.js | 4 +- ambari-web/test/service_components.js | 248 --- 7 files changed, 182 insertions(+), 92 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2e432f3b/ambari-web/app/app.js -- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index 47aa25b..09c56fe 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -130,6 +130,10 @@ module.exports = Em.Application.create({ monitoring: function () { return App.StackService.find().filterProperty('isMonitoringService').mapProperty('serviceName'); +}.property('App.router.clusterController.isLoaded'), + +supportsServiceCheck: function() { + return App.StackService.find().filterProperty('serviceCheckSupported').mapProperty('serviceName'); }.property('App.router.clusterController.isLoaded') }), http://git-wip-us.apache.org/repos/asf/ambari/blob/2e432f3b/ambari-web/app/mappers/stack_service_mapper.js -- diff --git a/ambari-web/app/mappers/stack_service_mapper.js b/ambari-web/app/mappers/stack_service_mapper.js index f7406c9..76f412c 100644 --- a/ambari-web/app/mappers/stack_service_mapper.js +++ b/ambari-web/app/mappers/stack_service_mapper.js @@ -31,6 +31,7 @@ App.stackServiceMapper = App.QuickDataMapper.create({ stack_version: 'stack_version', is_selected: 'is_selected', is_installed: 'is_installed', +service_check_supported: 'service_check_supported', service_components_key: 'service_components', service_components_type: 'array', service_components: { @@ -42,6 +43,7 @@ App.stackServiceMapper = App.QuickDataMapper.create({ id: 'component_name', component_name: 'component_name', cardinality: 'cardinality', +custom_commands: 'custom_commands', service_name: 'service_name', component_category: 'component_category', is_master: 'is_master', @@ -76,6 +78,7 @@ App.stackServiceMapper = App.QuickDataMapper.create({ item.serviceComponents.forEach(function (serviceComponent) { serviceComponent.StackServiceComponents.id = serviceComponent.StackServiceComponents.component_name; serviceComponent.StackServiceComponents.dependencies = serviceComponent.dependencies; + serviceComponent.StackServiceComponents.custom_commands = serviceComponent.StackServiceComponents.custom_commands; serviceComponents.push(serviceComponent.StackServiceComponents); stackServiceComponents.push(this.parseIt(serviceComponent.StackServiceComponents, this.get('component_config'))); }, this); http://git-wip-us.apache.org/repos/asf/ambari/blob/2e432f3b/ambari-web/app/models/stack_service.js -- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 6d9acab..61c89fa 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -40,6 +40,7 @@ App.StackService = DS.Model.extend(App.ServiceModelMixin, { comments: DS.attr('string'), configTypes: DS.attr('object'), serviceVersion: DS.attr('string'), + serviceCheckSupported: DS.attr('boolean'), stackName: DS.attr('string'), stackVersion: DS.attr('string'), isSelected: DS.attr('boolean', {defaultValue: true}), http://git-wip-us.apache.org/repos/asf/ambari/blob/2e432f3b/ambari-web/app/models/stack_service_component.js -- diff --git a/ambari-web/app/models/stack_service_component.js b/ambari-web/app/models/stack_service_component.js index a0765ae..3ed366c 100644 ---
git commit: AMBARI-6769 Add security configs on Add service wizard. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 2e432f3b4 - 0f24bc24b AMBARI-6769 Add security configs on Add service wizard. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f24bc24 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f24bc24 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f24bc24 Branch: refs/heads/trunk Commit: 0f24bc24bab737a5998e5063a7b2fddf41884ede Parents: 2e432f3 Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Thu Aug 7 16:07:33 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Thu Aug 7 16:07:33 2014 +0300 -- .../controllers/global/cluster_controller.js| 1 + .../main/admin/highAvailability_controller.js | 57 +-- .../main/admin/security/add/step4.js| 339 + ambari-web/app/controllers/main/host/details.js | 11 +- ambari-web/app/controllers/main/service/item.js | 2 - .../app/controllers/wizard/step7_controller.js | 44 ++- .../app/controllers/wizard/step8_controller.js | 15 +- ambari-web/app/mixins.js| 1 + .../app/mixins/wizard/addSecurityConfigs.js | 370 +++ .../views/main/admin/highAvailability_view.js | 4 - .../main/admin/security/add/step4_test.js | 309 +--- .../test/controllers/wizard/step8_test.js | 15 - .../mixins/wizard/addSeccurityConfigs_test.js | 338 + 13 files changed, 777 insertions(+), 729 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0f24bc24/ambari-web/app/controllers/global/cluster_controller.js -- diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js index 738ee1f..77bcccd 100644 --- a/ambari-web/app/controllers/global/cluster_controller.js +++ b/ambari-web/app/controllers/global/cluster_controller.js @@ -345,6 +345,7 @@ App.ClusterController = Em.Controller.extend({ }); }); }); +App.router.get('mainAdminSecurityController').getUpdatedSecurityStatus(); }, requestHosts: function (realUrl, callback) { http://git-wip-us.apache.org/repos/asf/ambari/blob/0f24bc24/ambari-web/app/controllers/main/admin/highAvailability_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js index e090662..c40e99a 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js @@ -21,7 +21,9 @@ var App = require('app'); App.MainAdminHighAvailabilityController = Em.Controller.extend({ name: 'mainAdminHighAvailabilityController', - securityEnabled: false, + securityEnabled: function () { +return App.router.get('mainAdminSecurityController.securityEnabled'); + }.property('App.router.mainAdminSecurityController.securityEnabled'), tag: null, @@ -84,59 +86,6 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({ return true; }, - setSecurityStatus: function () { -if (App.get('testMode')) { - this.set('securityEnabled', !App.get('testEnableSecurity')); - this.set('dataIsLoaded', true); -} else { - //get Security Status From Server - return App.ajax.send({ -name: 'admin.security_status', -sender: this, -success: 'getSecurityStatusFromServerSuccessCallback', -error: 'errorCallback' - }); -} - }, - - errorCallback: function () { -this.showErrorPopup(Em.I18n.t('admin.security.status.error')); - }, - - getSecurityStatusFromServerSuccessCallback: function (data) { -var configs = data.Clusters.desired_configs; -if ('hadoop-env' in configs) { - this.set('tag', configs['hadoop-env'].tag); - this.getServiceConfigsFromServer(); -} else { - this.showErrorPopup(Em.I18n.t('admin.security.status.error')); -} - }, - - /** - * get service configs from server and - * indicate whether security is enabled - */ - getServiceConfigsFromServer: function () { -var self = this; -var tags = [ - { -siteName: hadoop-env, -tagName: this.get('tag') - } -]; - App.router.get('configurationController').getConfigsByTags(tags).done(function (data) { - self.set('securityEnabled', self.isSecurityEnabled(data.findProperty('tag', self.get('tag')).properties)); - self.set('dataIsLoaded', true); -}); - }, - - /** - * identify whether security is enabled by security config - */ - isSecurityEnabled: function(properties){
git commit: AMBARI-6760. Server-side implementation of Cancel requests (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk 5bcd37529 - 7c0bab119 AMBARI-6760. Server-side implementation of Cancel requests (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c0bab11 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c0bab11 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c0bab11 Branch: refs/heads/trunk Commit: 7c0bab1197b5685f86c39a81372d44f8f8648451 Parents: 5bcd375 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Tue Aug 5 16:47:44 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Thu Aug 7 17:33:50 2014 +0300 -- .../actionmanager/ActionDBAccessorImpl.java | 6 +- .../server/actionmanager/ActionManager.java | 26 ++- .../server/actionmanager/ActionScheduler.java | 167 --- .../server/actionmanager/HostRoleStatus.java| 4 +- .../ambari/server/actionmanager/Request.java| 13 ++ .../ambari/server/agent/AgentCommand.java | 1 + .../ambari/server/agent/CancelCommand.java | 55 ++ .../ambari/server/agent/HeartBeatHandler.java | 25 ++- .../ambari/server/agent/HeartBeatResponse.java | 16 ++ .../server/controller/ControllerModule.java | 2 +- .../internal/RequestResourceProvider.java | 7 +- .../actionmanager/TestActionDBAccessorImpl.java | 2 +- .../server/actionmanager/TestActionManager.java | 4 +- .../actionmanager/TestActionScheduler.java | 8 +- .../server/agent/TestHeartbeatHandler.java | 13 +- 15 files changed, 263 insertions(+), 86 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7c0bab11/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index 1ba6b94..dae9048 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -350,7 +350,11 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { ListHostRoleCommandEntity commandEntities = hostRoleCommandDAO.findByPKs(taskReports.keySet()); for (HostRoleCommandEntity commandEntity : commandEntities) { CommandReport report = taskReports.get(commandEntity.getTaskId()); - commandEntity.setStatus(HostRoleStatus.valueOf(report.getStatus())); + if (commandEntity.getStatus() != HostRoleStatus.ABORTED) { +// We don't want to overwrite statuses for ABORTED tasks with +// statuses that have been received from the agent after aborting task +commandEntity.setStatus(HostRoleStatus.valueOf(report.getStatus())); + } commandEntity.setStdOut(report.getStdOut().getBytes()); commandEntity.setStdError(report.getStdErr().getBytes()); commandEntity.setStructuredOut(report.getStructuredOut() == null ? null : http://git-wip-us.apache.org/repos/asf/ambari/blob/7c0bab11/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java index 3bcf8c2..e2fad5f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java @@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Collection; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; @@ -118,28 +119,39 @@ public class ActionManager { return db.getAllStages(requestId); } + public HostRoleCommand getTaskById(long taskId) { +return db.getTask(taskId); + } + /** * Persists command reports into the db + * @param reports command reports + * @param commands a list of commands that correspond to reports list (it should be + * a 1 to 1 matching). We use this list to avoid fetching commands from the DB + * twice */ - public void processTaskResponse(String hostname, ListCommandReport reports) { + public void processTaskResponse(String hostname, ListCommandReport reports, + CollectionHostRoleCommand commands) { if (reports == null) { return; } ListCommandReport reportsToProcess
git commit: AMBARI-6771 Start services failed on SUSE after cluster install. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 7c0bab119 - c4a553539 AMBARI-6771 Start services failed on SUSE after cluster install. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c4a55353 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c4a55353 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c4a55353 Branch: refs/heads/trunk Commit: c4a55353955e9fb1538cadf53ca1fe3956092448 Parents: 7c0bab1 Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Thu Aug 7 18:11:36 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Thu Aug 7 18:11:52 2014 +0300 -- .../app/controllers/wizard/step8_controller.js | 109 +-- 1 file changed, 52 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c4a55353/ambari-web/app/controllers/wizard/step8_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index e2a2a29..727eee4 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -233,46 +233,43 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, { */ removeHiveConfigs: function (configs) { var hiveDb = configs.findProperty('name', 'hive_database'); -var hiveDbType = {name: 'hive_database_type', value: 'mysql'}; - -var hive_properties = Em.A([]); - -if (hiveDb.value === 'New MySQL Database') { - if (configs.someProperty('name', 'hive_ambari_host')) { -configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_ambari_host').value; -hiveDbType.value = 'mysql'; - } - hive_properties = Em.A(['hive_existing_mysql_host', 'hive_existing_mysql_database', 'hive_existing_oracle_host', -'hive_existing_oracle_database', 'hive_existing_postgresql_host', 'hive_existing_postgresql_database']); -} -else { - if (hiveDb.value === 'Existing MySQL Database') { -configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_existing_mysql_host').value; -hiveDbType.value = 'mysql'; -hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_oracle_host', - 'hive_existing_oracle_database', 'hive_existing_postgresql_host', 'hive_existing_postgresql_database']); - } - else { -if (hiveDb.value === Em.I18n.t('services.service.config.hive.oozie.postgresql')) { +var hiveDbType = configs.findProperty('name', 'hive_database_type'); +if (hiveDbType) { + var hive_properties = Em.A([]); + + switch (hiveDb.value) { +case 'New MySQL Database': + if (configs.someProperty('name', 'hive_ambari_host')) { +configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_ambari_host').value; +hiveDbType.value = 'mysql'; + } + hive_properties = Em.A(['hive_existing_mysql_host', 'hive_existing_mysql_database', 'hive_existing_oracle_host', +'hive_existing_oracle_database', 'hive_existing_postgresql_host', 'hive_existing_postgresql_database']); + break; +case 'Existing MySQL Database': + configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_existing_mysql_host').value; + hiveDbType.value = 'mysql'; + hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_oracle_host', +'hive_existing_oracle_database', 'hive_existing_postgresql_host', 'hive_existing_postgresql_database']); + break; +case Em.I18n.t('services.service.config.hive.oozie.postgresql'): configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_existing_postgresql_host').value; hiveDbType.value = 'postgres'; hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_oracle_host', 'hive_existing_oracle_database', 'hive_existing_mysql_host', 'hive_existing_mysql_database']); -} -else { //existing oracle database + break; +default: configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_existing_oracle_host').value; hiveDbType.value = 'oracle'; hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_mysql_host', 'hive_existing_mysql_database', 'hive_existing_postgresql_host', 'hive_existing_postgresql_database']); -} + break;
git commit: AMBARI-6709 After Namenode is moved via Ambari the hive metastore namenode hostname is not updated with the new namenode hostname (Dmytro Shkvyra via dsen)
Repository: ambari Updated Branches: refs/heads/trunk c4a553539 - 334583cdd AMBARI-6709 After Namenode is moved via Ambari the hive metastore namenode hostname is not updated with the new namenode hostname (Dmytro Shkvyra via dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/334583cd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/334583cd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/334583cd Branch: refs/heads/trunk Commit: 334583cdd8dcc3e6d454d626a2734c5e85560396 Parents: c4a5535 Author: Dmytro Sen d...@hortonworks.com Authored: Thu Aug 7 18:19:55 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Thu Aug 7 18:20:12 2014 +0300 -- .../services/HIVE/package/scripts/hive_service.py | 13 + .../2.0.6/services/HIVE/package/scripts/params.py | 1 + .../python/stacks/2.0.6/HIVE/test_hive_server.py | 17 +++-- 3 files changed, 25 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/334583cd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py index 8a57b01..cb10940 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py @@ -22,6 +22,7 @@ from resource_management import * import socket import sys import time +from resource_management.core.shell import call def hive_service( name, @@ -41,6 +42,9 @@ def hive_service( process_id_exists = format(ls {pid_file} /dev/null 21 ps `cat {pid_file}` /dev/null 21) if action == 'start': +if name == 'hiveserver2': + check_fs_root() + demon_cmd = format({cmd}) Execute(demon_cmd, @@ -95,3 +99,12 @@ def hive_service( Execute(demon_cmd, not_if = format(! ({process_id_exists})) ) + +def check_fs_root(): + import params + fs_root_url = format({fs_root}{hive_apps_whs_dir}) + cmd = /usr/lib/hive/bin/metatool -listFSRoot 2/dev/null | grep hdfs:// + code, out = call(cmd, user=params.hive_user) + if code == 0 and fs_root_url.strip() != out.strip(): +cmd = format(/usr/lib/hive/bin/metatool -updateLocation {fs_root}{hive_apps_whs_dir} {out}) +Execute(cmd, user=params.hive_user) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/334583cd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py index 5b6ac59..c492f04 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py @@ -66,6 +66,7 @@ smoke_test_path = format({tmp_dir}/hiveserver2Smoke.sh) smoke_user_keytab = config['configurations']['hadoop-env']['smokeuser_keytab'] _authentication = config['configurations']['core-site']['hadoop.security.authentication'] +fs_root = config['configurations']['core-site']['fs.defaultFS'] security_enabled = ( not is_empty(_authentication) and _authentication == 'kerberos') kinit_path_local = functions.get_kinit_path([/usr/bin, /usr/kerberos/bin, /usr/sbin]) http://git-wip-us.apache.org/repos/asf/ambari/blob/334583cd/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py index 4e7df9d..8eb6bd2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py @@ -46,9 +46,10 @@ class TestHiveServer(RMFTestCase): content='log4jproperties\nline2' ) self.assertNoMoreResources() - + + @patch(hive_service.check_fs_root) @patch(socket.socket) - def test_start_default(self, socket_mock): + def test_start_default(self, socket_mock, check_fs_root_mock): s = socket_mock.return_value self.executeScript(2.0.6/services/HIVE/package/scripts/hive_server.py, @@ -129,6 +130,7 @@ class
git commit: AMBARI-6759. Switching host to config-group with final flag turned off does not reflect in file
Repository: ambari Updated Branches: refs/heads/trunk 334583cdd - 7a8de5884 AMBARI-6759. Switching host to config-group with final flag turned off does not reflect in file Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7a8de588 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7a8de588 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7a8de588 Branch: refs/heads/trunk Commit: 7a8de5884e5e856f751e7bb52776f27cf7b828ea Parents: 334583c Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Aug 6 12:52:35 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Thu Aug 7 08:52:37 2014 -0700 -- .../ambari/server/state/ConfigHelper.java | 36 +- .../ambari/server/state/ConfigHelperTest.java | 116 +++ 2 files changed, 147 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7a8de588/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java index b8bf23b..481245c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java @@ -225,11 +225,7 @@ public class ConfigHelper { for (EntryString, String overrideEntry : tags.entrySet()) { Config overrideConfig = cluster.getConfig(type, overrideEntry.getValue()); - - // TODO clarify correct behavior for attributes overriding - if (overrideConfig != null) { -cloneAttributesMap(overrideConfig.getPropertiesAttributes(), attributesMap); - } + overrideAttributes(overrideConfig, attributesMap); } if (attributesMap != null) { attributes.put(type, attributesMap); @@ -270,6 +266,36 @@ public class ConfigHelper { return finalConfig; } + /** + * Merge override attributes with original ones. + * If overrideConfig#getPropertiesAttributes does not contain occurrence of override for any of + * properties from overrideConfig#getProperties then persisted attribute should be removed. + */ + public MapString, MapString, String overrideAttributes(Config overrideConfig, + MapString, MapString, String persistedAttributes) { +if (overrideConfig != null persistedAttributes != null) { + MapString, MapString, String overrideAttributes = overrideConfig.getPropertiesAttributes(); + if (overrideAttributes != null) { +cloneAttributesMap(overrideAttributes, persistedAttributes); +MapString, String overrideProperties = overrideConfig.getProperties(); +if (overrideProperties != null) { + SetString overriddenProperties = overrideProperties.keySet(); + for (String overriddenProperty : overriddenProperties) { +for (EntryString, MapString, String persistedAttribute : persistedAttributes.entrySet()) { + String attributeName = persistedAttribute.getKey(); + MapString, String persistedAttributeValues = persistedAttribute.getValue(); + MapString, String overrideAttributeValues = overrideAttributes.get(attributeName); + if (overrideAttributeValues == null || !overrideAttributeValues.containsKey(overriddenProperty)) { +persistedAttributeValues.remove(overriddenProperty); + } +} + } +} + } +} +return persistedAttributes; + } + public void cloneAttributesMap(MapString, MapString, String sourceAttributesMap, MapString, MapString, String targetAttributesMap) { if (sourceAttributesMap != null targetAttributesMap != null) { http://git-wip-us.apache.org/repos/asf/ambari/blob/7a8de588/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java index 2abc446..ffd4358 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java @@ -40,6 +40,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; public class ConfigHelperTest { private Clusters
git commit: AMBARI-6773. API for users should return list of their groups.
Repository: ambari Updated Branches: refs/heads/trunk 9515e6c82 - a716f3d7c AMBARI-6773. API for users should return list of their groups. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a716f3d7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a716f3d7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a716f3d7 Branch: refs/heads/trunk Commit: a716f3d7c503f229733ff30f809f99210a0d1d5f Parents: 9515e6c Author: Siddharth Wagle swa...@hortonworks.com Authored: Thu Aug 7 10:14:35 2014 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Thu Aug 7 10:17:12 2014 -0700 -- .../AmbariManagementControllerImpl.java | 99 ++-- .../ambari/server/controller/UserResponse.java | 9 ++ .../internal/UserResourceProvider.java | 4 + .../src/main/resources/properties.json | 1 + 4 files changed, 63 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a716f3d7/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 97c155a..69100c7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -18,48 +18,13 @@ package org.apache.ambari.server.controller; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_DRIVER; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_PASSWORD; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_URL; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_USERNAME; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.COMMAND_TIMEOUT; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.DB_DRIVER_FILENAME; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.DB_NAME; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.HOOKS_FOLDER; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.JAVA_HOME; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.JCE_NAME; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.JDK_LOCATION; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.JDK_NAME; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.MYSQL_JDBC_URL; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.ORACLE_JDBC_URL; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.PACKAGE_LIST; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.REPO_INFO; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SCRIPT; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SCRIPT_TYPE; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_PACKAGE_FOLDER; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_REPO_INFO; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_NAME; -import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_VERSION; - -import java.io.File; -import java.io.IOException; -import java.net.InetAddress; -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.EnumMap; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.TreeMap; -import java.util.concurrent.TimeUnit; - +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.google.gson.Gson; +import com.google.inject.Inject; +import com.google.inject.Injector; +import com.google.inject.Singleton; +import com.google.inject.persist.Transactional; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ClusterNotFoundException; import org.apache.ambari.server.DuplicateResourceException; @@ -136,14 +101,46 @@ import org.apache.commons.lang.math.NumberUtils; import org.apache.http.client.utils.URIBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - -import
git commit: AMBARI-6774. Ambari omits url-provided properties for single-element arrays.
Repository: ambari Updated Branches: refs/heads/trunk a716f3d7c - be6c3bdd7 AMBARI-6774. Ambari omits url-provided properties for single-element arrays. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be6c3bdd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be6c3bdd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be6c3bdd Branch: refs/heads/trunk Commit: be6c3bdd7fb4471f0e23b53739c71c0c0ecec03f Parents: a716f3d Author: Siddharth Wagle swa...@hortonworks.com Authored: Thu Aug 7 10:18:27 2014 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Thu Aug 7 10:18:27 2014 -0700 -- .../persistence/PersistenceManagerImpl.java | 30 +--- .../services/PersistenceManagerImplTest.java| 13 - 2 files changed, 26 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be6c3bdd/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java index 595ad00..1c488a8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java @@ -67,7 +67,7 @@ public class PersistenceManagerImpl implements PersistenceManager { for (Map.EntryResource.Type, String entry : mapResourceIds.entrySet()) { MapString, Object mapProperties = propertySet.getProperties(); String property = schema.getKeyPropertyId(entry.getKey()); -if (! mapProperties.containsKey(property)) { +if (!mapProperties.containsKey(property)) { mapProperties.put(property, entry.getValue()); } } @@ -79,25 +79,23 @@ public class PersistenceManagerImpl implements PersistenceManager { public RequestStatus update(ResourceInstance resource, RequestBody requestBody) throws UnsupportedPropertyException, SystemException, NoSuchParentResourceException, NoSuchResourceException { -// Allow for multiple property sets in an update request body... +MapResource.Type, String mapResourceIds = resource.getKeyValueMap(); +Resource.Type type = resource.getResourceDefinition().getType(); +Schema schema = m_controller.getSchema(type); + SetNamedPropertySet setProperties = requestBody.getNamedPropertySets(); -if (setProperties.size() 1) { - MapResource.Type, String mapResourceIds = resource.getKeyValueMap(); - Resource.Type type = resource.getResourceDefinition().getType(); - Schema schema = m_controller.getSchema(type); - - for (NamedPropertySet propertySet : setProperties) { -for (Map.EntryResource.Type, String entry : mapResourceIds.entrySet()) { - MapString, Object mapProperties = propertySet.getProperties(); - String property = schema.getKeyPropertyId(entry.getKey()); - if (! mapProperties.containsKey(property)) { -mapProperties.put(property, entry.getValue()); - } + +for (NamedPropertySet propertySet : setProperties) { + for (Map.EntryResource.Type, String entry : mapResourceIds.entrySet()) { +MapString, Object mapProperties = propertySet.getProperties(); +String property = schema.getKeyPropertyId(entry.getKey()); +if (!mapProperties.containsKey(property)) { + mapProperties.put(property, entry.getValue()); } } } -return m_controller.updateResources(resource.getResourceDefinition().getType(), -createControllerRequest(requestBody), resource.getQuery().getPredicate()); + +return m_controller.updateResources(type, createControllerRequest(requestBody), resource.getQuery().getPredicate()); } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/be6c3bdd/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java index f98ada8..82bd6ec 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java @@ -197,6 +197,13 @@ public class
git commit: AMBARI-6777. Views: view.xml instance changes are not picked up on redeploy.
Repository: ambari Updated Branches: refs/heads/trunk 892ea706b - 2585179a8 AMBARI-6777. Views: view.xml instance changes are not picked up on redeploy. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2585179a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2585179a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2585179a Branch: refs/heads/trunk Commit: 2585179a80c3cdefa7fa69be09689308150ffddb Parents: 892ea70 Author: Siddharth Wagle swa...@hortonworks.com Authored: Thu Aug 7 10:34:45 2014 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Thu Aug 7 10:34:45 2014 -0700 -- .../server/orm/entities/ViewInstanceEntity.java | 25 .../server/upgrade/UpgradeCatalog170.java | 2 + .../apache/ambari/server/view/ViewRegistry.java | 126 --- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 2 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 2 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 2 +- .../ambari/server/view/ViewRegistryTest.java| 84 - 8 files changed, 191 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2585179a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java index fa303c7..78afdff 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java @@ -125,6 +125,13 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { private String icon64; /** + * The XML driven instance flag. + */ + @Column(name=xml_driven) + @Basic + private char xmlDriven = 'N'; + + /** * The instance properties. */ @OneToMany(cascade = CascadeType.ALL, mappedBy = viewInstance) @@ -398,6 +405,24 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { } /** + * Get the xml driven flag. + * + * @return the xml driven flag + */ + public boolean isXmlDriven() { +return xmlDriven == 'y' || xmlDriven == 'Y'; + } + + /** + * Set the xml driven flag. + * + * @param xmlDriven the xml driven flag + */ + public void setXmlDriven(boolean xmlDriven) { +this.xmlDriven = (xmlDriven) ? 'Y' : 'N'; + } + + /** * Get the instance properties. * * @return the instance properties http://git-wip-us.apache.org/repos/asf/ambari/blob/2585179a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java index 9fbed00..dba6ef7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java @@ -186,6 +186,8 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog { Integer.class, 1, 1, false)); dbAccessor.addColumn(viewinstance, new DBColumnInfo(resource_id, Long.class, 1, 1, false)); +dbAccessor.addColumn(viewinstance, new DBColumnInfo(xml_driven, +Character.class, 1, null, true)); dbAccessor.addColumn(clusters, new DBColumnInfo(resource_id, Long.class, 1, 1, false)); http://git-wip-us.apache.org/repos/asf/ambari/blob/2585179a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 58e68c2..b3eece2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -76,6 +76,7 @@ import javax.xml.bind.Unmarshaller; import java.beans.IntrospectionException; import java.io.File; +import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; @@ -410,13 +411,17 @@ public class ViewRegistry { // extract the archive and get the class loader ClassLoader cl =
git commit: AMBARI-6782. Wizard: Adding Master component does not create and install the master host component. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk a65ae123b - d8ebf2d67 AMBARI-6782. Wizard: Adding Master component does not create and install the master host component. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d8ebf2d6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d8ebf2d6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d8ebf2d6 Branch: refs/heads/trunk Commit: d8ebf2d67b8856eaebf6dd04bd5232528c79d861 Parents: a65ae12 Author: Jaimin Jetly jai...@hortonworks.com Authored: Thu Aug 7 15:23:18 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Thu Aug 7 15:23:18 2014 -0700 -- ambari-web/app/controllers/wizard/step5_controller.js | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d8ebf2d6/ambari-web/app/controllers/wizard/step5_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step5_controller.js b/ambari-web/app/controllers/wizard/step5_controller.js index 1f42717..c44835b 100644 --- a/ambari-web/app/controllers/wizard/step5_controller.js +++ b/ambari-web/app/controllers/wizard/step5_controller.js @@ -777,6 +777,7 @@ App.WizardStep5Controller = Em.Controller.extend({ newMaster.set(display_name, lastMaster.get(display_name)); newMaster.set(component_name, lastMaster.get(component_name)); newMaster.set(selectedHost, lastMaster.get(selectedHost)); + newMaster.set(serviceId, lastMaster.get(serviceId)); newMaster.set(isInstalled, false); if (currentMasters.get(length) === (maxNumMasters - 1)) {
git commit: AMBARI-6785. Admin View: various bug fixes and UI improvements. (yusaku)
Repository: ambari Updated Branches: refs/heads/trunk d8ebf2d67 - e8b355412 AMBARI-6785. Admin View: various bug fixes and UI improvements. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e8b35541 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e8b35541 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e8b35541 Branch: refs/heads/trunk Commit: e8b3554124adcee975309f9b39487ec1803f11c7 Parents: d8ebf2d Author: Yusaku Sako yus...@hortonworks.com Authored: Thu Aug 7 15:57:51 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Thu Aug 7 16:22:21 2014 -0700 -- .../main/resources/ui/admin-web/app/index.html | 13 ++--- .../app/scripts/controllers/LDAPModalCtrl.js| 57 .../app/scripts/controllers/NavbarCtrl.js | 20 ++- .../ambariViews/CreateViewInstanceCtrl.js | 50 ++--- .../controllers/groups/GroupsListCtrl.js| 12 - .../app/scripts/controllers/mainCtrl.js | 20 ++- .../scripts/controllers/users/UsersListCtrl.js | 12 - .../scripts/controllers/users/UsersShowCtrl.js | 19 +-- .../ui/admin-web/app/scripts/services/Auth.js | 30 +++ .../ui/admin-web/app/scripts/services/User.js | 20 --- .../ui/admin-web/app/scripts/services/View.js | 21 +++- .../ui/admin-web/app/scripts/services/ldap.js | 30 ++- .../resources/ui/admin-web/app/styles/main.css | 34 .../admin-web/app/views/ambariViews/create.html | 2 +- .../admin-web/app/views/ambariViews/edit.html | 2 +- .../admin-web/app/views/ambariViews/list.html | 7 ++- .../ui/admin-web/app/views/groups/edit.html | 2 +- .../ui/admin-web/app/views/groups/list.html | 1 - .../ui/admin-web/app/views/ldapModal.html | 47 .../ui/admin-web/app/views/leftNavbar.html | 12 - .../admin-web/app/views/modals/AboutModal.html | 42 +++ .../ui/admin-web/app/views/users/list.html | 1 - .../ui/admin-web/app/views/users/show.html | 2 +- .../src/main/resources/ui/admin-web/gulpfile.js | 1 + .../main/resources/ui/admin-web/package.json| 3 +- 25 files changed, 267 insertions(+), 193 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e8b35541/ambari-admin/src/main/resources/ui/admin-web/app/index.html -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html b/ambari-admin/src/main/resources/ui/admin-web/app/index.html index f201d06..9aef85b 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html +++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html @@ -40,16 +40,13 @@ p class=browsehappyYou are using an strongoutdated/strong browser. Please a href=http://browsehappy.com/;upgrade your browser/a to improve your experience./p ![endif]-- -div id=top-nav +div id=top-nav ng-controller=MainCtrl header class=navbar navbar-static-top navbar-inverse div class=navbar-inner div class=container a href=#/ class=logoimg src=/img/logo-white.png alt=Apache Ambari title=Apache Ambari/a a href=#/ class=brand title=Apache AmbariAmbari/a -a href= class=brand cluster-nameAmbari Admin Console/a -!-- div class=navbar-header - a href=#/ class=navbar-brandAmbari Admin Console/a -/div -- +a href= class=brand cluster-nameAdmin Console/a ul class=nav navbar-nav navbar-right li div class=btn-group dropdown is-open=status.isopen @@ -57,9 +54,9 @@ Admin span class=caret/span /button ul class=dropdown-menu role=menu -lia href=#About/a/li +lia href ng-click=about()About/a/li li class=divider/li -lia href=#Sign Out/a/li +lia href ng-click=signOut()Sign Out/a/li /ul /div /li @@ -114,7 +111,6 @@ script src=scripts/routes.js/script script src=scripts/controllers/mainCtrl.js/script script src=scripts/controllers/NavbarCtrl.js/script -script src=scripts/controllers/LDAPModalCtrl.js/script script src=scripts/controllers/users/UsersCreateCtrl.js/script script src=scripts/controllers/users/UsersListCtrl.js/script script src=scripts/controllers/users/UsersShowCtrl.js/script @@ -136,6 +132,7 @@ script src=scripts/services/PermissionLoader.js/script script src=scripts/services/PermissionsSaver.js/script script src=scripts/services/ConfirmationModal.js/script +script
git commit: AMBARI-6781. BE: Provide configurations recommendations via /recommendations endpoint on stack-version
Repository: ambari Updated Branches: refs/heads/trunk e8b355412 - b13bb71dc AMBARI-6781. BE: Provide configurations recommendations via /recommendations endpoint on stack-version Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b13bb71d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b13bb71d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b13bb71d Branch: refs/heads/trunk Commit: b13bb71dc27494f220f97f1b5c6ba8d05354a55e Parents: e8b3554 Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Thu Aug 7 14:23:50 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Thu Aug 7 16:47:08 2014 -0700 -- .../stackadvisor/StackAdvisorHelper.java| 21 +++ .../stackadvisor/StackAdvisorHelper.java.orig | 116 ++ .../stackadvisor/StackAdvisorRequest.java | 22 +++ ...GetComponentLayoutRecommnedationCommand.java | 5 + .../GetComponentLayoutValidationCommand.java| 5 + .../GetConfigurationRecommnedationCommand.java | 118 ++ .../commands/StackAdvisorCommand.java | 5 +- .../internal/StackAdvisorResourceProvider.java | 75 - .../src/main/resources/scripts/stack_advisor.py | 20 +-- .../stacks/HDP/2.0.6/services/stack_advisor.py | 159 ++- .../stacks/HDP/2.1/services/stack_advisor.py| 41 + .../main/resources/stacks/HDP/stack_advisor.py | 2 +- .../commands/StackAdvisorCommandTest.java | 5 + 13 files changed, 544 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b13bb71d/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java index 213b0f0..156b637 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java @@ -24,6 +24,7 @@ import java.io.IOException; import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest.StackAdvisorRequestType; import org.apache.ambari.server.api.services.stackadvisor.commands.GetComponentLayoutRecommnedationCommand; import org.apache.ambari.server.api.services.stackadvisor.commands.GetComponentLayoutValidationCommand; +import org.apache.ambari.server.api.services.stackadvisor.commands.GetConfigurationRecommnedationCommand; import org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand; import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse; import org.apache.ambari.server.api.services.stackadvisor.validations.ValidationResponse; @@ -105,6 +106,9 @@ public class StackAdvisorHelper { if (requestType == StackAdvisorRequestType.HOST_GROUPS) { command = new GetComponentLayoutRecommnedationCommand(recommendationsDir, stackAdvisorScript, requestId, saRunner); +} else if (requestType == StackAdvisorRequestType.CONFIGURATIONS) { + command = new GetConfigurationRecommnedationCommand(recommendationsDir, stackAdvisorScript, + requestId, saRunner); } else { throw new StackAdvisorException(String.format(Unsupported request type, type=%s, requestType)); @@ -113,4 +117,21 @@ public class StackAdvisorHelper { return command; } + /** + * Return configurations recommendation based on hosts and services + * information. + * + * @param request the recommendation request + * @return {@link RecommendationResponse} instance + * @throws StackAdvisorException in case of stack advisor script errors + */ + public synchronized RecommendationResponse getConfigurationRecommnedation( + StackAdvisorRequest request) throws StackAdvisorException { +requestId += 1; + +GetConfigurationRecommnedationCommand command = new GetConfigurationRecommnedationCommand( +recommendationsDir, stackAdvisorScript, requestId, saRunner); +return command.invoke(request); + } + } http://git-wip-us.apache.org/repos/asf/ambari/blob/b13bb71d/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java.orig -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java.orig