git commit: Revert AMBARI-7218. rename host group deletes configs (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk 9cf27bf86 - 22b1df064 Revert AMBARI-7218. rename host group deletes configs (dlysnichenko) This reverts commit 9ce44c953de1154883887538c5979e5d9036a30c. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/22b1df06 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22b1df06 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22b1df06 Branch: refs/heads/trunk Commit: 22b1df06454e32753864ea3a622d9cd5b8d921fa Parents: 9cf27bf Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Wed Sep 10 13:13:46 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Wed Sep 10 13:13:46 2014 +0300 -- .../internal/ConfigGroupResourceProvider.java | 136 +++ .../ConfigGroupResourceProviderTest.java| 130 -- 2 files changed, 49 insertions(+), 217 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/22b1df06/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java index 52df317..6e13d9c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java @@ -383,36 +383,6 @@ public class ConfigGroupResourceProvider extends cluster.deleteConfigGroup(request.getId()); } - private void basicRequestValidation(ConfigGroupRequest request) { -if (request.getId() == null -|| request.getClusterName() == null -|| request.getClusterName().isEmpty() -|| request.getGroupName() == null -|| request.getGroupName().isEmpty()) { - LOG.debug(Received a config group request with request id = + - request.getId() + , cluster name = + - request.getClusterName() + , group name = + request.getGroupName()); - throw new IllegalArgumentException(Request id, + - cluster name and + - group name have to be provided.); -} - } - - private void validateRenameRequest(ConfigGroupRequest request) { -if (request.getTag() != null -|| (request.getHosts() != null ! request.getHosts().isEmpty()) -|| request.getDescription() != null -|| request.getServiceConfigVersionNote() != null -|| (request.getConfigs()!=null ! request.getConfigs().isEmpty())) { - throw new IllegalArgumentException(Request with id + - request.getId() + - seems to be a config group rename request. + - Renaming config group can not be combined with other + - operations, so hosts, configs, description, service config version note + - request fields should not be populated.); -} - } - private void validateRequest(ConfigGroupRequest request) { if (request.getClusterName() == null || request.getClusterName().isEmpty() @@ -534,87 +504,79 @@ public class ConfigGroupResourceProvider extends Clusters clusters = getManagementController().getClusters(); for (ConfigGroupRequest request : requests) { - basicRequestValidation(request); Cluster cluster; try { cluster = clusters.getCluster(request.getClusterName()); } catch (ClusterNotFoundException e) { throw new ParentObjectNotFoundException( - String.format( -The cluster %s does not exist, can not update a config group, - request.getClusterName()), e); + Attempted to add a config group to a cluster which doesn't exist, e); } + if (request.getId() == null) { +throw new AmbariException(Config group Id is a required parameter.); + } + + validateRequest(request); + // Find config group - MapLong, ConfigGroup configGroups = cluster.getConfigGroups(); - ConfigGroup configGroup = configGroups.get(request.getId()); + ConfigGroup configGroup = cluster.getConfigGroups().get(request.getId()); if (configGroup == null) { throw new AmbariException(Config group not found + , clusterName = + request.getClusterName() + , groupId = + request.getId()); } + String serviceName = configGroup.getServiceName(); + String requestServiceName =
git commit: AMBARI-7236. UI changes for rename host group deletes configs. (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk 22b1df064 - d3bfd49d4 AMBARI-7236. UI changes for rename host group deletes configs. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d3bfd49d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d3bfd49d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d3bfd49d Branch: refs/heads/trunk Commit: d3bfd49d4c8e15cadce01e9c7abdc33a5fe8f4bc Parents: 22b1df0 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Wed Sep 10 13:28:04 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Wed Sep 10 13:28:04 2014 +0300 -- .../main/service/manage_config_groups_controller.js | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bfd49d/ambari-web/app/controllers/main/service/manage_config_groups_controller.js -- diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js index 53a11d7..76b7005 100644 --- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js +++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js @@ -484,27 +484,30 @@ App.ManageConfigGroupsController = Em.Controller.extend({ var groupsToCreate = []; var groups = this.get('configGroups'); var originalGroups = this.get('originalConfigGroups'); -var originalGroupsNames = originalGroups.mapProperty('name').without(originalGroups.findProperty('isDefault').get('name')); +// remove default group +originalGroups = originalGroups.without(originalGroups.findProperty('isDefault')); +var originalGroupsIds = originalGroups.mapProperty('id'); groups.forEach(function (group) { if (!group.get('isDefault')) { -var originalGroup = originalGroups.findProperty('name', group.get('name')); +var originalGroup = originalGroups.findProperty('id', group.get('id')); if (originalGroup) { if (!(JSON.stringify(group.get('hosts').slice().sort()) === JSON.stringify(originalGroup.get('hosts').sort( { groupsToClearHosts.push(group.set('id', originalGroup.get('id'))); if (group.get('hosts').length) { groupsToSetHosts.push(group.set('id', originalGroup.get('id'))); } - } else if (group.get('description') !== originalGroup.get('description')) { + // should update name or description + } else if (group.get('description') !== originalGroup.get('description') || group.get('name') !== originalGroup.get('name') ) { groupsToSetHosts.push(group.set('id', originalGroup.get('id'))); } - originalGroupsNames = originalGroupsNames.without(group.get('name')); + originalGroupsIds = originalGroupsIds.without(group.get('id')); } else { groupsToCreate.push(group); } } }); -originalGroupsNames.forEach(function (groupName) { - groupsToDelete.push(originalGroups.findProperty('name', groupName)); +originalGroupsIds.forEach(function (id) { + groupsToDelete.push(originalGroups.findProperty('id', id)); }, this); return { toClearHosts: groupsToClearHosts,
git commit: AMBARI-7238 Slider View: FE - Show alerts provided by alerts API. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk d3bfd49d4 - c91fab72a AMBARI-7238 Slider View: FE - Show alerts provided by alerts API. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c91fab72 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c91fab72 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c91fab72 Branch: refs/heads/trunk Commit: c91fab72a2290b537e2a4036d02239b8f23e2d0f Parents: d3bfd49 Author: atkach atk...@hortonworks.com Authored: Wed Sep 10 14:35:58 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Wed Sep 10 14:35:58 2014 +0300 -- .../resources/ui/app/assets/data/apps/apps.json | 124 +++ .../src/main/resources/ui/app/helpers/helper.js | 47 +++- .../ui/app/mappers/slider_apps_mapper.js| 79 --- .../main/resources/ui/app/models/slider_app.js | 5 + .../resources/ui/app/models/slider_app_alert.js | 172 +++ .../resources/ui/app/styles/application.less| 60 ++ .../ui/app/templates/slider_app/summary.hbs | 27 ++- .../src/main/resources/ui/app/translations.js | 14 ++ .../ui/app/views/slider_app/summary_view.js | 20 +- .../slider/src/main/resources/ui/config.js | 1 + .../ui/vendor/scripts/common/jquery.timeago.js | 214 +++ 11 files changed, 732 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c91fab72/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json -- diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json b/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json index 60cc831..d774387 100644 --- a/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json +++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json @@ -18,6 +18,68 @@ version : 1.0.0, view_name : SLIDER, yarnId : application_1409333994422_0005, + alerts : { +detail : [ + { +description : alert1, +host_name : Ñ6402.ambari.apache.org, +last_status : CRITICAL, +last_status_time : 1409689349, +service_name : HBASE, +status : OK, +status_time : 1409703869, +output : Connection refused, +actual_status : CRITICAL + }, + { +description : alert2, +host_name : Ñ6402.ambari.apache.org, +last_status : OK, +last_status_time : 1409334745, +service_name : HBASE, +status : WARNING, +status_time : 1409703865, +output : TCP OK - 0.001 second response time on port 9083, +actual_status : OK + }, + { +description : NameNode edit logs directory status on dev01.hortonworks.com, +host_name : dev01.hortonworks.com, +last_status : WARNING, +last_status_time : 1389788011, +service_name : HBASE, +status : CRITICAL, +status_time : 1389793171, +output : WARNING: NameNode directory status not available via http://dev01.hortonworks.com:50070/jmx url, code 0 + }, + { +description : NameNode host CPU utilization on dev01.hortonworks.com, +host_name : dev01.hortonworks.com, +last_status : OK, +last_status_time : 1389636534, +service_name : HBASE, +status : PASSIVE, +status_time : 1389793060, +output : 1 CPU, load 19.0% lt; 200% : OK + }, + { +description : App Timeline Server Web UI, +host_name : dev01.hortonworks.com, +last_status : WARNING, +last_status_time : 1389636534, +service_name : HBASE, +status : UNKNOWN, +status_time : 1389793060, +output : 1 CPU, load 19.0% lt; 200% : OK + } +], +summary : { + CRITICAL : 1, + OK : 1, + PASSIVE : 0, + WARNING : 0 +} + }, components : { HBASE_MASTER : { componentName : HBASE_MASTER, @@ -403,6 +465,68 @@ version : 1.0.0, view_name : SLIDER, yarnId : application_1409333994422_0009, + alerts : { +detail : [ + { +description : alert1, +host_name : Ñ6402.ambari.apache.org, +last_status : CRITICAL, +last_status_time : 1409689349, +service_name : HBASE, +status : OK, +status_time : 1409703869, +output : Connection refused,
[08/39] git commit: AMBARI-7188. Views landing page shows an empty page when the default admin user logs in after cluster creation. (yusaku)
AMBARI-7188. Views landing page shows an empty page when the default admin user logs in after cluster creation. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fd4282f6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fd4282f6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fd4282f6 Branch: refs/heads/branch-alerts-dev Commit: fd4282f6126b6d6a6e3689aba38c0d2af385 Parents: 5e36846 Author: Yusaku Sako yus...@hortonworks.com Authored: Sat Sep 6 08:44:10 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Mon Sep 8 09:59:29 2014 -0700 -- ambari-web/app/controllers/main/views_controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4282f6/ambari-web/app/controllers/main/views_controller.js -- diff --git a/ambari-web/app/controllers/main/views_controller.js b/ambari-web/app/controllers/main/views_controller.js index 687554b..b3b36fe 100644 --- a/ambari-web/app/controllers/main/views_controller.js +++ b/ambari-web/app/controllers/main/views_controller.js @@ -86,7 +86,9 @@ App.MainViewsController = Em.Controller.extend({ instanceName: instance.ViewInstanceInfo.instance_name, href: instance.ViewInstanceInfo.context_path }); - instances.push(current_instance); + if( current_instance.visible ){ +instances.push(current_instance); + } }, this); }, this); }, this);
[03/39] git commit: AMBARI-7196 Config history table pagination strange behavior. (atkach)
AMBARI-7196 Config history table pagination strange behavior. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b26d8b0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b26d8b0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b26d8b0 Branch: refs/heads/branch-alerts-dev Commit: 8b26d8b0b215d3d8385a4051a070ddc6b2752e3f Parents: 3d29c28 Author: atkach atk...@hortonworks.com Authored: Mon Sep 8 15:01:17 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Mon Sep 8 15:01:17 2014 +0300 -- .../main/dashboard/config_history_controller.js | 6 -- ambari-web/app/mixins/common/table_server_mixin.js | 3 --- .../app/views/main/dashboard/config_history_view.js | 11 --- 3 files changed, 12 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8b26d8b0/ambari-web/app/controllers/main/dashboard/config_history_controller.js -- diff --git a/ambari-web/app/controllers/main/dashboard/config_history_controller.js b/ambari-web/app/controllers/main/dashboard/config_history_controller.js index a747017..41816bc 100644 --- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js +++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js @@ -29,6 +29,8 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin isPolling: false, totalCount: 0, filteredCount: 0, + timeoutRef: null, + resetStartIndex: true, mockUrl: '/data/configurations/service_versions.json', realUrl: function () { return App.apiPrefix + '/clusters/' + App.get('clusterName') + '/configurations/service_config_versions?parametersfields=service_config_version,user,group_id,group_name,is_current,createtime,service_name,service_config_version_noteminimal_response=true'; @@ -208,12 +210,12 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin doPolling: function () { var self = this; -setTimeout(function () { +this.set('timeoutRef', setTimeout(function () { if (self.get('isPolling')) { self.load().done(function () { self.doPolling(); }) } -}, App.componentsUpdateInterval); +}, App.componentsUpdateInterval)); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/8b26d8b0/ambari-web/app/mixins/common/table_server_mixin.js -- diff --git a/ambari-web/app/mixins/common/table_server_mixin.js b/ambari-web/app/mixins/common/table_server_mixin.js index d449125..41a0bf9 100644 --- a/ambari-web/app/mixins/common/table_server_mixin.js +++ b/ambari-web/app/mixins/common/table_server_mixin.js @@ -65,9 +65,6 @@ App.TableServerMixin = Em.Mixin.create({ var startIndex = App.db.getStartIndex(this.get('name')); if (!Em.isNone(startIndex)) { startIndex = (startIndex 0) ? startIndex - 1 : startIndex; - if (this.get('resetStartIndex')) { -startIndex = 0; - } this.get('paginationProps').findProperty('name', 'startIndex').value = startIndex; } return this.get('paginationProps'); http://git-wip-us.apache.org/repos/asf/ambari/blob/8b26d8b0/ambari-web/app/views/main/dashboard/config_history_view.js -- diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js b/ambari-web/app/views/main/dashboard/config_history_view.js index feeae73..ea01bb6 100644 --- a/ambari-web/app/views/main/dashboard/config_history_view.js +++ b/ambari-web/app/views/main/dashboard/config_history_view.js @@ -24,7 +24,7 @@ App.MainConfigHistoryView = App.TableView.extend({ templateName: require('templates/main/dashboard/config_history'), controllerBinding: 'App.router.mainConfigHistoryController', - filteringComplete: true, + filteringComplete: false, timeOut: null, content: function () { @@ -59,7 +59,7 @@ App.MainConfigHistoryView = App.TableView.extend({ /** * synchronize properties of view with controller to generate query parameters */ - updatePagination: function () { + updatePagination: function (key) { if (!Em.isNone(this.get('displayLength'))) { App.db.setDisplayLength(this.get('controller.name'), this.get('displayLength')); this.get('controller.paginationProps').findProperty('name', 'displayLength').value = this.get('displayLength'); @@ -69,12 +69,15 @@ App.MainConfigHistoryView = App.TableView.extend({ this.get('controller.paginationProps').findProperty('name', 'startIndex').value = this.get('startIndex'); } -this.refresh(); +if (key !== 'SKIP_REFRESH') { +
[17/39] git commit: AMBARI-7216. Mapreduce is recommending a value that isn't set. (akovalenko)
AMBARI-7216. Mapreduce is recommending a value that isn't set. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e3fd88b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e3fd88b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e3fd88b Branch: refs/heads/branch-alerts-dev Commit: 0e3fd88b85841487715e65b5538bf76b4bb58841 Parents: 2ef3506 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Tue Sep 9 13:59:22 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Tue Sep 9 13:59:22 2014 +0300 -- ambari-web/app/models/stack_service.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e3fd88b/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 ec7bcd4..edef8ce 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -259,7 +259,8 @@ App.StackService.configCategories = function () { break; case 'MAPREDUCE2': serviceConfigCategories.pushObjects([ -App.ServiceConfigCategory.create({ name: 'HISTORYSERVER', displayName: 'History Server'}) +App.ServiceConfigCategory.create({ name: 'HISTORYSERVER', displayName: 'History Server'}), +App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}) ]); break; case 'HIVE':
[04/39] git commit: AMBARI-7197. Add rca properties to log4j.properties from Download Configs. (aonishuk)
AMBARI-7197. Add rca properties to log4j.properties from Download Configs. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c8299b1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c8299b1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c8299b1 Branch: refs/heads/branch-alerts-dev Commit: 7c8299b1c5f1885af8da1fa68a75d89d0a07a601 Parents: 8b26d8b Author: Andrew Onishuk aonis...@hortonworks.com Authored: Mon Sep 8 17:25:17 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Mon Sep 8 17:25:17 2014 +0300 -- .../libraries/script/script.py | 23 +--- .../1.3.2/hooks/before-START/scripts/params.py | 23 ++-- .../HDFS/package/scripts/hdfs_client.py | 6 ++ .../services/HDFS/package/scripts/params.py | 16 +- .../MAPREDUCE/configuration/mapred-env.xml | 20 +++ .../MAPREDUCE/package/scripts/client.py | 7 +++ .../MAPREDUCE/package/scripts/params.py | 13 + .../stacks/1.3.2/HDFS/test_hdfs_client.py | 59 .../1.3.2/MAPREDUCE/test_mapreduce_client.py| 36 +++- .../python/stacks/1.3.2/configs/default.json| 10 +++- 10 files changed, 182 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7c8299b1/ambari-common/src/main/python/resource_management/libraries/script/script.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index 80bfeab..4caaa78 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -237,6 +237,20 @@ class Script(object): self.fail_with_error('configure method isn\'t implemented') + def generate_configs_get_template_file_content(self, filename, dicts): +import params +content = '' +for dict in dicts.split(','): + if dict.strip() in params.config['configurations']: +content += params.config['configurations'][dict.strip()]['content'] + +return content + + def generate_configs_get_xml_file_content(self, filename, dict): +import params +return {'configurations':params.config['configurations'][dict], + 'configuration_attributes':params.config['configuration_attributes'][dict]} + def generate_configs(self, env): Generates config files and stores them as an archive in tmp_dir @@ -254,17 +268,12 @@ class Script(object): for filename, dict in file_dict.iteritems(): XmlConfig(filename, conf_dir=conf_tmp_dir, - configurations=params.config['configurations'][dict], - configuration_attributes=params.config['configuration_attributes'][dict], + **self.generate_configs_get_xml_file_content(filename, dict) ) for file_dict in env_configs_list: for filename,dicts in file_dict.iteritems(): -content = '' -for dict in dicts.split(','): - if dict.strip() in params.config['configurations']: -content += params.config['configurations'][dict.strip()]['content'] File(os.path.join(conf_tmp_dir, filename), - content=InlineTemplate(content)) + content=InlineTemplate(self.generate_configs_get_template_file_content(filename, dicts))) with closing(tarfile.open(output_filename, w:gz)) as tar: tar.add(conf_tmp_dir, arcname=os.path.basename(.)) tar.close() http://git-wip-us.apache.org/repos/asf/ambari/blob/7c8299b1/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py index afbacbb..51f8d61 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py @@ -134,27 +134,12 @@ mapred_local_dir = /tmp/hadoop-mapred/mapred/local dfs_hosts = default('/configurations/hdfs-site/dfs.hosts', None) #log4j.properties -rca_properties = format(''' -ambari.jobhistory.database={ambari_db_rca_url} -ambari.jobhistory.driver={ambari_db_rca_driver} -ambari.jobhistory.user={ambari_db_rca_username} -ambari.jobhistory.password={ambari_db_rca_password} -ambari.jobhistory.logger=${{hadoop.root.logger}} +if 'mapred-env' in config['configurations']
[06/39] git commit: AMBARI-7203 Routing from configs to summary page doesn't work. (atkach)
AMBARI-7203 Routing from configs to summary page doesn't work. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ff74259 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ff74259 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ff74259 Branch: refs/heads/branch-alerts-dev Commit: 8ff74259c3d53484b604db43ce4233aea632e737 Parents: d4a263c Author: atkach atk...@hortonworks.com Authored: Mon Sep 8 18:58:01 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Mon Sep 8 18:58:01 2014 +0300 -- ambari-web/app/routes/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8ff74259/ambari-web/app/routes/main.js -- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index 7a39aed..d6521bd 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -539,7 +539,7 @@ module.exports = Em.Route.extend({ route: '/:service_id', connectOutlets: function (router, service) { router.get('mainServiceController').connectOutlet('mainServiceItem', service); -if (service service.get('routeToConfigs')) { +if (service router.get('mainServiceItemController').get('routeToConfigs')) { router.transitionTo('configs'); } else { router.transitionTo('summary');
[37/39] git commit: AMBARI-7238 Slider View: FE - Show alerts provided by alerts API. (atkach)
AMBARI-7238 Slider View: FE - Show alerts provided by alerts API. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c91fab72 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c91fab72 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c91fab72 Branch: refs/heads/branch-alerts-dev Commit: c91fab72a2290b537e2a4036d02239b8f23e2d0f Parents: d3bfd49 Author: atkach atk...@hortonworks.com Authored: Wed Sep 10 14:35:58 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Wed Sep 10 14:35:58 2014 +0300 -- .../resources/ui/app/assets/data/apps/apps.json | 124 +++ .../src/main/resources/ui/app/helpers/helper.js | 47 +++- .../ui/app/mappers/slider_apps_mapper.js| 79 --- .../main/resources/ui/app/models/slider_app.js | 5 + .../resources/ui/app/models/slider_app_alert.js | 172 +++ .../resources/ui/app/styles/application.less| 60 ++ .../ui/app/templates/slider_app/summary.hbs | 27 ++- .../src/main/resources/ui/app/translations.js | 14 ++ .../ui/app/views/slider_app/summary_view.js | 20 +- .../slider/src/main/resources/ui/config.js | 1 + .../ui/vendor/scripts/common/jquery.timeago.js | 214 +++ 11 files changed, 732 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c91fab72/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json -- diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json b/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json index 60cc831..d774387 100644 --- a/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json +++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json @@ -18,6 +18,68 @@ version : 1.0.0, view_name : SLIDER, yarnId : application_1409333994422_0005, + alerts : { +detail : [ + { +description : alert1, +host_name : Ñ6402.ambari.apache.org, +last_status : CRITICAL, +last_status_time : 1409689349, +service_name : HBASE, +status : OK, +status_time : 1409703869, +output : Connection refused, +actual_status : CRITICAL + }, + { +description : alert2, +host_name : Ñ6402.ambari.apache.org, +last_status : OK, +last_status_time : 1409334745, +service_name : HBASE, +status : WARNING, +status_time : 1409703865, +output : TCP OK - 0.001 second response time on port 9083, +actual_status : OK + }, + { +description : NameNode edit logs directory status on dev01.hortonworks.com, +host_name : dev01.hortonworks.com, +last_status : WARNING, +last_status_time : 1389788011, +service_name : HBASE, +status : CRITICAL, +status_time : 1389793171, +output : WARNING: NameNode directory status not available via http://dev01.hortonworks.com:50070/jmx url, code 0 + }, + { +description : NameNode host CPU utilization on dev01.hortonworks.com, +host_name : dev01.hortonworks.com, +last_status : OK, +last_status_time : 1389636534, +service_name : HBASE, +status : PASSIVE, +status_time : 1389793060, +output : 1 CPU, load 19.0% lt; 200% : OK + }, + { +description : App Timeline Server Web UI, +host_name : dev01.hortonworks.com, +last_status : WARNING, +last_status_time : 1389636534, +service_name : HBASE, +status : UNKNOWN, +status_time : 1389793060, +output : 1 CPU, load 19.0% lt; 200% : OK + } +], +summary : { + CRITICAL : 1, + OK : 1, + PASSIVE : 0, + WARNING : 0 +} + }, components : { HBASE_MASTER : { componentName : HBASE_MASTER, @@ -403,6 +465,68 @@ version : 1.0.0, view_name : SLIDER, yarnId : application_1409333994422_0009, + alerts : { +detail : [ + { +description : alert1, +host_name : Ñ6402.ambari.apache.org, +last_status : CRITICAL, +last_status_time : 1409689349, +service_name : HBASE, +status : OK, +status_time : 1409703869, +output : Connection refused, +actual_status : CRITICAL + }, + { +
[28/39] git commit: AMBARI-7230. LDAP Sync Scale issues for thousands of users/100's of groups. (mahadev)
AMBARI-7230. LDAP Sync Scale issues for thousands of users/100's of groups. (mahadev) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/17b48bf4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/17b48bf4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/17b48bf4 Branch: refs/heads/branch-alerts-dev Commit: 17b48bf40ff58a1bf429d1fbc14b3049ef79391d Parents: fbe8b87 Author: Mahadev Konar maha...@apache.org Authored: Tue Sep 9 15:09:00 2014 -0700 Committer: Mahadev Konar maha...@apache.org Committed: Tue Sep 9 15:09:08 2014 -0700 -- .../server/configuration/Configuration.java | 14 + .../controller/AmbariManagementController.java | 16 +- .../AmbariManagementControllerImpl.java | 34 +- .../ambari/server/controller/AmbariServer.java | 6 +- .../internal/ControllerResourceProvider.java| 22 +- .../apache/ambari/server/orm/dao/GroupDAO.java | 30 +- .../apache/ambari/server/orm/dao/MemberDAO.java | 34 +- .../ambari/server/orm/dao/PrincipalDAO.java | 27 +- .../ambari/server/orm/dao/PrincipalTypeDAO.java | 29 +- .../apache/ambari/server/orm/dao/UserDAO.java | 49 ++- .../server/orm/entities/MemberEntity.java | 7 +- .../server/orm/entities/PrincipalEntity.java| 2 +- .../ambari/server/orm/entities/UserEntity.java | 5 +- .../authorization/AmbariLdapDataPopulator.java | 409 -- .../server/security/authorization/User.java | 2 +- .../server/security/authorization/Users.java| 158 ++- .../security/ldap/AmbariLdapDataPopulator.java | 430 +++ .../server/security/ldap/LdapBatchDto.java | 67 +++ .../server/security/ldap/LdapGroupDto.java | 113 + .../server/security/ldap/LdapSyncDto.java | 72 .../server/security/ldap/LdapUserDto.java | 133 ++ .../security/ldap/LdapUserGroupMemberDto.java | 82 ambari-server/src/main/python/ambari-server.py | 6 +- .../src/main/resources/META-INF/persistence.xml | 4 + .../AmbariLdapDataPopulatorTest.java| 261 --- .../ldap/AmbariLdapDataPopulatorTest.java | 202 + .../security/ldap/LdapPerformanceTest.java | 94 27 files changed, 1561 insertions(+), 747 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/17b48bf4/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index ae20d43..a21f98c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -576,6 +576,20 @@ public class Configuration { properties.setProperty(CLIENT_SECURITY_KEY, type.toString()); } + public void setLdap(String host, String userClass, String userNameAttr, String groupClass, String groupName, String groupMember, + String baseDN, boolean anon, String managerDN, String managerPass) { +properties.setProperty(LDAP_PRIMARY_URL_KEY, host); +properties.setProperty(LDAP_USER_OBJECT_CLASS_KEY, userClass); +properties.setProperty(LDAP_USERNAME_ATTRIBUTE_KEY, userNameAttr); +properties.setProperty(LDAP_GROUP_OBJECT_CLASS_KEY, groupClass); +properties.setProperty(LDAP_GROUP_NAMING_ATTR_KEY, groupName); +properties.setProperty(LDAP_GROUP_MEMEBERSHIP_ATTR_KEY, groupMember); +properties.setProperty(LDAP_BASE_DN_KEY, baseDN); +properties.setProperty(LDAP_BIND_ANONYMOUSLY_KEY, String.valueOf(anon)); +properties.setProperty(LDAP_MANAGER_DN_KEY, managerDN); +properties.setProperty(LDAP_MANAGER_PASSWORD_KEY, managerPass); + } + public String getWebAppDir() { LOG.info(Web App DIR test + properties.getProperty(WEBAPP_DIR)); return properties.getProperty(WEBAPP_DIR, web); http://git-wip-us.apache.org/repos/asf/ambari/blob/17b48bf4/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java index 1a5d933..13efd32 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java @@ -24,6 +24,7 @@ import
[25/39] git commit: AMBARI-7223. Hive cannot start on HDP-2.2.1 Stack (aonishuk)
AMBARI-7223. Hive cannot start on HDP-2.2.1 Stack (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c2a117fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c2a117fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c2a117fe Branch: refs/heads/branch-alerts-dev Commit: c2a117febcfcc388de8dcea132fcb1fe7cc5491a Parents: 923549b Author: Andrew Onishuk aonis...@hortonworks.com Authored: Tue Sep 9 20:41:44 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Tue Sep 9 20:41:44 2014 +0300 -- .../2.0.6/services/HIVE/package/scripts/hcat.py | 2 +- .../2.0.6/services/HIVE/package/scripts/hive.py | 118 ++--- .../services/HIVE/package/scripts/params.py | 9 +- .../stacks/2.0.6/HIVE/test_hive_client.py | 286 ++- .../stacks/2.0.6/HIVE/test_hive_metastore.py| 413 +++ .../stacks/2.0.6/HIVE/test_hive_server.py | 504 ++- .../stacks/2.1/HIVE/test_hive_metastore.py | 304 +-- 7 files changed, 848 insertions(+), 788 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c2a117fe/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py index d14ea66..53a62ce 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py @@ -36,7 +36,7 @@ def hcat(): ) XmlConfig(hive-site.xml, -conf_dir=params.hive_conf_dir, +conf_dir=params.hive_client_conf_dir, configurations=params.config['configurations']['hive-site'], configuration_attributes=params.config['configuration_attributes']['hive-site'], owner=params.hive_user, http://git-wip-us.apache.org/repos/asf/ambari/blob/c2a117fe/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py index 690aa76..0b7fcb4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py @@ -39,52 +39,15 @@ def hive(name=None): mode=params.hive_hdfs_user_mode ) params.HdfsDirectory(None, action=create) + + # We should change configurations for client as well as for server. + # The reason is that stale-configs are service-level, not component. + for conf_dir in params.hive_conf_dirs_list: +fill_conf_dir(conf_dir) + if name == 'metastore' or name == 'hiveserver2': jdbc_connector() - - Directory(params.hive_conf_dir, -owner=params.hive_user, -group=params.user_group, -recursive=True - ) - Directory(params.hive_server_conf_dir, -owner=params.hive_user, -group=params.user_group, -recursive=True - ) - - XmlConfig(mapred-site.xml, -conf_dir=params.hive_conf_dir, -configurations=params.config['configurations']['mapred-site'], - configuration_attributes=params.config['configuration_attributes']['mapred-site'], -owner=params.hive_user, -group=params.user_group, -mode=0644) - - XmlConfig(hive-site.xml, -conf_dir=params.hive_conf_dir, -configurations=params.config['configurations']['hive-site'], - configuration_attributes=params.config['configuration_attributes']['hive-site'], -owner=params.hive_user, -group=params.user_group, -mode=0644) - - XmlConfig(mapred-site.xml, -conf_dir=params.hive_server_conf_dir, -configurations=params.config['configurations']['mapred-site'], - configuration_attributes=params.config['configuration_attributes']['mapred-site'], -owner=params.hive_user, -group=params.user_group, -mode=0600) - - XmlConfig(hive-site.xml, -conf_dir=params.hive_server_conf_dir, -configurations=params.config['configurations']['hive-site'], - configuration_attributes=params.config['configuration_attributes']['hive-site'], -owner=params.hive_user, -
[05/39] git commit: AMBARI-7200 Views icon should highlight in the top nav when the user is on the views landing page or a particular view. (ababiichuk)
AMBARI-7200 Views icon should highlight in the top nav when the user is on the views landing page or a particular view. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4a263c6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4a263c6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4a263c6 Branch: refs/heads/branch-alerts-dev Commit: d4a263c6d1628130fee4108e193f4ec819899856 Parents: 7c8299b Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Mon Sep 8 18:11:45 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Mon Sep 8 18:11:45 2014 +0300 -- ambari-web/app/views/main/menu.js | 48 -- 1 file changed, 16 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d4a263c6/ambari-web/app/views/main/menu.js -- diff --git a/ambari-web/app/views/main/menu.js b/ambari-web/app/views/main/menu.js index eb5a901..4e4fd3f 100644 --- a/ambari-web/app/views/main/menu.js +++ b/ambari-web/app/views/main/menu.js @@ -34,9 +34,7 @@ App.MainMenuView = Em.CollectionView.extend({ var result = []; if (App.router.get('loggedIn')) { - if (App.router.get('clusterController.isLoaded')) { - -if (App.get('clusterName')) { + if (App.router.get('clusterController.isLoaded') App.get('clusterName')) { result.push( { label:Em.I18n.t('menu.item.dashboard'), routing:'dashboard', active:'active'}, @@ -55,8 +53,6 @@ App.MainMenuView = Em.CollectionView.extend({ if (App.get('isAdmin')) { result.push({ label:Em.I18n.t('menu.item.admin'), routing:'admin'}); } - -} } if (App.get('supports.views')) { @@ -68,35 +64,23 @@ App.MainMenuView = Em.CollectionView.extend({ }.property('App.router.loggedIn', 'App.router.clusterController.isLoaded', 'App.supports.views', 'App.supports.mirroring', 'App.supports.secureCluster', 'App.supports.highAvailability', 'views.length'), -/** - *Adds observer on lastSetURL and calls navigation sync procedure - */ - didInsertElement:function () { -this.renderOnRoute(); - }, - - /** - *Syncs navigation menu with requested URL - */ - renderOnRoute: function () { -if (App.get('clusterName') App.router.get('clusterController.isLoaded')) { - var last_url = App.router.location.lastSetURL || location.href.replace(/^[^#]*#/, ''); - if (last_url.substr(1, 4) !== 'main' || !this._childViews) { -return; - } - var reg = /^\/main\/([a-z]+)/g; - var sub_url = reg.exec(last_url); - var chunk = (null != sub_url) ? sub_url[1] : 'dashboard'; - $.each(this._childViews, function () { -this.set('active', this.get('content.routing') == chunk ? active : ); - }); -} - }.observes('App.router.location.lastSetURL', 'App.router.clusterController.isLoaded'), - itemViewClass:Em.View.extend({ -classNameBindings:['active', ':top-nav-dropdown'], -active:'', +classNameBindings: ['active', ':top-nav-dropdown'], + +active: function () { + if (App.get('clusterName') App.router.get('clusterController.isLoaded')) { +var last_url = App.router.location.lastSetURL || location.href.replace(/^[^#]*#/, ''); +if (last_url.substr(1, 4) !== 'main' || !this._childViews) { + return; +} +var reg = /^\/main\/([a-z]+)/g; +var sub_url = reg.exec(last_url); +var chunk = (null != sub_url) ? sub_url[1] : 'dashboard'; +return this.get('content.routing').indexOf(chunk) === 0 ? active : ; + } + return ; +}.property('App.router.location.lastSetURL', 'App.router.clusterController.isLoaded'), alertsCount:function () { if (this.get('content').routing == 'hosts') {
[24/39] AMBARI-7223. Hive cannot start on HDP-2.2.1 Stack (aonishuk)
http://git-wip-us.apache.org/repos/asf/ambari/blob/c2a117fe/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py -- diff --git a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py index dff7c32..77909a7 100644 --- a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py +++ b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py @@ -104,195 +104,209 @@ class TestHiveMetastore(RMFTestCase): self.assertNoMoreResources() def assert_configure_default(self): -self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/AMBARI-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar /usr/lib/hive/lib//mysql-connector-java.jar', - creates = '/usr/lib/hive/lib//mysql-connector-java.jar', - path = ['/bin', '/usr/bin/'], - not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar', -) -self.assertResourceCalled('Directory', '/etc/hive/conf', - owner = 'hive', - group = 'hadoop', - recursive = True, -) self.assertResourceCalled('Directory', '/etc/hive/conf.server', - owner = 'hive', - group = 'hadoop', - recursive = True, +owner = 'hive', +group = 'hadoop', +recursive = True, ) self.assertResourceCalled('XmlConfig', 'mapred-site.xml', - owner='hive', - group='hadoop', - mode=0644, - conf_dir='/etc/hive/conf', - configurations=self.getConfig()['configurations']['mapred-site'], - configuration_attributes=self.getConfig()['configuration_attributes']['mapred-site'] +group = 'hadoop', +conf_dir = '/etc/hive/conf.server', +mode = 0644, +configuration_attributes = self.getConfig()['configuration_attributes']['mapred-site'], +owner = 'hive', +configurations = self.getConfig()['configurations']['mapred-site'], ) self.assertResourceCalled('XmlConfig', 'hive-site.xml', - owner = 'hive', - group = 'hadoop', - mode = 0644, - conf_dir = '/etc/hive/conf', - configurations = self.getConfig()['configurations']['hive-site'], - configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'] +group = 'hadoop', +conf_dir = '/etc/hive/conf.server', +mode = 0644, +configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'], +owner = 'hive', +configurations = self.getConfig()['configurations']['hive-site'], +) +self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh', +content = InlineTemplate(self.getConfig()['configurations']['hive-env']['content']), +owner = 'hive', +group = 'hadoop', +) +self.assertResourceCalled('File', '/etc/hive/conf.server/hive-default.xml.template', +owner = 'hive', +group = 'hadoop', +) +self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh.template', +owner = 'hive', +group = 'hadoop', +) +self.assertResourceCalled('Directory', '/etc/hive/conf', +owner = 'hive', +group = 'hadoop', +recursive = True, ) self.assertResourceCalled('XmlConfig', 'mapred-site.xml', - owner = 'hive', - group = 'hadoop', - mode = 0600, - conf_dir = '/etc/hive/conf.server', - configurations = self.getConfig()['configurations']['mapred-site'], - configuration_attributes = self.getConfig()['configuration_attributes']['mapred-site'] +group = 'hadoop', +conf_dir = '/etc/hive/conf', +mode = 0644, +configuration_attributes = self.getConfig()['configuration_attributes']['mapred-site'], +owner = 'hive', +configurations = self.getConfig()['configurations']['mapred-site'], ) self.assertResourceCalled('XmlConfig', 'hive-site.xml', - owner = 'hive', - group = 'hadoop', - mode = 0600, - conf_dir = '/etc/hive/conf.server', - configurations = self.getConfig()['configurations']['hive-site'], - configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'] -) -self.assertResourceCalled('Execute', /bin/sh -c 'cd /usr/lib/ambari-agent/ curl -kf -x \\ --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar', - not_if = '[ -f DBConnectionVerification.jar]', - environment = {'no_proxy': 'c6401.ambari.apache.org'}, +group = 'hadoop', +conf_dir = '/etc/hive/conf', +mode = 0644, +configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'], +owner = 'hive', +configurations = self.getConfig()['configurations']['hive-site'], ) self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
[01/39] git commit: AMBARI-7193. Fix UI Unit tests. (onechiporenko)
Repository: ambari Updated Branches: refs/heads/branch-alerts-dev 1f1059cff - 05da121a5 AMBARI-7193. Fix UI Unit tests. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bca3d366 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bca3d366 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bca3d366 Branch: refs/heads/branch-alerts-dev Commit: bca3d366fd70781a0b0e377edcd5ac1b2ff28d61 Parents: 42a07f9 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Mon Sep 8 13:11:03 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Mon Sep 8 13:11:03 2014 +0300 -- .../main/admin/security/add/step1_test.js | 69 +++-- .../main/admin/security/add/step4_test.js | 307 +++ 2 files changed, 214 insertions(+), 162 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bca3d366/ambari-web/test/controllers/main/admin/security/add/step1_test.js -- diff --git a/ambari-web/test/controllers/main/admin/security/add/step1_test.js b/ambari-web/test/controllers/main/admin/security/add/step1_test.js index 56af0a0..5f836ae 100644 --- a/ambari-web/test/controllers/main/admin/security/add/step1_test.js +++ b/ambari-web/test/controllers/main/admin/security/add/step1_test.js @@ -21,39 +21,52 @@ var App = require('app'); require('controllers/main/admin/security/add/step1'); require('models/service'); - +var controller; describe('App.MainAdminSecurityAddStep1Controller', function () { - var controller = App.MainAdminSecurityAddStep1Controller.create({ -content: {} + beforeEach(function () { +controller = App.MainAdminSecurityAddStep1Controller.create({ + content: {} +}); }); - describe('#shouldRemoveATS()', function() { -it('content.services is empty', function() { - controller.set('content.services', []); - expect(controller.shouldRemoveATS()).to.be.false; -}); -it('content.services does not contain YARN', function() { - controller.set('content.services', [{serviceName: 'HDFS'}]); - expect(controller.shouldRemoveATS()).to.be.false; -}); -it('YARN does not have ATS', function() { - sinon.stub(App.Service, 'find', function(){ -return Em.Object.create({hostComponents: []}) - }); - controller.set('content.services', [{serviceName: 'YARN'}]); - expect(controller.shouldRemoveATS()).to.be.false; - App.Service.find.restore(); -}); -it('YARN has ATS', function() { - sinon.stub(App.Service, 'find', function(){ -return Em.Object.create({hostComponents: [{ - componentName: 'APP_TIMELINE_SERVER' -}]}) + describe('#shouldRemoveATS()', function () { + +var tests = Em.A([ + { +doesATSSupportKerberos: true, +isATSInstalled: true, +e: false + }, + { +doesATSSupportKerberos: true, +isATSInstalled: false, +e: false + }, + { +doesATSSupportKerberos: false, +isATSInstalled: true, +e: true + }, + { +doesATSSupportKerberos: false, +isATSInstalled: false, +e: false + } +]); + +tests.forEach(function (test) { + it('', function () { +controller.set('content.isATSInstalled', test.isATSInstalled); +sinon.stub(App, 'get', function (k) { + if ('doesATSSupportKerberos' === k) return test.doesATSSupportKerberos; + return Em.get(App, k); +}); +var result = controller.shouldRemoveATS(); +App.get.restore(); +expect(result).to.equal(test.e); }); - controller.set('content.services', [{serviceName: 'YARN'}]); - expect(controller.shouldRemoveATS()).to.be.true; - App.Service.find.restore(); }); + }); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/bca3d366/ambari-web/test/controllers/main/admin/security/add/step4_test.js -- diff --git a/ambari-web/test/controllers/main/admin/security/add/step4_test.js b/ambari-web/test/controllers/main/admin/security/add/step4_test.js index 302b2cd..6cd6d71 100644 --- a/ambari-web/test/controllers/main/admin/security/add/step4_test.js +++ b/ambari-web/test/controllers/main/admin/security/add/step4_test.js @@ -25,26 +25,31 @@ require('utils/polling'); require('models/cluster_states'); require('models/service'); +var controller; + describe('App.MainAdminSecurityAddStep4Controller', function () { - var controller = App.MainAdminSecurityAddStep4Controller.create({ -content: {}, -enableSubmit: function () { - this._super() -}, -secureMapping: [], -secureProperties: [], -
[18/39] git commit: AMBARI-7217. Ambari does not update ha.zookeeper.quorum property in core-site.xml file even if there are more than 3 ZooKeeper servers configured via Ambari.. (onechiporenko)
AMBARI-7217. Ambari does not update ha.zookeeper.quorum property in core-site.xml file even if there are more than 3 ZooKeeper servers configured via Ambari.. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/daae69eb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/daae69eb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/daae69eb Branch: refs/heads/branch-alerts-dev Commit: daae69ebac0ac72a71cf9c8b7d744aaea5aa6d56 Parents: 0e3fd88 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Tue Sep 9 16:03:54 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Tue Sep 9 16:03:54 2014 +0300 -- ambari-web/app/controllers/main/host/details.js | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/daae69eb/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 911e5c2..a9b7d76 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -564,7 +564,11 @@ App.MainHostDetailsController = Em.Controller.extend({ checkZkConfigs: function () { var bg = App.router.get('backgroundOperationsController.services').findProperty('id', this.get('zkRequestId')); if (bg !bg.get('isRunning')) { - this.loadConfigs(); + var self = this; + this.removeObserver('App.router.backgroundOperationsController.serviceTimestamp', this, this.checkZkConfigs); + setTimeout(function () { +self.loadConfigs(); + }, App.get('componentsUpdateInterval')); } }, @@ -573,7 +577,6 @@ App.MainHostDetailsController = Em.Controller.extend({ * @method loadConfigs */ loadConfigs: function () { - this.removeObserver('App.router.backgroundOperationsController.serviceTimestamp', this, this.checkZkConfigs); App.ajax.send({ name: 'config.tags', sender: this,
[13/39] git commit: AMBARI-7210. BE: Stack advisor scripts should report python errors in API
AMBARI-7210. BE: Stack advisor scripts should report python errors in API Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d49c1964 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d49c1964 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d49c1964 Branch: refs/heads/branch-alerts-dev Commit: d49c19645d9ef134491b0c225a9235def1a5ac99 Parents: 32cb4c5 Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Mon Sep 8 13:01:59 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Mon Sep 8 13:20:04 2014 -0700 -- .../stackadvisor/StackAdvisorHelper.java| 6 +-- .../StackAdvisorRequestException.java | 27 .../stackadvisor/StackAdvisorRunner.java| 34 +++ .../commands/StackAdvisorCommand.java | 14 +++ .../RecommendationResourceProvider.java | 9 +++- .../internal/ValidationResourceProvider.java| 9 +++- .../src/main/resources/scripts/stack_advisor.py | 8 +++- .../stackadvisor/StackAdvisorRunnerTest.java| 44 +--- .../commands/StackAdvisorCommandTest.java | 29 ++--- 9 files changed, 124 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d49c1964/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 60cdd52..9e683f0 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 @@ -59,7 +59,7 @@ public class StackAdvisorHelper { * Returns validation (component-layout or configurations) result for the * request. * - * @param validationRequest the validation request + * @param request the validation request * @return {@link ValidationResponse} instance * @throws StackAdvisorException in case of stack advisor script errors */ @@ -83,7 +83,7 @@ public class StackAdvisorHelper { command = new GetConfigurationValidationCommand(recommendationsDir, stackAdvisorScript, requestId, saRunner, metaInfo); } else { - throw new StackAdvisorException(String.format(Unsupported request type, type=%s, + throw new StackAdvisorRequestException(String.format(Unsupported request type, type=%s, requestType)); } @@ -118,7 +118,7 @@ public class StackAdvisorHelper { command = new GetConfigurationRecommnedationCommand(recommendationsDir, stackAdvisorScript, requestId, saRunner, metaInfo); } else { - throw new StackAdvisorException(String.format(Unsupported request type, type=%s, + throw new StackAdvisorRequestException(String.format(Unsupported request type, type=%s, requestType)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/d49c1964/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequestException.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequestException.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequestException.java new file mode 100644 index 000..93e6d7b --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequestException.java @@ -0,0 +1,27 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.api.services.stackadvisor; + +@SuppressWarnings(serial) +public class StackAdvisorRequestException extends
[36/39] git commit: AMBARI-7236. UI changes for rename host group deletes configs. (akovalenko)
AMBARI-7236. UI changes for rename host group deletes configs. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d3bfd49d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d3bfd49d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d3bfd49d Branch: refs/heads/branch-alerts-dev Commit: d3bfd49d4c8e15cadce01e9c7abdc33a5fe8f4bc Parents: 22b1df0 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Wed Sep 10 13:28:04 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Wed Sep 10 13:28:04 2014 +0300 -- .../main/service/manage_config_groups_controller.js | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bfd49d/ambari-web/app/controllers/main/service/manage_config_groups_controller.js -- diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js index 53a11d7..76b7005 100644 --- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js +++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js @@ -484,27 +484,30 @@ App.ManageConfigGroupsController = Em.Controller.extend({ var groupsToCreate = []; var groups = this.get('configGroups'); var originalGroups = this.get('originalConfigGroups'); -var originalGroupsNames = originalGroups.mapProperty('name').without(originalGroups.findProperty('isDefault').get('name')); +// remove default group +originalGroups = originalGroups.without(originalGroups.findProperty('isDefault')); +var originalGroupsIds = originalGroups.mapProperty('id'); groups.forEach(function (group) { if (!group.get('isDefault')) { -var originalGroup = originalGroups.findProperty('name', group.get('name')); +var originalGroup = originalGroups.findProperty('id', group.get('id')); if (originalGroup) { if (!(JSON.stringify(group.get('hosts').slice().sort()) === JSON.stringify(originalGroup.get('hosts').sort( { groupsToClearHosts.push(group.set('id', originalGroup.get('id'))); if (group.get('hosts').length) { groupsToSetHosts.push(group.set('id', originalGroup.get('id'))); } - } else if (group.get('description') !== originalGroup.get('description')) { + // should update name or description + } else if (group.get('description') !== originalGroup.get('description') || group.get('name') !== originalGroup.get('name') ) { groupsToSetHosts.push(group.set('id', originalGroup.get('id'))); } - originalGroupsNames = originalGroupsNames.without(group.get('name')); + originalGroupsIds = originalGroupsIds.without(group.get('id')); } else { groupsToCreate.push(group); } } }); -originalGroupsNames.forEach(function (groupName) { - groupsToDelete.push(originalGroups.findProperty('name', groupName)); +originalGroupsIds.forEach(function (id) { + groupsToDelete.push(originalGroups.findProperty('id', id)); }, this); return { toClearHosts: groupsToClearHosts,
[20/39] git commit: AMBARI-7219. Slider View: FE - view appears squished inhibiting operation (alexantonenko)
AMBARI-7219. Slider View: FE - view appears squished inhibiting operation (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f287ce3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f287ce3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f287ce3 Branch: refs/heads/branch-alerts-dev Commit: 8f287ce38d9a692b25119efebb5a95a0c76595f2 Parents: 9ce44c9 Author: Alex Antonenko hiv...@gmail.com Authored: Tue Sep 9 16:20:01 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Tue Sep 9 16:25:40 2014 +0300 -- ambari-web/app/assets/licenses/NOTICE.txt | 4 +- ambari-web/app/styles/application.less | 1 + ambari-web/app/views/main/views/details.js | 28 --- .../jquery.iframe-auto-height.plugin.1.9.5.js | 224 --- 4 files changed, 2 insertions(+), 255 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8f287ce3/ambari-web/app/assets/licenses/NOTICE.txt -- diff --git a/ambari-web/app/assets/licenses/NOTICE.txt b/ambari-web/app/assets/licenses/NOTICE.txt index 82231f0..d535f1f 100644 --- a/ambari-web/app/assets/licenses/NOTICE.txt +++ b/ambari-web/app/assets/licenses/NOTICE.txt @@ -10,7 +10,7 @@ This product includes Ember.js (http://emberjs.com - https://github.com/emberjs/ Copyright (c) 2011, Yehuda Katz, Tom Dale, Charles Jolley and Ember.js contributors This product was generated using Brunch (https://github.com/brunch/brunch/blob/master/LICENSE) -Copyright (c) 2011, Allan Berger, Jan Monschke, Martin Schürrer, Thomas Schranz, Nik Graf, Paul Miller +Copyright (c) 2011, Allan Berger, Jan Monschke, Martin Sch\u00FCrrer, Thomas Schranz, Nik Graf, Paul Miller This product includes Twitter Bootstrap 2 (http://twitter.github.com/bootstrap/ - Apache License v2.0.) @@ -43,5 +43,3 @@ This product includes Spin.js (http://fgnass.github.com/spin.js/ - MIT license) Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de] This product includes Moment.js (https://github.com/moment/moment/ - MIT license) - -This product includes iframeAutoHeight.js (http://github.com/house9/jquery-iframe-auto-height - MIT license) http://git-wip-us.apache.org/repos/asf/ambari/blob/8f287ce3/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 1a63440..eb33e6d 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -6859,6 +6859,7 @@ i.icon-asterisks { } .views_sizes { width:100%; + min-height:600px; border: 0; } http://git-wip-us.apache.org/repos/asf/ambari/blob/8f287ce3/ambari-web/app/views/main/views/details.js -- diff --git a/ambari-web/app/views/main/views/details.js b/ambari-web/app/views/main/views/details.js index 93c80f9..98184ef 100644 --- a/ambari-web/app/views/main/views/details.js +++ b/ambari-web/app/views/main/views/details.js @@ -27,34 +27,6 @@ App.MainViewsDetailsView = Em.View.extend({ attributeBindings: ['src','seamless'], seamless: seamless, - interval: null, - - /** - * Drop autoHeight timer - */ - willDestroyElement: function() { -var interval = this.get('interval'); -if (interval) { - clearInterval(interval); -} - }, - - /** - * For view's iframe do autoHeight with timer - * Timer is dropped when user navigates away - */ - didInsertElement: function() { -var interval, - self = this, - timer = function (resizeFunction, iframe) { -interval = setInterval(function() { - resizeFunction(iframe); -}, 100); -self.set('interval', interval); -}; -$('iframe').iframeAutoHeight({triggerFunctions: [timer]}); - }, - src: function() { return window.location.origin + this.get('controller.content.href'); }.property('controller.content') http://git-wip-us.apache.org/repos/asf/ambari/blob/8f287ce3/ambari-web/vendor/scripts/jquery.iframe-auto-height.plugin.1.9.5.js -- diff --git a/ambari-web/vendor/scripts/jquery.iframe-auto-height.plugin.1.9.5.js b/ambari-web/vendor/scripts/jquery.iframe-auto-height.plugin.1.9.5.js deleted file mode 100644 index 2c8c2d8..000 --- a/ambari-web/vendor/scripts/jquery.iframe-auto-height.plugin.1.9.5.js +++ /dev/null @@ -1,224 +0,0 @@ -/*jslint white: true, indent: 2, onevar: false, browser: true, undef: true, nomen: false, eqeqeq: true, plusplus: false, bitwise: true, regexp: true, strict: false, newcap: true, immed: true */ -/*global window, console,
[29/39] git commit: AMBARI-7226. Ambari Web performance issues when there are a large number of users. (yusaku)
AMBARI-7226. Ambari Web performance issues when there are a large number of users. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4f62 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4f62 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4f62 Branch: refs/heads/branch-alerts-dev Commit: 4f62a247e81dbe80dc484891effe28e418fa Parents: 17b48bf Author: Yusaku Sako yus...@hortonworks.com Authored: Tue Sep 9 15:24:26 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Tue Sep 9 15:35:56 2014 -0700 -- .../controllers/global/cluster_controller.js| 42 1 file changed, 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4f62/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 96df319..f40fbc8 100644 --- a/ambari-web/app/controllers/global/cluster_controller.js +++ b/ambari-web/app/controllers/global/cluster_controller.js @@ -78,7 +78,6 @@ App.ClusterController = Em.Controller.extend({ 'cluster': false, 'clusterStatus': false, 'racks': false, -'users': false, 'componentConfigs': false, 'componentsState': false }), @@ -291,8 +290,6 @@ App.ClusterController = Em.Controller.extend({ }); } -this.loadUsersInfo(); - /** * Order of loading: * 1. request for service components supported by stack @@ -386,45 +383,6 @@ App.ClusterController = Em.Controller.extend({ console.warn('can\'t get ambari properties'); }, - /** - * Load info about users. - **/ - loadUsersInfo: function() { -return App.ajax.send({ - name: 'users.all', - sender: this, - success: 'loadUsersSuccess', - error: 'loadUsersError' -}); - }, - - loadUsersSuccess: function(data) { -App.ajax.send({ - name: 'users.privileges', - sender: this, - data: { -users: data - }, - success: 'loadUsersPrivilegesSuccess' -}); - }, - - loadUsersError: function() { -this.updateLoadStatus('users'); - }, - /** - * Load privileges, check relations between user and privilege, - * map users using codeApp.usersMappper/code. - **/ - loadUsersPrivilegesSuccess: function(data, opt, params) { -params.users.items.forEach(function(user) { - user.privileges = {}; - user.privileges.items = data.items.filterProperty('PrivilegeInfo.principal_name', user.Users.user_name); -}); -App.usersMapper.map(params.users); -this.updateLoadStatus('users'); - }, - updateClusterData: function () { var testUrl = App.get('isHadoop2Stack') ? '/data/clusters/HDP2/cluster.json' : '/data/clusters/cluster.json'; var clusterUrl = this.getUrl(testUrl, '?fields=Clusters');
[15/39] git commit: AMBARI-7213. Fix ui unit tests for app.js. (jaimin)
AMBARI-7213. Fix ui unit tests for app.js. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/221c5a13 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/221c5a13 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/221c5a13 Branch: refs/heads/branch-alerts-dev Commit: 221c5a13f29d4bdf3df463a968f34b4b45a39203 Parents: aed6578 Author: Jaimin Jetly jai...@hortonworks.com Authored: Mon Sep 8 18:23:25 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Mon Sep 8 18:23:31 2014 -0700 -- ambari-web/app/app.js | 2 +- ambari-web/test/app_test.js | 39 +++- .../test/controllers/main/host/details_test.js | 9 - 3 files changed, 47 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/221c5a13/ambari-web/app/app.js -- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index aa1281a..a690e82 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -88,7 +88,7 @@ module.exports = Em.Application.create({ isHaEnabled: function () { if (!this.get('isHadoop2Stack')) return false; var isHDFSInstalled = App.Service.find().findProperty('serviceName','HDFS'); -return isHDFSInstalled !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE'); +return !!isHDFSInstalled !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE'); }.property('router.clusterController.isLoaded', 'isHadoop2Stack'), /** http://git-wip-us.apache.org/repos/asf/ambari/blob/221c5a13/ambari-web/test/app_test.js -- diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js index 749b245..a8f5151 100644 --- a/ambari-web/test/app_test.js +++ b/ambari-web/test/app_test.js @@ -199,7 +199,20 @@ describe('App', function () { }); }); - describe('#isHaEnabled', function () { + describe('#isHaEnabled when HDFS is installed:', function () { + +beforeEach(function () { + sinon.stub(App.Service, 'find', function () { +return [{ + id : 'HDFS', + serviceName: 'HDFS' +}]; + }); +}); + +afterEach(function () { + App.Service.find.restore(); +}); it('if hadoop stack version less than 2 then isHaEnabled should be false', function () { App.set('currentStackVersion', 'HDP-1.3.1'); @@ -222,6 +235,30 @@ describe('App', function () { }); }); + describe('#isHaEnabled when HDFS is not installed:', function () { + +beforeEach(function () { + sinon.stub(App.Service, 'find', function () { +return [{ + id : 'ZOOKEEPER', + serviceName: 'ZOOKEEPER' +}]; + }); +}); + +afterEach(function () { + App.Service.find.restore(); +}); + +it('if hadoop stack version higher than 2 but HDFS not installed then isHaEnabled should be false', function () { + App.set('currentStackVersion', 'HDP-2.1'); + expect(App.get('isHaEnabled')).to.equal(false); + App.set('currentStackVersion', HDP-1.2.2); +}); + + }); + + describe('#services', function () { var stackServices = [ Em.Object.create({ http://git-wip-us.apache.org/repos/asf/ambari/blob/221c5a13/ambari-web/test/controllers/main/host/details_test.js -- diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js index bd5ad09..bc4159a 100644 --- a/ambari-web/test/controllers/main/host/details_test.js +++ b/ambari-web/test/controllers/main/host/details_test.js @@ -429,6 +429,10 @@ describe('App.MainHostDetailsController', function () { expect(controller.constructConfigUrlParams(data)).to.eql([]); }); it('isHaEnabled = true', function () { + App.store.load(App.Service, { +id: 'HDFS', +service_name: 'HDFS' + }); var data = {Clusters: {desired_configs: {'core-site': {tag: 1; App.HostComponent.find().clear(); App.set('currentStackVersion', 'HDP-2.0.2'); @@ -540,7 +544,6 @@ describe('App.MainHostDetailsController', function () { }); describe('#setZKConfigs()', function () { - it('configs is null', function () { expect(controller.setZKConfigs(null)).to.be.false; }); @@ -550,6 +553,10 @@ describe('App.MainHostDetailsController', function () { it('isHaEnabled = true', function () { var configs = {'core-site': {}}; App.HostComponent.find().clear(); + App.store.load(App.Service, { +id: 'HDFS', +service_name: 'HDFS' + });
[27/39] AMBARI-7230. LDAP Sync Scale issues for thousands of users/100's of groups. (mahadev)
http://git-wip-us.apache.org/repos/asf/ambari/blob/17b48bf4/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapUserGroupMemberDto.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapUserGroupMemberDto.java b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapUserGroupMemberDto.java new file mode 100644 index 000..319b831 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapUserGroupMemberDto.java @@ -0,0 +1,82 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.security.ldap; + +/** + * Pojo with information about LDAP membership. + */ +public class LdapUserGroupMemberDto { + /** + * Name of the group. + */ + private final String groupName; + + /** + * Name of the user. + */ + private final String userName; + + /** + * Constructor. + * + * @param groupName group name + * @param userName user name + */ + public LdapUserGroupMemberDto(String groupName, String userName) { +this.groupName = groupName; +this.userName = userName; + } + + /** + * Get the group name. + * + * @return the group name + */ + public String getGroupName() { +return groupName; + } + + /** + * Get the user name. + * + * @return the user name + */ + public String getUserName() { +return userName; + } + + @Override + public boolean equals(Object o) { +if (this == o) return true; +if (o == null || getClass() != o.getClass()) return false; + +LdapUserGroupMemberDto that = (LdapUserGroupMemberDto) o; + +if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false; +if (groupName != null ? !groupName.equals(that.groupName) : that.groupName != null) return false; + +return true; + } + + @Override + public int hashCode() { +int result = userName != null ? userName.hashCode() : 0; +result = 31 * result + (groupName != null ? groupName.hashCode() : 0); +return result; + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/17b48bf4/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 81b79d1..35ba17b 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -2940,11 +2940,11 @@ def setup_ldap(): LDAP_PRIMARY_URL_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[0]) LDAP_SECONDARY_URL_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[1]) LDAP_USE_SSL_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[2], false) - LDAP_USER_CLASS_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[3], person) + LDAP_USER_CLASS_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[3], posixAccount) LDAP_USER_ATT_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[4], uid) - LDAP_GROUP_CLASS_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[5], groupOfUniqueNames) + LDAP_GROUP_CLASS_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[5], posixGroup) LDAP_GROUP_ATT_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[6], cn) - LDAP_GROUP_MEMBER_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[7], uniqueMember) + LDAP_GROUP_MEMBER_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[7], memberUid) LDAP_BASE_DN_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[8]) LDAP_BIND_DEFAULT = get_value_from_properties(properties, ldap_property_list_reqd[9], false) LDAP_MGR_DN_DEFAULT = get_value_from_properties(properties, ldap_property_list_opt[0]) http://git-wip-us.apache.org/repos/asf/ambari/blob/17b48bf4/ambari-server/src/main/resources/META-INF/persistence.xml -- diff
[11/39] git commit: AMBARI-7208. Adding HDFS service to a cluster does not create SNameNode host component. (jaimin)
AMBARI-7208. Adding HDFS service to a cluster does not create SNameNode 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/c0f9fdec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c0f9fdec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c0f9fdec Branch: refs/heads/branch-alerts-dev Commit: c0f9fdeccc32c87d241e4b611caf39b2d9f88cb8 Parents: 74de327 Author: Jaimin Jetly jai...@hortonworks.com Authored: Mon Sep 8 12:25:40 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Mon Sep 8 12:25:47 2014 -0700 -- ambari-web/app/app.js | 3 ++- ambari-web/app/controllers/wizard/step8_controller.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9fdec/ambari-web/app/app.js -- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index 2b0e850..aa1281a 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -87,7 +87,8 @@ module.exports = Em.Application.create({ */ isHaEnabled: function () { if (!this.get('isHadoop2Stack')) return false; -return !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE'); +var isHDFSInstalled = App.Service.find().findProperty('serviceName','HDFS'); +return isHDFSInstalled !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE'); }.property('router.clusterController.isLoaded', 'isHadoop2Stack'), /** http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9fdec/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 2d511c2..04cb728 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -648,7 +648,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, { // skip components that was hide on assign master page if (component.get('isMaster') !component.get('isShownOnInstallerAssignMasterPage')) return; // no HA component -if (App.get('isHaEnabled') component.get('isHAComponentOnly')) return; +if (component.get('isHAComponentOnly')) return; var displayName; if (component.get('isClient')) { displayName = Em.I18n.t('common.clients') @@ -693,9 +693,9 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, { } else { console.log(' --- ---INFO: step8: NOT component isMaster'); +var componentName = component.get('isClient') ? Em.I18n.t('common.client').toUpperCase() : component.get('componentName'); var hostsLength = this.get('content.slaveComponentHosts') - .findProperty('componentName', component.get('isClient') ? Em.I18n.t('common.client').toUpperCase() : component.get('componentName')) - .hosts.length; + .findProperty('componentName', componentName).hosts.length; componentValue = hostsLength + Em.I18n.t('installer.step8.host' + ((hostsLength 1) ? 's' : '')); } }
[38/39] git commit: AMBARI-7221 - Ambari Server REST API Memory Leak (jonathanhurley)
AMBARI-7221 - Ambari Server REST API Memory Leak (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/813f16c0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/813f16c0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/813f16c0 Branch: refs/heads/branch-alerts-dev Commit: 813f16c0c731d6f6a35d8462d16194a3abac9f98 Parents: c91fab7 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Sep 9 21:30:46 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Sep 10 09:01:51 2014 -0400 -- ambari-server/conf/unix/ambari.properties | 3 ++ .../server/configuration/Configuration.java | 44 ++-- .../ambari/server/controller/AmbariServer.java | 22 +++--- 3 files changed, 52 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/813f16c0/ambari-server/conf/unix/ambari.properties -- diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index b77ae32..a0557b7 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -52,3 +52,6 @@ agent.threadpool.size.max=25 # linux open-file limit ulimit.open.files=1 + +# Server HTTP settings +server.http.session.inactive_timeout=60 http://git-wip-us.apache.org/repos/asf/ambari/blob/813f16c0/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index a21f98c..2839c2c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -260,12 +260,11 @@ public class Configuration { private static final String RESOURCES_DIR_DEFAULT = /var/lib/ambari-server/resources/; private static final String ANONYMOUS_AUDIT_NAME_KEY = anonymous.audit.name; - private static final String CLIENT_SECURITY_DEFAULT = local; + private static final int CLIENT_API_PORT_DEFAULT = 8080; private static final int CLIENT_API_SSL_PORT_DEFAULT = 8443; - private static final String USER_ROLE_NAME_DEFAULT = user; - private static final String ADMIN_ROLE_NAME_DEFAULT = admin; private static final String LDAP_BIND_ANONYMOUSLY_DEFAULT = true; + //TODO For embedded server only - should be removed later private static final String LDAP_PRIMARY_URL_DEFAULT = localhost:33389; private static final String LDAP_BASE_DN_DEFAULT = dc=ambari,dc=apache,dc=org; @@ -309,6 +308,8 @@ public class Configuration { private static final String VIEW_EXTRACTION_THREADPOOL_TIMEOUT_KEY = view.extraction.threadpool.timeout; private static final long VIEW_EXTRACTION_THREADPOOL_TIMEOUT_DEFAULT = 10L; + private static final String SERVER_HTTP_SESSION_INACTIVE_TIMEOUT = server.http.session.inactive_timeout; + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); private Properties properties; @@ -401,7 +402,7 @@ public class Configuration { } configsMap.put(SRVR_CRT_PASS_KEY, password); -if (this.getApiSSLAuthentication()) { +if (getApiSSLAuthentication()) { LOG.info(API SSL Authentication is turned on.); File httpsPassFile = new File(configsMap.get(CLIENT_API_SSL_KSTR_DIR_NAME_KEY) + File.separator + configsMap.get(CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY)); @@ -464,14 +465,14 @@ public class Configuration { private synchronized void loadCredentialProvider() { if (!credentialProviderInitialized) { try { -this.credentialProvider = new CredentialProvider(null, +credentialProvider = new CredentialProvider(null, getMasterKeyLocation(), isMasterKeyPersisted()); } catch (Exception e) { LOG.info(Credential provider creation failed. Reason: + e.getMessage()); if (LOG.isDebugEnabled()) { e.printStackTrace(); } -this.credentialProvider = null; +credentialProvider = null; } credentialProviderInitialized = true; } @@ -487,8 +488,9 @@ public class Configuration { //Get property file stream from classpath InputStream inputStream = Configuration.class.getClassLoader().getResourceAsStream(CONFIG_FILE); -if (inputStream == null) +if (inputStream == null) { throw new RuntimeException(CONFIG_FILE + not found in classpath); +} // load the properties try { @@
[12/39] git commit: AMBARI-7190 - Views: attempting to access views during extraction throws exception
AMBARI-7190 - Views: attempting to access views during extraction throws exception Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32cb4c54 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32cb4c54 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32cb4c54 Branch: refs/heads/branch-alerts-dev Commit: 32cb4c546488bb28155d101a213747a7764eb0e9 Parents: c0f9fde Author: tbeerbower tbeerbo...@hortonworks.com Authored: Mon Sep 8 12:23:41 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Mon Sep 8 16:12:31 2014 -0400 -- .../internal/PrivilegeResourceProvider.java | 6 +- .../internal/ViewInstanceResourceProvider.java | 44 -- .../ViewPermissionResourceProvider.java | 8 +- .../internal/ViewPrivilegeResourceProvider.java | 28 +++- .../internal/ViewVersionResourceProvider.java | 6 +- .../ambari/server/orm/entities/ViewEntity.java | 9 ++ .../ViewInstanceResourceProviderTest.java | 123 + .../ViewPermissionResourceProviderTest.java | 133 +++ .../ViewPrivilegeResourceProviderTest.java | 8 +- .../server/orm/entities/ViewEntityTest.java | 17 +++ 10 files changed, 355 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/32cb4c54/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java index f0bcaf8..ae9cb52 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java @@ -222,7 +222,7 @@ public abstract class PrivilegeResourceProviderT extends AbstractResourceProvi for(PrivilegeEntity privilegeEntity : entitySet){ Resource resource = toResource(privilegeEntity, userEntities, groupEntities, resourceEntities, requestedIds); -if (predicate == null || predicate.evaluate(resource)) { +if (resource != null (predicate == null || predicate.evaluate(resource))) { resources.add(resource); } } @@ -441,6 +441,10 @@ public abstract class PrivilegeResourceProviderT extends AbstractResourceProvi if (resource == null) { // request body is empty, use predicate instead resource = getResourceEntityId(predicate); + // if the predicate does not identify a single resource or the resource is not available for update + if (resource == null) { +return null; + } } final ListPrivilegeEntity currentPrivileges = privilegeDAO.findByResourceId(resource); http://git-wip-us.apache.org/repos/asf/ambari/blob/32cb4c54/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java index ce23e79..09b63a4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java @@ -145,13 +145,16 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider { String instanceName = (String) propertyMap.get(INSTANCE_NAME_PROPERTY_ID); for (ViewEntity viewDefinition : viewRegistry.getDefinitions()){ -if (viewName == null || viewName.equals(viewDefinition.getCommonName())) { - for (ViewInstanceEntity viewInstanceDefinition : viewRegistry.getInstanceDefinitions(viewDefinition)) { -if (instanceName == null || instanceName.equals(viewInstanceDefinition.getName())) { - if (viewVersion == null || viewVersion.equals(viewDefinition.getVersion())) { -if (includeInstance(viewInstanceDefinition, true)) { - Resource resource = toResource(viewInstanceDefinition, requestedIds); - resources.add(resource); +// do not report instances for views that are not loaded. +if (viewDefinition.isLoaded()){ + if (viewName == null || viewName.equals(viewDefinition.getCommonName())) { +for
[39/39] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05da121a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05da121a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05da121a Branch: refs/heads/branch-alerts-dev Commit: 05da121a58e5768d0d0eda2527bd127c7355a23a Parents: 1f1059c 813f16c Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Sep 10 09:02:43 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Sep 10 09:02:43 2014 -0400 -- .../main/resources/ui/admin-web/app/index.html | 2 + .../resources/ui/admin-web/app/scripts/app.js | 1 + .../controllers/ambariViews/ViewsEditCtrl.js| 8 + .../clusters/ClustersManageAccessCtrl.js| 8 + .../controllers/groups/GroupsEditCtrl.js| 9 + .../scripts/controllers/users/UsersShowCtrl.js | 13 + .../app/scripts/directives/editableList.js | 199 .../ui/admin-web/app/scripts/services/Group.js | 6 + .../ui/admin-web/app/scripts/services/User.js | 7 + .../resources/ui/admin-web/app/styles/main.css | 212 +++- .../admin-web/app/views/ambariViews/edit.html | 29 +- .../app/views/clusters/manageAccess.html| 31 +- .../app/views/directives/editableList.html | 44 ++ .../ui/admin-web/app/views/groups/edit.html | 23 +- .../ui/admin-web/app/views/leftNavbar.html | 8 +- .../ui/admin-web/app/views/users/show.html | 22 +- .../src/main/resources/ui/admin-web/bower.json | 3 +- .../libraries/script/script.py | 23 +- ambari-server/conf/unix/ambari.properties | 3 + .../ambari/server/api/AmbariPersistFilter.java | 1 - .../stackadvisor/StackAdvisorHelper.java| 6 +- .../StackAdvisorRequestException.java | 27 + .../stackadvisor/StackAdvisorRunner.java| 34 +- .../commands/StackAdvisorCommand.java | 14 +- .../server/configuration/Configuration.java | 58 ++- .../server/controller/AmbariHandlerList.java| 43 +- .../controller/AmbariManagementController.java | 16 +- .../AmbariManagementControllerImpl.java | 34 +- .../ambari/server/controller/AmbariServer.java | 52 +- .../server/controller/ControllerModule.java | 69 ++- .../controller/FailsafeServletResponse.java | 22 +- .../internal/ControllerResourceProvider.java| 22 +- .../internal/PrivilegeResourceProvider.java | 6 +- .../RecommendationResourceProvider.java | 9 +- .../internal/ValidationResourceProvider.java| 9 +- .../internal/ViewInstanceResourceProvider.java | 44 +- .../ViewPermissionResourceProvider.java | 8 +- .../internal/ViewPrivilegeResourceProvider.java | 28 +- .../internal/ViewVersionResourceProvider.java | 6 +- .../apache/ambari/server/orm/dao/GroupDAO.java | 30 +- .../apache/ambari/server/orm/dao/MemberDAO.java | 34 +- .../ambari/server/orm/dao/PrincipalDAO.java | 27 +- .../ambari/server/orm/dao/PrincipalTypeDAO.java | 29 +- .../apache/ambari/server/orm/dao/UserDAO.java | 49 +- .../server/orm/entities/MemberEntity.java | 7 +- .../server/orm/entities/PrincipalEntity.java| 2 +- .../ambari/server/orm/entities/UserEntity.java | 5 +- .../ambari/server/orm/entities/ViewEntity.java | 9 + .../server/orm/entities/ViewInstanceEntity.java | 89 .../ambari/server/security/SecurityFilter.java | 2 +- .../AmbariAuthorizationFilter.java | 35 +- .../authorization/AmbariLdapDataPopulator.java | 409 --- .../server/security/authorization/User.java | 2 +- .../server/security/authorization/Users.java| 158 +- .../security/ldap/AmbariLdapDataPopulator.java | 430 .../server/security/ldap/LdapBatchDto.java | 67 +++ .../server/security/ldap/LdapGroupDto.java | 113 + .../server/security/ldap/LdapSyncDto.java | 72 +++ .../server/security/ldap/LdapUserDto.java | 133 + .../security/ldap/LdapUserGroupMemberDto.java | 82 +++ .../ambari/server/state/ConfigHelper.java | 3 +- .../apache/ambari/server/view/ViewRegistry.java | 4 + ambari-server/src/main/python/ambari-server.py | 6 +- .../src/main/resources/META-INF/persistence.xml | 4 + .../src/main/resources/scripts/stack_advisor.py | 8 +- .../1.3.2/hooks/before-START/scripts/params.py | 23 +- .../HDFS/package/scripts/hdfs_client.py | 6 + .../services/HDFS/package/scripts/params.py | 16 +- .../MAPREDUCE/configuration/mapred-env.xml | 20 + .../MAPREDUCE/package/scripts/client.py | 7 + .../MAPREDUCE/package/scripts/params.py | 13 + .../HDP/1.3.2/services/SQOOP/metainfo.xml | 2 +- .../stacks/HDP/1.3.2/services/stack_advisor.py | 19 +- .../2.0.6/services/HIVE/package/scripts/hcat.py |
[14/39] git commit: Updated committer list. Reordered some nav links to make frequently accessed docs more accessible. (yusaku)
Updated committer list. Reordered some nav links to make frequently accessed docs more accessible. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aed65785 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aed65785 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aed65785 Branch: refs/heads/branch-alerts-dev Commit: aed657853eec5fea50b3f2ff196ae4e9c8002e8f Parents: d49c196 Author: Yusaku Sako yus...@hortonworks.com Authored: Mon Sep 8 18:07:24 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Mon Sep 8 18:07:24 2014 -0700 -- docs/pom.xml | 42 ++- docs/src/site/site.xml | 70 +++-- 2 files changed, 64 insertions(+), 48 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aed65785/docs/pom.xml -- diff --git a/docs/pom.xml b/docs/pom.xml index e00a46d..2a202ce 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -122,6 +122,18 @@ /organization /developer developer +idalejandro/id +nameAlejandro Fernandez/name +emailalejan...@apache.org/email +timezone-8/timezone +roles +roleCommitter/role +/roles +organization +Hortonworks +/organization +/developer +developer idaonishuk/id nameAndrew Onischuk/name emailaonis...@apache.org/email @@ -259,7 +271,7 @@ roleCommitter/role /roles organization - Redhat + Red Hat /organization /developer developer @@ -499,7 +511,7 @@ rolePMC/role /roles organization -Redhat +Red Hat /organization /developer developer @@ -589,29 +601,31 @@ /developers contributors contributor - nameScott Creeley/name - organizationRedhat/organization + nameScott Creeley/name + organizationRed Hat/organization /contributor contributor - nameMichael Harp/name - organizationTeradata/organization + nameMichael Harp/name + organizationTeradata/organization /contributor contributor - nameJanos Matyas/name - organizationSequenceIQ/organization + nameJanos Matyas/name + organizationSequenceIQ/organization /contributor contributor - nameGreg Hill/name - organizationRackspace/organization + nameGreg Hill/name + organizationRackspace/organization /contributor contributor - nameSteve Ratay/name - organizationTeradata/organization + nameSteve Ratay/name + organizationTeradata/organization + /contributor + contributor + nameJun Aoki/name + organizationPivotal/organization /contributor /contributors - - organization nameApache Software Foundation/name urlhttp://www.apache.org//url http://git-wip-us.apache.org/repos/asf/ambari/blob/aed65785/docs/src/site/site.xml -- diff --git a/docs/src/site/site.xml b/docs/src/site/site.xml index a89e70c..c66734c 100644 --- a/docs/src/site/site.xml +++ b/docs/src/site/site.xml @@ -102,42 +102,44 @@ item name=Project License href=http://www.apache.org/licenses// /menu -menu name=Releases -item name=1.6.1 href=http://www.apache.org/dyn/closer.cgi/ambari/ambari-1.6.1/ -item name=1.6.0 href=http://www.apache.org/dyn/closer.cgi/ambari/ambari-1.6.0/ -item name=1.5.1 href=http://www.apache.org/dyn/closer.cgi/ambari/ambari-1.5.1/ -item name=1.5.0 href=http://www.apache.org/dyn/closer.cgi/ambari/ambari-1.5.0/ -item name=1.4.4 href=http://archive.apache.org/dist/ambari/ambari-1.4.4// -item name=1.4.3 href=http://archive.apache.org/dist/ambari/ambari-1.4.3// -item name=1.4.2 href=http://archive.apache.org/dist/ambari/ambari-1.4.2// -item name=1.4.1 href=http://archive.apache.org/dist/incubator/ambari/ambari-1.4.1// -item name=1.2.5 href=http://archive.apache.org/dist/incubator/ambari/ambari-1.2.5// -item name=1.2.4 href=http://archive.apache.org/dist/incubator/ambari/ambari-1.2.4// -item name=1.2.3 href=http://archive.apache.org/dist/incubator/ambari/ambari-1.2.3// -item name=1.2.2
[33/39] git commit: AMBARI-7228. Too much white space in the left half of the Manage Ambari page.(XIWANG)
AMBARI-7228. Too much white space in the left half of the Manage Ambari page.(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/36441749 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/36441749 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/36441749 Branch: refs/heads/branch-alerts-dev Commit: 364417494428f1b5bad0c8ad1167aee536512b5e Parents: e40e47f Author: Xi Wang xiw...@apache.org Authored: Tue Sep 9 14:52:15 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Tue Sep 9 17:20:44 2014 -0700 -- .../resources/ui/admin-web/app/styles/main.css | 30 ++-- .../ui/admin-web/app/views/leftNavbar.html | 8 +++--- 2 files changed, 32 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/36441749/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css index e1be895..e92fe1a 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css +++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css @@ -229,17 +229,43 @@ .left-navbar .panel{ border-radius: 0; + font-size: 15px; +} +.left-navbar .panel-heading { + padding: 8px 15px; + font-weight: bold; +} +.left-navbar .panel-body { + padding: 5px 15px; +} +.left-navbar .panel-body #cluster-name input{ + font-size: 17px; +} +.left-navbar .panel-body #cluster-name form{ + margin-top: 4px; + margin-bottom: -10px; +} +.left-navbar .panel-body h4 .glyphicon{ + font-size: 14px; +} +.left-navbar .panel-body #LDAP-button { + padding: 5px; +} +.left-navbar .panel-body hr{ + margin-top: 5px; + margin-bottom: 5px; } .left-navbar .panel-body li{ margin: 0 -15px; } .left-navbar .panel-body li a{ border-radius: 0; - padding-left: 30px; + padding-left: 33px; + padding-top: 8px; + padding-bottom: 8px; } .left-navbar .panel-body li.active a{ background: #666; - } .search-container{ http://git-wip-us.apache.org/repos/asf/ambari/blob/36441749/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html index 272c762..8b57754 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html +++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html @@ -20,10 +20,10 @@ div class=panel-headingspan class=glyphicon glyphicon-cloud/span Clusters/div div class=panel-body div ng-show=cluster -div ng-switch on=editCluster.editingName - h5 ng-switch-when=false{{cluster.Clusters.cluster_name}} +div id=cluster-name ng-switch on=editCluster.editingName + h4 ng-switch-when=false{{cluster.Clusters.cluster_name}} i ng-click=toggleEditName() class=glyphicon glyphicon-edit pull-right edit-cluster-name tooltip=Rename Cluster/i - /h5 + /h4 form ng-keyup=toggleEditName($event) tabindex=1 name=editClusterNameForm class=editClusterNameForm ng-switch-when=true ng-submit=editCluster.name !== cluster.Clusters.cluster_name editClusterNameForm.newClusterName.$valid confirmClusterNameChange() @@ -89,7 +89,7 @@ li ng-class={active: isActive('groups.list')}link-to route=groups.list class=groupslist-linkGroups/link-to/li /ul hr - div ng-switch=isLDAPConfigured + div id=LDAP-button ng-switch=isLDAPConfigured a ng-switch-when=true href class=btn btn-primary btn-block syncldapbtn ng-click=syncLDAP() span class=glyphicon glyphicon-transfer pulldown2/span Sync LDAP /a
[31/39] git commit: AMBARI-7232. Admin View: Views API should not allow access to Admin View UI by non-Admin users. (jaimin)
AMBARI-7232. Admin View: Views API should not allow access to Admin View UI by non-Admin users. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c30d915 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c30d915 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c30d915 Branch: refs/heads/branch-alerts-dev Commit: 3c30d9158db2902f6fca3856b65d4a98886e23f2 Parents: 00be663 Author: Jaimin Jetly jai...@hortonworks.com Authored: Tue Sep 9 17:01:59 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Tue Sep 9 17:01:59 2014 -0700 -- .../ambari/server/api/AmbariPersistFilter.java | 1 - .../server/controller/AmbariHandlerList.java| 43 -- .../ambari/server/controller/AmbariServer.java | 26 -- .../server/controller/ControllerModule.java | 69 +-- .../controller/FailsafeServletResponse.java | 22 - .../server/orm/entities/ViewInstanceEntity.java | 89 .../ambari/server/security/SecurityFilter.java | 2 +- .../AmbariAuthorizationFilter.java | 35 ++-- .../orm/entities/ViewInstanceEntityTest.java| 16 9 files changed, 254 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3c30d915/ambari-server/src/main/java/org/apache/ambari/server/api/AmbariPersistFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/AmbariPersistFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/api/AmbariPersistFilter.java index 971b8a0..a5ab041 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/AmbariPersistFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/AmbariPersistFilter.java @@ -19,7 +19,6 @@ package org.apache.ambari.server.api; import com.google.inject.Inject; import com.google.inject.Singleton; -import com.google.inject.persist.PersistService; import com.google.inject.persist.UnitOfWork; import javax.servlet.*; http://git-wip-us.apache.org/repos/asf/ambari/blob/3c30d915/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java index 2dc3f47..6a831f8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java @@ -17,6 +17,12 @@ */ package org.apache.ambari.server.controller; +import java.util.HashMap; +import java.util.Map; + +import javax.inject.Inject; +import javax.inject.Singleton; + import org.apache.ambari.server.orm.entities.ViewEntity; import org.apache.ambari.server.orm.entities.ViewInstanceEntity; import org.apache.ambari.server.view.ViewContextImpl; @@ -25,12 +31,12 @@ import org.apache.ambari.server.view.ViewRegistry; import org.apache.ambari.view.SystemException; import org.apache.ambari.view.ViewContext; import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.SessionManager; +import org.eclipse.jetty.servlet.FilterHolder; import org.eclipse.jetty.webapp.WebAppContext; - -import javax.inject.Inject; -import javax.inject.Singleton; -import java.util.HashMap; -import java.util.Map; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.GenericWebApplicationContext; +import org.springframework.web.filter.DelegatingFilterProxy; /** * An Ambari specific extension of the FailsafeHandlerList that allows for the addition @@ -46,6 +52,15 @@ public class AmbariHandlerList extends FailsafeHandlerList implements ViewInstan ViewRegistry viewRegistry; /** + * Session manager. + */ + @Inject + SessionManager sessionManager; + + @Inject + DelegatingFilterProxy springSecurityFilter; + + /** * The Handler factory. */ private final HandlerFactory handlerFactory; @@ -55,6 +70,10 @@ public class AmbariHandlerList extends FailsafeHandlerList implements ViewInstan */ private final MapViewInstanceEntity, Handler handlerMap = new HashMapViewInstanceEntity, Handler(); + /** + * Spring web app context. + */ + private GenericWebApplicationContext springWebAppContext; // - Constructors -- @@ -72,6 +91,10 @@ public class AmbariHandlerList extends FailsafeHandlerList implements ViewInstan context.setClassLoader(viewInstanceDefinition.getViewEntity().getClassLoader());
[16/39] git commit: AMBARI-6639. License of Font Awesome is wrong in NOTICE.txt. (Jun Aoki via mahadev)
AMBARI-6639. License of Font Awesome is wrong in NOTICE.txt. (Jun Aoki via mahadev) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ef3506a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ef3506a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ef3506a Branch: refs/heads/branch-alerts-dev Commit: 2ef3506a9dc4aab0e6eb3799cf0eed0c141b3008 Parents: 221c5a1 Author: Mahadev Konar maha...@apache.org Authored: Mon Sep 8 21:40:43 2014 -0700 Committer: Mahadev Konar maha...@apache.org Committed: Mon Sep 8 21:40:43 2014 -0700 -- ambari-web/app/assets/licenses/NOTICE.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2ef3506a/ambari-web/app/assets/licenses/NOTICE.txt -- diff --git a/ambari-web/app/assets/licenses/NOTICE.txt b/ambari-web/app/assets/licenses/NOTICE.txt index d317866..82231f0 100644 --- a/ambari-web/app/assets/licenses/NOTICE.txt +++ b/ambari-web/app/assets/licenses/NOTICE.txt @@ -30,7 +30,7 @@ Copyright (c) 2012, Michael Bostock. This product includes bootstrap-datepicker.js (http://www.eyecon.ro/bootstrap-datepicker - Apache License, Version 2.0) Copyright (c) 2012 Stefan Petre -This product includes Font Awesome 3.2.1 (http://fortawesome.github.com/Font-Awesome - Creative Commons 3.0) +This product includes Font Awesome 3.2.1 (http://fortawesome.github.com/Font-Awesome - SIL OFL 1.1) Copyright (c) 2013 Dave Gandy This product includes Rickshaw 1.1.2 (http://code.shutterstock.com/rickshaw/ - MIT License) @@ -44,4 +44,4 @@ Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de] This product includes Moment.js (https://github.com/moment/moment/ - MIT license) -This product includes iframeAutoHeight.js (http://github.com/house9/jquery-iframe-auto-height - MIT license) \ No newline at end of file +This product includes iframeAutoHeight.js (http://github.com/house9/jquery-iframe-auto-height - MIT license)
[02/39] git commit: AMBARI-7195. Wizard Step 7 Next-click issue. (onechiporenko)
AMBARI-7195. Wizard Step 7 Next-click issue. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d29c280 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d29c280 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d29c280 Branch: refs/heads/branch-alerts-dev Commit: 3d29c280573ccffb0db02be44b669e60af63a8c5 Parents: bca3d36 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Mon Sep 8 14:44:21 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Mon Sep 8 14:44:21 2014 +0300 -- .../app/controllers/wizard/step7_controller.js | 19 +++ .../templates/common/configs/services_config.hbs | 2 ++ 2 files changed, 17 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d29c280/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index 5679c42..3ad55d3 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -43,6 +43,12 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, { slaveHostToGroup: null, + /** + * Is Submit-click processing now + * @type {bool} + */ + submitButtonClicked: false, + isRecommendedLoaded: false, /** * used in services_config.js view to mark a config with security icon @@ -136,8 +142,9 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, { */ isSubmitDisabled: function () { if (!this.get('stepConfigs.length')) return true; +if (this.get('submitButtonClicked')) return true; return (!this.get('stepConfigs').filterProperty('showConfig', true).everyProperty('errorCount', 0) || this.get(miscModalVisible)); - }.property('stepConfigs.@each.errorCount', 'miscModalVisible'), + }.property('stepConfigs.@each.errorCount', 'miscModalVisible', 'submitButtonClicked'), /** * List of selected to install service names @@ -241,6 +248,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, { * @method clearStep */ clearStep: function () { +this.set('submitButtonClicked', false); this.set('isSubmitDisabled', true); this.set('isRecommendedLoaded', false); this.get('stepConfigs').clear(); @@ -1322,16 +1330,19 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, { /** * Click-handler on Next button + * Disable Submit-button while server-side processes are running * @method submit */ submit: function () { if (this.get('isSubmitDisabled')) { return; } -var _this = this; +var self = this; +this.set('submitButtonClicked', true); this.serverSideValidation().done(function () { - _this.checkDatabaseConnectionTest().done(function () { -_this.resolveHiveMysqlDatabase(); + self.checkDatabaseConnectionTest().done(function () { +self.resolveHiveMysqlDatabase(); +self.set('submitButtonClicked', false); }); }); } http://git-wip-us.apache.org/repos/asf/ambari/blob/3d29c280/ambari-web/app/templates/common/configs/services_config.hbs -- diff --git a/ambari-web/app/templates/common/configs/services_config.hbs b/ambari-web/app/templates/common/configs/services_config.hbs index 67cef63..a0cd1d1 100644 --- a/ambari-web/app/templates/common/configs/services_config.hbs +++ b/ambari-web/app/templates/common/configs/services_config.hbs @@ -35,6 +35,8 @@ {{#if controller.isRecommendedLoaded}} p class=loading align-center/p {{#if isSubmitDisabled}} + {{#unless submitButtonClicked}} div class=alert{{t installer.step7.attentionNeeded}}/div + {{/unless}} {{/if}} {{/if}} \ No newline at end of file
[21/39] git commit: AMBARI-7220. Ambari NN HA wizard cannot detect checkpoint. (akovalenko)
AMBARI-7220. Ambari NN HA wizard cannot detect checkpoint. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/245cf1ba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/245cf1ba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/245cf1ba Branch: refs/heads/branch-alerts-dev Commit: 245cf1bae02f2815cb71edf56902f6fafa47c03f Parents: 8f287ce Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Tue Sep 9 17:09:26 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Tue Sep 9 17:11:12 2014 +0300 -- .../nameNode/step4_controller.js| 29 ambari-web/app/controllers/main/service/item.js | 6 ++-- ambari-web/app/messages.js | 1 + .../admin/highAvailability/nameNode/step4.hbs | 5 4 files changed, 26 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/245cf1ba/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js index 2fba24e..eb51423 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js @@ -28,6 +28,8 @@ App.HighAvailabilityWizardStep4Controller = Em.Controller.extend({ isNextEnabled: false, + isNameNodeStarted: true, + pullCheckPointStatus: function () { var hostName = this.get('content.masterComponentHosts').findProperty('isCurNameNode', true).hostName; App.ajax.send({ @@ -41,18 +43,23 @@ App.HighAvailabilityWizardStep4Controller = Em.Controller.extend({ }, checkNnCheckPointStatus: function (data) { -var self = this; -var journalTransactionInfo = $.parseJSON(data.metrics.dfs.namenode.JournalTransactionInfo); -var isInSafeMode = (data.metrics.dfs.namenode.Safemode != ); -journalTransactionInfo = parseInt(journalTransactionInfo.LastAppliedOrWrittenTxId) - parseInt(journalTransactionInfo.MostRecentCheckpointTxId); -if(journalTransactionInfo = 1 isInSafeMode){ - this.set(isNextEnabled, true); - return; -} +if (data.HostRoles.desired_state === 'STARTED') { + this.set('isNameNodeStarted', true); + var self = this; + var journalTransactionInfo = $.parseJSON(data.metrics.dfs.namenode.JournalTransactionInfo); + var isInSafeMode = (data.metrics.dfs.namenode.Safemode != ); + journalTransactionInfo = parseInt(journalTransactionInfo.LastAppliedOrWrittenTxId) - parseInt(journalTransactionInfo.MostRecentCheckpointTxId); + if (journalTransactionInfo = 1 isInSafeMode) { +this.set(isNextEnabled, true); +return; + } -window.setTimeout(function () { - self.pullCheckPointStatus() -}, self.POLL_INTERVAL); + window.setTimeout(function () { +self.pullCheckPointStatus() + }, self.POLL_INTERVAL); +} else { + this.set('isNameNodeStarted', false); +} }, done: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/245cf1ba/ambari-web/app/controllers/main/service/item.js -- diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js index 5593c72..fc62a4e 100644 --- a/ambari-web/app/controllers/main/service/item.js +++ b/ambari-web/app/controllers/main/service/item.js @@ -163,9 +163,9 @@ App.MainServiceItemController = Em.Controller.extend({ startStopPopupPrimary: function (serviceHealth, query, runMmOperation) { var requestInfo = ; -var turnOnMM = ON +var turnOnMM = ON; if (serviceHealth == STARTED) { - turnOnMM = OFF + turnOnMM = OFF; requestInfo = App.BackgroundOperationsController.CommandContexts.START_SERVICE.format(this.get('content.serviceName')); } else { requestInfo = App.BackgroundOperationsController.CommandContexts.STOP_SERVICE.format(this.get('content.serviceName')); @@ -189,8 +189,6 @@ App.MainServiceItemController = Em.Controller.extend({ 'error': 'startStopPopupErrorCallback', 'data': data }); -this.set('isStopDisabled', true); -this.set('isStartDisabled', true); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/245cf1ba/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 9f9474a..f158f8d 100644 ---
[35/39] git commit: Revert AMBARI-7218. rename host group deletes configs (dlysnichenko)
Revert AMBARI-7218. rename host group deletes configs (dlysnichenko) This reverts commit 9ce44c953de1154883887538c5979e5d9036a30c. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/22b1df06 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22b1df06 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22b1df06 Branch: refs/heads/branch-alerts-dev Commit: 22b1df06454e32753864ea3a622d9cd5b8d921fa Parents: 9cf27bf Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Wed Sep 10 13:13:46 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Wed Sep 10 13:13:46 2014 +0300 -- .../internal/ConfigGroupResourceProvider.java | 136 +++ .../ConfigGroupResourceProviderTest.java| 130 -- 2 files changed, 49 insertions(+), 217 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/22b1df06/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java index 52df317..6e13d9c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java @@ -383,36 +383,6 @@ public class ConfigGroupResourceProvider extends cluster.deleteConfigGroup(request.getId()); } - private void basicRequestValidation(ConfigGroupRequest request) { -if (request.getId() == null -|| request.getClusterName() == null -|| request.getClusterName().isEmpty() -|| request.getGroupName() == null -|| request.getGroupName().isEmpty()) { - LOG.debug(Received a config group request with request id = + - request.getId() + , cluster name = + - request.getClusterName() + , group name = + request.getGroupName()); - throw new IllegalArgumentException(Request id, + - cluster name and + - group name have to be provided.); -} - } - - private void validateRenameRequest(ConfigGroupRequest request) { -if (request.getTag() != null -|| (request.getHosts() != null ! request.getHosts().isEmpty()) -|| request.getDescription() != null -|| request.getServiceConfigVersionNote() != null -|| (request.getConfigs()!=null ! request.getConfigs().isEmpty())) { - throw new IllegalArgumentException(Request with id + - request.getId() + - seems to be a config group rename request. + - Renaming config group can not be combined with other + - operations, so hosts, configs, description, service config version note + - request fields should not be populated.); -} - } - private void validateRequest(ConfigGroupRequest request) { if (request.getClusterName() == null || request.getClusterName().isEmpty() @@ -534,87 +504,79 @@ public class ConfigGroupResourceProvider extends Clusters clusters = getManagementController().getClusters(); for (ConfigGroupRequest request : requests) { - basicRequestValidation(request); Cluster cluster; try { cluster = clusters.getCluster(request.getClusterName()); } catch (ClusterNotFoundException e) { throw new ParentObjectNotFoundException( - String.format( -The cluster %s does not exist, can not update a config group, - request.getClusterName()), e); + Attempted to add a config group to a cluster which doesn't exist, e); } + if (request.getId() == null) { +throw new AmbariException(Config group Id is a required parameter.); + } + + validateRequest(request); + // Find config group - MapLong, ConfigGroup configGroups = cluster.getConfigGroups(); - ConfigGroup configGroup = configGroups.get(request.getId()); + ConfigGroup configGroup = cluster.getConfigGroups().get(request.getId()); if (configGroup == null) { throw new AmbariException(Config group not found + , clusterName = + request.getClusterName() + , groupId = + request.getId()); } + String serviceName = configGroup.getServiceName(); + String requestServiceName = cluster.getServiceForConfigTypes(request.getConfigs().keySet()); + if (serviceName != null
[26/39] git commit: AMBARI-6786. Provide testcases for configs got by /recommendations on stack-version
AMBARI-6786. Provide testcases for configs got by /recommendations 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/fbe8b876 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fbe8b876 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fbe8b876 Branch: refs/heads/branch-alerts-dev Commit: fbe8b876a818fa9ad8215557c407a2f1a6e47412 Parents: c2a117f Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Tue Sep 9 10:42:42 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Tue Sep 9 13:22:52 2014 -0700 -- .../stacks/HDP/1.3.2/services/stack_advisor.py | 19 ++- .../stacks/HDP/2.0.6/services/stack_advisor.py | 37 +++-- .../stacks/HDP/2.1/services/stack_advisor.py| 8 +- .../stacks/2.0.6/common/test_stack_advisor.py | 157 ++- .../stacks/2.1/common/test_stack_advisor.py | 132 5 files changed, 323 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fbe8b876/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py index c9b119f..ba42075 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py @@ -19,6 +19,7 @@ limitations under the License. import re import sys +from math import ceil from stack_advisor import DefaultStackAdvisor @@ -146,19 +147,21 @@ class HDP132StackAdvisor(DefaultStackAdvisor): 24 cluster[ram]: 2048 }[1] +totalAvailableRam = cluster[ram] - cluster[reservedRam] +if cluster[hBaseInstalled]: + totalAvailableRam -= cluster[hbaseRam] +cluster[totalAvailableRam] = max(2048, totalAvailableRam * 1024) '''containers = max(3, min (2*cores,min (1.8*DISKS,(Total available RAM) / MIN_CONTAINER_SIZE''' -cluster[containers] = max(3, -min(2 * cluster[cpu], -int(min(1.8 * cluster[disk], -cluster[ram] / cluster[minContainerSize] +cluster[containers] = round(max(3, + min(2 * cluster[cpu], + min(ceil(1.8 * cluster[disk]), + cluster[totalAvailableRam] / cluster[minContainerSize] '''ramPerContainers = max(2GB, RAM - reservedRam - hBaseRam) / containers''' -cluster[ramPerContainer] = max(2048, - cluster[ram] - cluster[reservedRam] - cluster[hbaseRam]) -cluster[ramPerContainer] /= cluster[containers] +cluster[ramPerContainer] = abs(cluster[totalAvailableRam] / cluster[containers]) '''If greater than 1GB, value will be in multiples of 512.''' if cluster[ramPerContainer] 1024: - cluster[ramPerContainer] = ceil(cluster[ramPerContainer] / 512) * 512 + cluster[ramPerContainer] = int(cluster[ramPerContainer] / 512) * 512 cluster[mapMemory] = int(cluster[ramPerContainer]) cluster[reduceMemory] = cluster[ramPerContainer] http://git-wip-us.apache.org/repos/asf/ambari/blob/fbe8b876/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 452ccbd..8853e13 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -19,6 +19,7 @@ limitations under the License. import re import sys +from math import ceil from stack_advisor import DefaultStackAdvisor @@ -91,19 +92,19 @@ class HDP206StackAdvisor(DefaultStackAdvisor): def recommendYARNConfigurations(self, configurations, clusterData): putYarnProperty = self.putProperty(configurations, yarn-site) -putYarnProperty('yarn.nodemanager.resource.memory-mb', clusterData['containers'] * clusterData['ramPerContainer']) -putYarnProperty('yarn.scheduler.minimum-allocation-mb', clusterData['ramPerContainer']) -putYarnProperty('yarn.scheduler.maximum-allocation-mb', clusterData['containers'] * clusterData['ramPerContainer']) +putYarnProperty('yarn.nodemanager.resource.memory-mb', int(round(clusterData['containers'] * clusterData['ramPerContainer']))) +
[10/39] git commit: Revert AMBARI-7206. ambari - hive-site.xml - use sql standard authorizer, remove this config from commandline (dlysnichenko)
Revert AMBARI-7206. ambari - hive-site.xml - use sql standard authorizer, remove this config from commandline (dlysnichenko) This reverts commit a5fdccda493fbbcd06d0d92b98aac14b0b6f623a. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74de327a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74de327a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74de327a Branch: refs/heads/branch-alerts-dev Commit: 74de327a0a8dae72c2e5463c7f2295249a68f176 Parents: a5fdccd Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Mon Sep 8 22:02:56 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Mon Sep 8 22:02:56 2014 +0300 -- .../stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml | 2 +- .../stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml | 2 +- .../2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 | 2 +- .../HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml| 2 +- .../stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/74de327a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml index 55d960f..8206a6a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml @@ -115,7 +115,7 @@ limitations under the License. property namehive.security.authorization.manager/name - valueorg.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory/value +valueorg.apache.hcatalog.security.HdfsAuthorizationProvider/value descriptionthe hive client authorization manager class name. The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. /description /property http://git-wip-us.apache.org/repos/asf/ambari/blob/74de327a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml index d879a5b..9057fbe 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml @@ -133,7 +133,7 @@ limitations under the License. property namehive.security.authorization.manager/name - valueorg.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory/value + valueorg.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider/value descriptionthe hive client authorization manager class name. The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. /description /property http://git-wip-us.apache.org/repos/asf/ambari/blob/74de327a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 index 3aee116..a8fe21c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 @@ -22,7 +22,7 @@ HIVE_SERVER2_OPTS= -hiveconf hive.log.file=hiveserver2.log -hiveconf hive.log.dir=$5 {% if hive_authorization_enabled == True and str(hdp_stack_version).startswith('2.1') %} # HiveServer 2 -hiveconf options -HIVE_SERVER2_OPTS=${HIVE_SERVER2_OPTS} -hiveconf hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator +HIVE_SERVER2_OPTS=${HIVE_SERVER2_OPTS} -hiveconf hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator -hiveconf
[32/39] git commit: AMBARI-7234. Admin View: Unclear error during deleting view with set permission for user. (jaimin)
AMBARI-7234. Admin View: Unclear error during deleting view with set permission for user. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e40e47f8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e40e47f8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e40e47f8 Branch: refs/heads/branch-alerts-dev Commit: e40e47f8370941cbc0d818150bd7eea6d20a6522 Parents: 3c30d91 Author: Jaimin Jetly jai...@hortonworks.com Authored: Tue Sep 9 17:11:36 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Tue Sep 9 17:11:36 2014 -0700 -- .../apache/ambari/server/view/ViewRegistry.java | 4 ++ .../ambari/server/view/ViewRegistryTest.java| 39 2 files changed, 43 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e40e47f8/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 859ea96..509e474 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 @@ -567,6 +567,10 @@ public class ViewRegistry { LOG.debug(Deleting view instance + viewName + / + version + / +instanceName); } +ListPrivilegeEntity instancePrivileges = privilegeDAO.findByResourceId(instanceEntity.getResource().getId()); +for (PrivilegeEntity privilegeEntity : instancePrivileges) { + privilegeDAO.remove(privilegeEntity); +} instanceDAO.remove(instanceEntity); viewEntity.removeInstanceDefinition(instanceName); removeInstanceDefinition(viewEntity, instanceName); http://git-wip-us.apache.org/repos/asf/ambari/blob/e40e47f8/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java index 7ce4699..38c2f9b 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java @@ -33,10 +33,12 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URI; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; @@ -703,6 +705,43 @@ public class ViewRegistryTest { } @Test + public void testUninstallViewInstance() throws Exception { + +ViewRegistry registry = getRegistry(); + +Configuration ambariConfig = new Configuration(new Properties()); + +ViewConfig config = ViewConfigTest.getConfig(xml_valid_instance); +ViewEntity viewEntity = getViewEntity(config, ambariConfig, getClass().getClassLoader(), ); +ViewInstanceEntity viewInstanceEntity = getViewInstanceEntity(viewEntity, config.getInstances().get(0)); +ResourceEntity resource = new ResourceEntity(); +resource.setId(3L); +viewInstanceEntity.setResource(resource); +PrivilegeEntity privilege1 = createNiceMock(PrivilegeEntity.class); +PrivilegeEntity privilege2 = createNiceMock(PrivilegeEntity.class); +ListPrivilegeEntity privileges = Arrays.asList(privilege1, privilege2); + +expect(privilegeDAO.findByResourceId(3L)).andReturn(privileges); +privilegeDAO.remove(privilege1); +privilegeDAO.remove(privilege2); +viewInstanceDAO.remove(viewInstanceEntity); + +handlerList.removeViewInstance(viewInstanceEntity); + +replay(viewInstanceDAO, privilegeDAO, handlerList); + +registry.addDefinition(viewEntity); +registry.addInstanceDefinition(viewEntity, viewInstanceEntity); +registry.uninstallViewInstance(viewInstanceEntity); + +CollectionViewInstanceEntity viewInstanceDefinitions = registry.getInstanceDefinitions(viewEntity); + +Assert.assertEquals(0, viewInstanceDefinitions.size()); + +verify(viewInstanceDAO, privilegeDAO, handlerList); + } + + @Test public void testUpdateViewInstance_invalid() throws Exception { ViewRegistry registry = getRegistry();
[30/39] git commit: AMBARI-7231. Slider View: View UI should load data from Ambari API (alexantonenko)
AMBARI-7231. Slider View: View UI should load data from Ambari API (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/00be663b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/00be663b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/00be663b Branch: refs/heads/branch-alerts-dev Commit: 00be663b5835c3cc4e56b19f3e7521ff187a1926 Parents: 4f62444 Author: Alex Antonenko hiv...@gmail.com Authored: Wed Sep 10 02:11:02 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Wed Sep 10 02:14:18 2014 +0300 -- .../assets/data/resource/service_status.json| 107 +++ .../app/controllers/slider_apps_controller.js | 136 ++- .../src/main/resources/ui/app/helpers/ajax.js | 40 +- .../src/main/resources/ui/app/initialize.js | 4 +- .../ui/app/mappers/application_status.js| 79 +-- .../src/main/resources/ui/app/translations.js | 7 + 6 files changed, 325 insertions(+), 48 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/00be663b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_status.json -- diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_status.json b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_status.json new file mode 100644 index 000..59dd8db --- /dev/null +++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_status.json @@ -0,0 +1,107 @@ + +{ + items : [ +{ + ServiceInfo : { +service_name : FALCON, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : FLUME, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : GANGLIA, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : HBASE, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : HCATALOG, +state : INSTALLED + } +}, +{ + ServiceInfo : { +service_name : HDFS, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : HIVE, +state : INSTALLED + } +}, +{ + ServiceInfo : { +service_name : MAPREDUCE2, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : NAGIOS, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : OOZIE, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : PIG, +state : INSTALLED + } +}, +{ + ServiceInfo : { +service_name : SQOOP, +state : INSTALLED + } +}, +{ + ServiceInfo : { +service_name : STORM, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : TEZ, +state : INSTALLED + } +}, +{ + ServiceInfo : { +service_name : WEBHCAT, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : YARN, +state : STARTED + } +}, +{ + ServiceInfo : { +service_name : ZOOKEEPER, +state : STARTED + } +} + ] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/00be663b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_apps_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_apps_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_apps_controller.js index df06c2c..7199777 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_apps_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_apps_controller.js @@ -23,9 +23,141 @@ App.SliderAppsController = Ember.ArrayController.extend({ * @method initResources */ initResources:function () { +this.getClusterName(); + }, + + initialValuesToLoad: Em.Object.create({ +ambariAddress: null, +clusterName: null, +hdfsAddress: null, +yarnRMAddress: null, +yarnRMSchedulerAddress: null, +zookeeperQuorum: null + }), + + zookeeperHosts: [], + + /** + * Get cluster name from server + * @returns {$.ajax} + * @method getClusterName + */ + getClusterName: function() { +return App.ajax.send({ + name: 'cluster_name', + sender: this, + data: { +urlPrefix: '/api/v1/' + }, + success: 'getClusterNameSuccessCallback' +}); + }, + + /** + *
git commit: AMBARI-7241 Configs: actions should not appear for non-operator cluster users. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk c91fab72a - 2b78d36ea AMBARI-7241 Configs: actions should not appear for non-operator cluster users. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2b78d36e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2b78d36e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2b78d36e Branch: refs/heads/trunk Commit: 2b78d36ea2efd0cb4d1441399a00f5d196a0b2b2 Parents: c91fab7 Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Wed Sep 10 17:47:31 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Wed Sep 10 17:47:31 2014 +0300 -- ambari-web/app/app.js | 3 +++ .../templates/common/configs/config_history_flow.hbs| 12 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2b78d36e/ambari-web/app/app.js -- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index a690e82..4cca237 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -34,6 +34,9 @@ module.exports = Em.Application.create({ }), isAdmin: false, isOperator: false, + isManager: function() { +return this.get('isAdmin') || this.get('isOperator'); + }.property('isAdmin','isOperator'), /** * return url prefix with number value of version of HDP stack */ http://git-wip-us.apache.org/repos/asf/ambari/blob/2b78d36e/ambari-web/app/templates/common/configs/config_history_flow.hbs -- diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs b/ambari-web/app/templates/common/configs/config_history_flow.hbs index 0dfbe2e..4c79c57 100644 --- a/ambari-web/app/templates/common/configs/config_history_flow.hbs +++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs @@ -49,8 +49,10 @@ /div div class=version-operations-buttons button {{bindAttr disabled=serviceVersion.disabledActionAttr.view class=:btn serviceVersion.isDisplayed:not-allowed-cursor title=serviceVersion.disabledActionMessages.view}} {{action switchVersion serviceVersion target=view}}i class=icon-search/inbsp;{{t common.view}}/button -button {{bindAttr disabled=serviceVersion.disabledActionAttr.compare class=:btn serviceVersion.isDisplayed:not-allowed-cursor title=serviceVersion.disabledActionMessages.compare}} {{action compare serviceVersion target=view}}i class=icon-copy/inbsp;{{t common.compare}}/button -button {{bindAttr disabled=serviceVersion.disabledActionAttr.revert class=:btn serviceVersion.isCurrent:not-allowed-cursor title=serviceVersion.disabledActionMessages.revert}} {{action revert serviceVersion target=view}}{{t dashboard.configHistory.info-bar.revert.button}}/button +{{#if App.isManager}} +button {{bindAttr disabled=serviceVersion.disabledActionAttr.compare class=:btn serviceVersion.isDisplayed:not-allowed-cursor title=serviceVersion.disabledActionMessages.compare}} {{action compare serviceVersion target=view}}i class=icon-copy/inbsp;{{t common.compare}}/button +button {{bindAttr disabled=serviceVersion.disabledActionAttr.revert class=:btn serviceVersion.isCurrent:not-allowed-cursor title=serviceVersion.disabledActionMessages.revert}} {{action revert serviceVersion target=view}}{{t dashboard.configHistory.info-bar.revert.button}}/button +{{/if}} /div /div /div @@ -60,6 +62,7 @@ {{translateAttr data-original-title=services.service.config.configHistory.rightArrow.tooltip}}i class=icon-chevron-right icon-3x/i/div /div div class=version-info-bar-wrapper +{{#if App.isManager}} div {{bindAttr class=view.showCompareVersionBar::hidden :version-info-bar}} div class=row-fluid div class=span1 remove-compare-bar {{action removeCompareVersionBar target=view}} data-toggle=arrow-tooltip {{translateAttr data-original-title=services.service.config.configHistory.dismissIcon.tooltip}} @@ -82,8 +85,10 @@ /div /div /div +{{/if}} div class=version-info-bar div class=row-fluid +{{#if App.isManager}} div class=btn-group pull-left button id=toggle-dropdown-button class=btn dropdown-toggle data-toggle=dropdown href=# {{action hideFullList target=view}} {{bindAttr disabled=view.versionActionsDisabled}} i class=icon-random/i @@ -122,6 +127,7 @@ {{/unless}} /ul
git commit: AMBARI-7240. Change the way oozie uploads sharelib into hdfs (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 2b78d36ea - 1ef2af3f7 AMBARI-7240. Change the way oozie uploads sharelib into hdfs (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1ef2af3f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1ef2af3f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1ef2af3f Branch: refs/heads/trunk Commit: 1ef2af3f704bddc02c6b5532fecd438f13cab02c Parents: 2b78d36 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Sep 10 17:51:33 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Sep 10 17:51:33 2014 +0300 -- .../HDP/2.0.6/services/HIVE/package/scripts/params.py | 6 +++--- .../HDP/2.0.6/services/OOZIE/package/scripts/oozie.py | 2 +- .../2.0.6/services/OOZIE/package/scripts/oozie_service.py | 2 +- .../HDP/2.0.6/services/OOZIE/package/scripts/params.py| 10 ++ ambari-web/app/data/HDP2/config_mapping.js| 4 ++-- ambari-web/app/data/config_mapping.js | 4 ++-- 6 files changed, 19 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/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 6f05b6b..b1a4a49 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 @@ -126,10 +126,10 @@ mysql_host = config['clusterHostInfo']['hive_mysql_host'] mysql_adduser_path = format({tmp_dir}/addMysqlUser.sh) Metastore Schema -if str(hdp_stack_version).startswith('2.1'): - init_metastore_schema = True -else: +if str(hdp_stack_version).startswith('2.0'): init_metastore_schema = False +else: + init_metastore_schema = True ## HCAT http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py index f5d4142..d390c69 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py @@ -139,7 +139,7 @@ def oozie_server_specific( if params.has_falcon_host: cmd3 += format(' cp {falcon_home}/oozie/ext/falcon-oozie-el-extension-*.jar {oozie_libext_dir}') # this is different for HDP1 - cmd4 = format(cd {oozie_tmp_dir} /usr/lib/oozie/bin/oozie-setup.sh prepare-war) + cmd4 = format(cd {oozie_tmp_dir} {oozie_setup_sh} prepare-war) no_op_test = format(ls {pid_file} /dev/null 21 ps `cat {pid_file}` /dev/null 21) Execute( [cmd1, cmd2, cmd3], http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py index aa2b7e2..78661b0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py @@ -37,7 +37,7 @@ def oozie_service(action = 'start'): # 'start' or 'stop' db_connection_check_command = None cmd1 = format(cd {oozie_tmp_dir} /usr/lib/oozie/bin/ooziedb.sh create -sqlfile oozie.sql -run) -cmd2 = format({kinit_if_needed} hadoop dfs -put /usr/lib/oozie/share {oozie_hdfs_user_dir} ; hadoop dfs -chmod -R 755 {oozie_hdfs_user_dir}/share) +cmd2 = format({kinit_if_needed} {put_shared_lib_to_hdfs_cmd} ; hadoop dfs -chmod -R 755 {oozie_hdfs_user_dir}/share) if not os.path.isfile(params.jdbc_driver_jar) and params.jdbc_driver_name == org.postgresql.Driver: print ERROR: jdbc file + params.jdbc_driver_jar + is unavailable. Please, follow next steps:\n \
git commit: AMBARI-7211 - Views : support for a system property
Repository: ambari Updated Branches: refs/heads/trunk 1ef2af3f7 - dc15b7706 AMBARI-7211 - Views : support for a system property Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dc15b770 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc15b770 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc15b770 Branch: refs/heads/trunk Commit: dc15b7706294371444c455f40f2792d8fea4c0bc Parents: 1ef2af3 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Tue Sep 9 13:55:18 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Wed Sep 10 11:02:03 2014 -0400 -- .../AmbariPrivilegeResourceProvider.java| 8 -- .../internal/ViewVersionResourceProvider.java | 3 ++ .../ambari/server/orm/entities/ViewEntity.java | 29 +++- .../server/upgrade/UpgradeCatalog170.java | 2 ++ .../server/view/configuration/ViewConfig.java | 14 ++ .../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 +- .../AmbariPrivilegeResourceProviderTest.java| 1 + .../server/orm/entities/ViewEntityTest.java | 11 .../server/upgrade/UpgradeCatalog170Test.java | 20 +++--- .../view/configuration/ViewConfigTest.java | 23 13 files changed, 107 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dc15b770/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java index d7c6a8f..85e5906 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java @@ -122,11 +122,13 @@ public class AmbariPrivilegeResourceProvider extends PrivilegeResourceProviderO resourceEntities.put(clusterEntity.getResource().getId(), clusterEntity); } } -//add view entites +//add view entities ViewRegistry viewRegistry = ViewRegistry.getInstance(); for (ViewEntity viewEntity : viewRegistry.getDefinitions()) { - for (ViewInstanceEntity viewInstanceEntity : viewEntity.getInstances()) { -resourceEntities.put(viewInstanceEntity.getResource().getId(), viewInstanceEntity); + if (viewEntity.isLoaded()) { +for (ViewInstanceEntity viewInstanceEntity : viewEntity.getInstances()) { + resourceEntities.put(viewInstanceEntity.getResource().getId(), viewInstanceEntity); +} } } return resourceEntities; http://git-wip-us.apache.org/repos/asf/ambari/blob/dc15b770/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java index ed9f06a..58cf774 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java @@ -54,6 +54,7 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { public static final String MASKER_CLASS_PROPERTY_ID = ViewVersionInfo/masker_class; public static final String VIEW_STATUS_PROPERTY_ID= ViewVersionInfo/status; public static final String VIEW_STATUS_DETAIL_PROPERTY_ID = ViewVersionInfo/status_detail; + public static final String SYSTEM_PROPERTY_ID = ViewVersionInfo/system; /** * The key property ids for a view resource. @@ -79,6 +80,7 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { propertyIds.add(MASKER_CLASS_PROPERTY_ID); propertyIds.add(VIEW_STATUS_PROPERTY_ID); propertyIds.add(VIEW_STATUS_DETAIL_PROPERTY_ID); +propertyIds.add(SYSTEM_PROPERTY_ID); } @@ -135,6 +137,7 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { setResourceProperty(resource, MASKER_CLASS_PROPERTY_ID, viewDefinition.getMask(), requestedIds);
git commit: AMBARI-7237. No start action for stopped service in MM mode Stack 1.3 (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk dc15b7706 - dcc00b69b AMBARI-7237. No start action for stopped service in MM mode Stack 1.3 (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dcc00b69 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dcc00b69 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dcc00b69 Branch: refs/heads/trunk Commit: dcc00b69b3350729123cbf43dd80cf0da314bae6 Parents: dc15b77 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Tue Sep 9 16:50:18 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Wed Sep 10 18:27:21 2014 +0300 -- .../internal/ServiceResourceProvider.java | 14 ++- .../internal/ServiceResourceProviderTest.java | 122 ++- 2 files changed, 133 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dcc00b69/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java index aec91fd..31c6c37 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java @@ -981,11 +981,13 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider State masterState = null; State clientState = null; State otherState = null; +State maxMMState = null; // The worst state among components in MM boolean hasDisabled = false; boolean hasMaster= false; boolean hasOther = false; boolean hasClient= false; +boolean hasMM= false; for (ServiceComponentHostResponse hostComponentResponse : hostComponentResponses ) { ComponentInfo componentInfo = ambariMetaInfo.getComponentCategory(stackId.getStackName(), @@ -999,10 +1001,17 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider boolean isInMaintenance = ! MaintenanceState.OFF.toString(). equals(hostComponentResponse.getMaintenanceState()); -if (state.equals(State.DISABLED) || isInMaintenance) { +if (state.equals(State.DISABLED)) { hasDisabled = true; } +if (isInMaintenance !componentInfo.isClient()) { + hasMM = true; + if ( maxMMState == null || state.ordinal() maxMMState.ordinal()) { +maxMMState = state; + } +} + if (componentInfo.isMaster()) { if (state.equals(State.STARTED) || ! isInMaintenance) { // We rely on master's state to determine service state @@ -1037,7 +1046,8 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider return hasMaster ? masterState == null ? State.STARTED : masterState : hasOther? otherState == null ? State.STARTED : otherState : hasClient ? clientState == null ? State.INSTALLED : clientState : - hasDisabled ? State.DISABLED : State.UNKNOWN; + hasDisabled ? State.DISABLED : + hasMM ? maxMMState : State.UNKNOWN; } } catch (AmbariException e) { LOG.error(Can't determine service state., e); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcc00b69/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java index 7dbc38b..05f2e01 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java @@ -28,6 +28,7 @@ import static org.easymock.EasyMock.eq; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.isNull; import static org.easymock.EasyMock.replay; +import static
git commit: AMBARI-7243. Admin View: no way to link to instance if you create w/o a label via API. (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk dcc00b69b - 3f9d5a53f AMBARI-7243. Admin View: no way to link to instance if you create w/o a label via API. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3f9d5a53 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3f9d5a53 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3f9d5a53 Branch: refs/heads/trunk Commit: 3f9d5a53f31f2bab0907f0c88cf5fdb1b5e8d5d6 Parents: dcc00b6 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Wed Sep 10 19:02:57 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Wed Sep 10 19:03:16 2014 +0300 -- .../main/resources/ui/admin-web/app/scripts/services/View.js | 6 +++--- .../ui/admin-web/app/views/ambariViews/listTable.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3f9d5a53/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js index 0634a25..8f3b376 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js @@ -59,9 +59,9 @@ angular.module('ambariAdminConsole') angular.forEach(item.versions, function(version) { versions[version.ViewVersionInfo.version] = version.instances.length; - angular.forEach(version.instances, function(isntance) { -isntance.label = version.ViewVersionInfo.label; - }) + angular.forEach(version.instances, function(instance) { +instance.label = instance.ViewInstanceInfo.label || version.ViewVersionInfo.label || instance.ViewInstanceInfo.view_name; + }); self.instances = self.instances.concat(version.instances); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/3f9d5a53/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html index 13c6118..e27c5e5 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html +++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html @@ -54,7 +54,7 @@ tr ng-repeat=instance in view.instances td class=col-sm-3/td td class=col-sm-3 - a href=#/views/{{view.view_name}}/versions/{{instance.ViewInstanceInfo.version}}/instances/{{instance.ViewInstanceInfo.instance_name}}/edit class=instance-link{{instance.ViewInstanceInfo.label}}/a + a href=#/views/{{view.view_name}}/versions/{{instance.ViewInstanceInfo.version}}/instances/{{instance.ViewInstanceInfo.instance_name}}/edit class=instance-link{{instance.label}}/a /td td class=col-sm-1{{instance.ViewInstanceInfo.version}}/td td class=col-sm-5 div class=description-column tooltip={{instance.ViewInstanceInfo.description}}{{instance.ViewInstanceInfo.description || 'No description'}}/div
git commit: AMBARI-7244. Could not start Oozie after upgrade from 1.5.1 due to oozie_pid_dir not found (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk adb87a447 - 015e6abfd AMBARI-7244. Could not start Oozie after upgrade from 1.5.1 due to oozie_pid_dir not found (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/015e6abf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/015e6abf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/015e6abf Branch: refs/heads/trunk Commit: 015e6abfd19a9b2759e63df29d99c2f06c387479 Parents: adb87a4 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Sep 10 19:28:12 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Sep 10 19:28:12 2014 +0300 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java | 2 +- .../org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/015e6abf/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java index c018f6c..62b4e35 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java @@ -289,7 +289,7 @@ public class UpgradeCatalog161 extends AbstractUpgradeCatalog { protected void addMissingConfigs() throws AmbariException { updateConfigurationProperties(hbase-site, Collections.singletonMap(hbase.regionserver.info.port, 60030), false, false); updateConfigurationProperties(hbase-site, Collections.singletonMap(hbase.master.info.port, 60010), false, false); -updateConfigurationProperties(global, Collections.singletonMap(oozie_admin_port, 11001), false, false); +updateConfigurationProperties(oozie-env, Collections.singletonMap(oozie_admin_port, 11001), false, false); updateConfigurationProperties(hive-site, Collections.singletonMap(hive.heapsize, 1024), false, false); updateConfigurationProperties(pig-properties, Collections.singletonMap(pig-content, \n# Licensed to the Apache + Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# + http://git-wip-us.apache.org/repos/asf/ambari/blob/015e6abf/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java index c5a02cb..1d12ea0 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java @@ -147,7 +147,7 @@ public class UpgradeCatalog161Test { Collections.singletonMap(hbase.master.info.port, 60010), false, false); expectLastCall(); -upgradeCatalog.updateConfigurationProperties(global, +upgradeCatalog.updateConfigurationProperties(oozie-env, Collections.singletonMap(oozie_admin_port, 11001), false, false); expectLastCall();
git commit: AMBARI-7247. Slider View: App configs look inconsistent from Ambari's configs. (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk 015e6abfd - 9588d2a9c AMBARI-7247. Slider View: App configs look inconsistent from Ambari's configs. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9588d2a9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9588d2a9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9588d2a9 Branch: refs/heads/trunk Commit: 9588d2a9cd899193250cdc22c3cbd13dd1be969f Parents: 015e6ab Author: Oleg Nechiporenko onechipore...@apache.org Authored: Wed Sep 10 19:48:17 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Wed Sep 10 19:48:17 2014 +0300 -- .../main/resources/ui/app/mixins/with_panels.js | 50 + .../main/resources/ui/app/models/slider_app.js | 24 ++--- .../resources/ui/app/styles/application.less| 16 ++ .../ui/app/templates/slider_app/configs.hbs | 36 ++--- .../ui/app/templates/slider_app/summary.hbs | 10 ++-- .../src/main/resources/ui/app/translations.js | 3 +- .../ui/app/views/slider_app/configs_view.js | 57 7 files changed, 152 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9588d2a9/contrib/views/slider/src/main/resources/ui/app/mixins/with_panels.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/mixins/with_panels.js b/contrib/views/slider/src/main/resources/ui/app/mixins/with_panels.js new file mode 100644 index 000..b1358be --- /dev/null +++ b/contrib/views/slider/src/main/resources/ui/app/mixins/with_panels.js @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Mixin for views that use Bootstrap.BsPanelComponent component + * Add caret for collapsed/expanded panels at the left of panel's title + * Usage: + * code + * App.SomeView = Em.View.extend(App.WithPanels, { + *didInsertElement: function() { + * this.addCarets(); + *} + * }); + * /code + * @type {Em.Mixin} + */ +App.WithPanels = Ember.Mixin.create({ + + /** + * Add caret before panel's title and add handlers for expand/collapse events + * Set caret-down when panel is expanded + * Set caret-right when panel is collapsed + * @method addArrows + */ + addCarets: function() { +var panel = $('.panel'); +panel.find('.panel-heading').prepend('span class=pull-left icon icon-caret-down/span'); +panel.on('hidden.bs.collapse', function (e) { + $(e.delegateTarget).find('span.icon').addClass('icon-caret-right').removeClass('icon-caret-down'); +}).on('shown.bs.collapse', function (e) { + $(e.delegateTarget).find('span.icon').addClass('icon-caret-down').removeClass('icon-caret-right'); + }); + } + +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/9588d2a9/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js index 6d6bfcc..bf02f30 100644 --- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js +++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js @@ -108,24 +108,6 @@ App.SliderApp = DS.Model.extend({ hiddenCategories: ['yarn-site', 'global'], /** - * Configs grouped to categories by site-objects - * @type {Array} - */ - configsByCategories: function () { -var configs = this.get('configs'), -hiddenCategories = this.get('hiddenCategories'), -groupedConfigs = []; -Ember.keys(configs).forEach(function (site) { - groupedConfigs.push({ -name: site, -configs: this.mapObject(configs[site]), -isVisible: !hiddenCategories.contains(site) - }); -}, this); -return groupedConfigs; - }.property('configs.@each'), - - /** * Display metrics only for running
git commit: AMBARI-7245. Can not get HDFS configs tab to load (just spinners)(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 9588d2a9c - 6722aba82 AMBARI-7245. Can not get HDFS configs tab to load (just spinners)(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6722aba8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6722aba8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6722aba8 Branch: refs/heads/trunk Commit: 6722aba8299d1d50a067928388102653b954f907 Parents: 9588d2a Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Wed Sep 10 20:45:57 2014 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Wed Sep 10 20:45:57 2014 +0300 -- .../server/upgrade/UpgradeCatalog170.java | 83 .../server/upgrade/UpgradeCatalog170Test.java | 27 ++- 2 files changed, 108 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6722aba8/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 ee67330..17750f9 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 @@ -18,6 +18,8 @@ package org.apache.ambari.server.upgrade; +import java.lang.reflect.Type; + import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -30,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import java.util.Date; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; @@ -39,6 +42,7 @@ import javax.persistence.criteria.Expression; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; +import com.google.common.reflect.TypeToken; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.AmbariManagementController; @@ -53,11 +57,14 @@ import org.apache.ambari.server.orm.dao.PrincipalTypeDAO; import org.apache.ambari.server.orm.dao.PrivilegeDAO; import org.apache.ambari.server.orm.dao.ResourceDAO; import org.apache.ambari.server.orm.dao.ResourceTypeDAO; +import org.apache.ambari.server.orm.dao.ConfigGroupConfigMappingDAO; import org.apache.ambari.server.orm.dao.UserDAO; import org.apache.ambari.server.orm.dao.ViewDAO; import org.apache.ambari.server.orm.dao.ViewInstanceDAO; import org.apache.ambari.server.orm.entities.ClusterEntity; import org.apache.ambari.server.orm.entities.HostRoleCommandEntity; +import org.apache.ambari.server.orm.entities.ConfigGroupConfigMappingEntity; +import org.apache.ambari.server.orm.entities.ClusterConfigEntity; import org.apache.ambari.server.orm.entities.HostRoleCommandEntity_; import org.apache.ambari.server.orm.entities.KeyValueEntity; import org.apache.ambari.server.orm.entities.PermissionEntity; @@ -73,6 +80,7 @@ import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.Config; import org.apache.ambari.server.state.ConfigHelper; +import org.apache.ambari.server.utils.StageUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -586,6 +594,81 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog { renamePigProperties(); upgradePermissionModel(); addJobsViewPermissions(); +moveConfigGroupsGlobalToEnv(); + } + + private void moveConfigGroupsGlobalToEnv() throws AmbariException { +final ConfigGroupConfigMappingDAO confGroupConfMappingDAO = injector.getInstance(ConfigGroupConfigMappingDAO.class); +ConfigHelper configHelper = injector.getInstance(ConfigHelper.class); +final ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class); +AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); +ListConfigGroupConfigMappingEntity configGroupConfigMappingEntities = confGroupConfMappingDAO.findAll(); +ListConfigGroupConfigMappingEntity configGroupsWithGlobalConfigs = new ArrayListConfigGroupConfigMappingEntity(); +Type type = new TypeTokenMapString, String() {}.getType(); + +for (ConfigGroupConfigMappingEntity entity : configGroupConfigMappingEntities) { + if (entity.getConfigType().equals(Configuration.GLOBAL_CONFIG_TAG)) { +configGroupsWithGlobalConfigs.add(entity); + } +} + +for (ConfigGroupConfigMappingEntity entity :
git commit: AMBARI-7224. Step 8 of installer is empty for 2.1.GlusterFS stack, then if click back button and next again, repositories show but no services. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 6722aba82 - 3c9bb86cb AMBARI-7224. Step 8 of installer is empty for 2.1.GlusterFS stack, then if click back button and next again, repositories show but no services. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c9bb86c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c9bb86c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c9bb86c Branch: refs/heads/trunk Commit: 3c9bb86cbed926e8024ecf992457cf8008369321 Parents: 6722aba Author: Jaimin Jetly jai...@hortonworks.com Authored: Wed Sep 10 11:01:53 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Wed Sep 10 11:01:53 2014 -0700 -- .../stacks/HDP/2.1.GlusterFS/services/STORM/metainfo.xml| 5 + .../stacks/HDP/2.1.GlusterFS/services/YARN/metainfo.xml | 1 + ambari-web/app/controllers/wizard/step5_controller.js | 2 +- ambari-web/app/controllers/wizard/step6_controller.js | 2 +- ambari-web/app/controllers/wizard/step8_controller.js | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3c9bb86c/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/STORM/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/STORM/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/STORM/metainfo.xml index 5145c02..0a6e730 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/STORM/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/STORM/metainfo.xml @@ -28,6 +28,7 @@ component nameNIMBUS/name + displayNameNimbus/displayName categoryMASTER/category cardinality1/cardinality dependencies @@ -48,6 +49,7 @@ component nameSTORM_REST_API/name + displayNameStorm REST API Server/displayName categoryMASTER/category cardinality1/cardinality commandScript @@ -59,6 +61,7 @@ component nameSUPERVISOR/name + displayNameSupervisor/displayName categorySLAVE/category cardinality1+/cardinality commandScript @@ -70,6 +73,7 @@ component nameSTORM_UI_SERVER/name + displayNameStorm UI Server/displayName categoryMASTER/category cardinality1/cardinality commandScript @@ -81,6 +85,7 @@ component nameDRPC_SERVER/name + displayNameDRPC Server/displayName categoryMASTER/category cardinality1/cardinality commandScript http://git-wip-us.apache.org/repos/asf/ambari/blob/3c9bb86c/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/metainfo.xml index fbe90fa..50c9818 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/metainfo.xml @@ -27,6 +27,7 @@ component nameAPP_TIMELINE_SERVER/name + displayNameApp Timeline Server/displayName categoryMASTER/category cardinality1/cardinality commandScript http://git-wip-us.apache.org/repos/asf/ambari/blob/3c9bb86c/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 fb8ccf7..e08e709 100644 --- a/ambari-web/app/controllers/wizard/step5_controller.js +++ b/ambari-web/app/controllers/wizard/step5_controller.js @@ -623,7 +623,7 @@ App.WizardStep5Controller = Em.Controller.extend(App.BlueprintMixin, { var componentObj = {}; componentObj.component_name = componentName; -componentObj.display_name = fullComponent.get('displayName'); +componentObj.display_name = App.format.role(fullComponent.get('componentName')); componentObj.serviceId = fullComponent.get('serviceName'); componentObj.isServiceCoHost = App.StackServiceComponent.find().findProperty('componentName', componentName).get('isCoHostedComponent') !this.get('isReassignWizard');
git commit: AMBARI-7249. Slider View: On Create app wizard's 'Allocate Resources' page inputs are updated, and changes are removed (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 3c9bb86cb - a3724c69c AMBARI-7249. Slider View: On Create app wizard's 'Allocate Resources' page inputs are updated, and changes are removed (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a3724c69 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a3724c69 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a3724c69 Branch: refs/heads/trunk Commit: a3724c69ccf0533b20befeef330c389abb64dc3c Parents: 3c9bb86 Author: Alex Antonenko hiv...@gmail.com Authored: Wed Sep 10 20:37:57 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Wed Sep 10 21:06:27 2014 +0300 -- .../ui/app/controllers/createAppWizard/step2_controller.js| 3 ++- .../slider/src/main/resources/ui/app/models/slider_app_type.js| 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a3724c69/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step2_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step2_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step2_controller.js index c9e57ff..c1ff3fe 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step2_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step2_controller.js @@ -72,6 +72,7 @@ App.CreateAppWizardStep2Controller = Ember.ArrayController.extend({ initializeNewApp: function () { var newApp = this.get('appWizardController.newApp'); this.set('newApp', newApp); +this.loadTypeComponents(); }, /** @@ -94,7 +95,7 @@ App.CreateAppWizardStep2Controller = Ember.ArrayController.extend({ }); this.set('content', content); } - }.observes('newApp.appType.components.length'), + }, /** * Check if param is integer http://git-wip-us.apache.org/repos/asf/ambari/blob/a3724c69/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js index fd58384..d161037 100644 --- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js +++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js @@ -31,7 +31,7 @@ App.SliderAppType = DS.Model.extend({ /** * @type {App.SliderAppTypeComponent[]} */ - components: DS.hasMany('sliderAppTypeComponent', {async:true}), + components: DS.hasMany('sliderAppTypeComponent'), /** * @type {string}
git commit: AMBARI-7250 Hive and ATS properties are not available on backend but available on UI(upgrade stack 2.0 - 2.1). (Buzhor Denys via atkach)
Repository: ambari Updated Branches: refs/heads/trunk a3724c69c - 475d45897 AMBARI-7250 Hive and ATS properties are not available on backend but available on UI(upgrade stack 2.0 - 2.1). (Buzhor Denys via atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/475d4589 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/475d4589 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/475d4589 Branch: refs/heads/trunk Commit: 475d458973bf52870d6d13aa5ee5566e05c6f66c Parents: a3724c6 Author: atkach atk...@hortonworks.com Authored: Wed Sep 10 21:18:44 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Wed Sep 10 21:18:44 2014 +0300 -- ambari-web/app/data/site_properties.js | 2 +- ambari-web/app/utils/config.js | 19 +-- 2 files changed, 18 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/475d4589/ambari-web/app/data/site_properties.js -- diff --git a/ambari-web/app/data/site_properties.js b/ambari-web/app/data/site_properties.js index cf837f0..02fa670 100644 --- a/ambari-web/app/data/site_properties.js +++ b/ambari-web/app/data/site_properties.js @@ -2528,7 +2528,7 @@ module.exports = isVisible: true, serviceName: MISC, filename: cluster-env.xml, - category: Users and Groups, + category: Users and Groups } ] }; http://git-wip-us.apache.org/repos/asf/ambari/blob/475d4589/ambari-web/app/utils/config.js -- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 1119287..16089d9 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -206,7 +206,7 @@ App.config = Em.Object.create({ /** * Function should be used post-install as precondition check should not be done only after installer wizard - * @param siteNames {string|array} + * @param siteNames {String|Array} * @returns {Array} */ getBySitename: function (siteNames) { @@ -360,6 +360,13 @@ App.config = Em.Object.create({ if (configsPropertyDef) { this.setServiceConfigUiAttributes(serviceConfigObj, configsPropertyDef); + // check if defined UI config present in config list obtained from server. + // in case when config is absent on server and defined UI config is required + // by server, this config should be ignored + var serverProperty = properties[serviceConfigObj.get('name')]; + if (!serverProperty serviceConfigObj.get('isRequiredByAgent')) { +continue; + } } if (!this.getBySitename(serviceConfigObj.get('filename')).someProperty('name', index)) { @@ -470,7 +477,7 @@ App.config = Em.Object.create({ * @param storedConfigs * @param advancedConfigs * @param selectedServiceNames - * @return {array} + * @return {Array} */ mergePreDefinedWithStored: function (storedConfigs, advancedConfigs, selectedServiceNames) { var mergedConfigs = []; @@ -584,6 +591,14 @@ App.config = Em.Object.create({ addAdvancedConfigs: function (serviceConfigs, advancedConfigs, serviceName) { var miscConfigs = serviceConfigs.filterProperty('serviceName', 'MISC'); var configsToVerifying = (serviceName) ? serviceConfigs.filterProperty('serviceName', serviceName).concat(miscConfigs) : serviceConfigs.slice(); +var definedConfigs = (serviceName) ? this.get('preDefinedServiceConfigs').findProperty('serviceName', serviceName).get('configs') : []; + +if (definedConfigs.length) { + advancedConfigs = advancedConfigs.filter(function(property) { +return !(definedConfigs.someProperty('name', property.name) !serviceConfigs.someProperty('name', property.name)); + }, this); +} + advancedConfigs.forEach(function (_config) { var configType = this.getConfigTagFromFileName(_config.filename); var configCategory = 'Advanced ' + configType;
git commit: AMBARI-7252. Decouple Slider View from ambari-server dependency (srimanth)
Repository: ambari Updated Branches: refs/heads/trunk 475d45897 - 11146fb67 AMBARI-7252. Decouple Slider View from ambari-server dependency (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/11146fb6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/11146fb6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/11146fb6 Branch: refs/heads/trunk Commit: 11146fb67456a40aeab9fc3f3e6973fd3cf9facd Parents: 475d458 Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Sep 10 12:25:28 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Wed Sep 10 13:02:19 2014 -0700 -- contrib/views/slider/pom.xml| 8 - .../view/slider/SliderAppsViewController.java | 5 + .../slider/SliderAppsViewControllerImpl.java| 262 + .../apache/ambari/view/slider/ViewStatus.java | 33 +-- .../view/slider/clients/AmbariClient.java | 3 - .../slider/clients/AmbariInternalClient.java| 292 --- .../slider/rest/client/JMXMetricHolder.java | 50 .../slider/rest/client/SliderAppJmxHelper.java | 1 - .../app/controllers/slider_apps_controller.js | 8 +- .../src/main/resources/ui/app/initialize.js | 19 +- .../views/slider/src/main/resources/view.xml| 23 +- 11 files changed, 174 insertions(+), 530 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/11146fb6/contrib/views/slider/pom.xml -- diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml index 31a7c7e..ec4089f 100644 --- a/contrib/views/slider/pom.xml +++ b/contrib/views/slider/pom.xml @@ -105,12 +105,6 @@ artifactIdgson/artifactId version2.2.2/version /dependency - dependency - groupIdorg.apache.ambari/groupId - artifactIdambari-server/artifactId - version${ambari.version}/version - scopeprovided/scope - /dependency !-- -- !-- Slider Dependencies (to be removed when Slider has Maven repository) -- @@ -398,8 +392,6 @@ nodejs.directory${basedir}/target/nodejs/nodejs.directory npm.version1.4.3/npm.version ui.directory${basedir}/src/main/resources/ui/ui.directory - !-- deprecated, moved to top component -- - !-- ambari.version1.3.0-SNAPSHOT/ambari.version -- hadoop.version2.6.0-SNAPSHOT/hadoop.version avro.version1.7.4/avro.version bigtop.version0.7.0/bigtop.version http://git-wip-us.apache.org/repos/asf/ambari/blob/11146fb6/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java -- diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java index 823fea6..70e333f 100644 --- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java +++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java @@ -30,6 +30,11 @@ import com.google.inject.ImplementedBy; @ImplementedBy(SliderAppsViewControllerImpl.class) public interface SliderAppsViewController { + public static final String PROPERTY_HDFS_ADDRESS = hdfs.address; + public static final String PROPERTY_YARN_RM_ADDRESS = yarn.resourcemanager.address; + public static final String PROPERTY_YARN_RM_SCHEDULER_ADDRESS = yarn.resourcemanager.scheduler.address; + public static final String PROPERTY_ZK_QUOROM = zookeeper.quorum; + public ViewStatus getViewStatus(); /** http://git-wip-us.apache.org/repos/asf/ambari/blob/11146fb6/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java -- diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java index 6b3b3f5..f17b66d 100644 --- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java +++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java @@ -35,12 +35,6 @@ import java.util.Set; import java.util.zip.ZipException; import
git commit: AMBARI-7254. Slider View: Slider view not initializing due to long parameter description (srimanth)
Repository: ambari Updated Branches: refs/heads/trunk 24a486a53 - 11c057d6d AMBARI-7254. Slider View: Slider view not initializing due to long parameter description (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/11c057d6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/11c057d6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/11c057d6 Branch: refs/heads/trunk Commit: 11c057d6d144eec02cb71fa8fe74d0103cf6ffad Parents: 24a486a Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Sep 10 18:55:56 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Wed Sep 10 18:55:56 2014 -0700 -- contrib/views/slider/src/main/resources/view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/11c057d6/contrib/views/slider/src/main/resources/view.xml -- diff --git a/contrib/views/slider/src/main/resources/view.xml b/contrib/views/slider/src/main/resources/view.xml index 87dfbe7..62258d5 100644 --- a/contrib/views/slider/src/main/resources/view.xml +++ b/contrib/views/slider/src/main/resources/view.xml @@ -35,7 +35,7 @@ limitations under the License. Kerberos, LDAP, Custom. Binary/Htt /parameter parameter namezookeeper.quorum/name -descriptionZooKeeper quorum location. Typically this is a comma separated list of ZooKeeper hostnames and port numbers. The port number can be got from the clientPort property in the zookeeper-env configuration. For example: zookeeper.host1:2181,zookeeper.host2:2181./description +descriptionZooKeeper quorum location. Typically this is a comma separated list of ZooKeeper hostnames and port numbers (clientPort property in the zookeeper-env). For example: zookeeper.host1:2181,zookeeper.host2:2181./description requiredfalse/required /parameter resource