[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' +}); + }, + + /** + *
[05/26] git commit: AMBARI-7243. Admin View: no way to link to instance if you create w/o a label via API. (akovalenko)
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/branch-alerts-dev 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
[19/26] git commit: AMBARI-7258 Slider View: FE - Make ganglia monitoring optional when creating app. (atkach)
AMBARI-7258 Slider View: FE - Make ganglia monitoring optional when creating app. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/43a4283b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/43a4283b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/43a4283b Branch: refs/heads/branch-alerts-dev Commit: 43a4283bbd1c4cec6ae26b104ab99be43d93a1ff Parents: daefe5d Author: atkach atk...@hortonworks.com Authored: Thu Sep 11 17:34:18 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Thu Sep 11 17:34:18 2014 +0300 -- .../assets/data/resource/service_configs.json | 38 ++ .../ui/app/components/configSection.js | 4 + .../createAppWizard/step1_controller.js | 41 ++- .../createAppWizard/step3_controller.js | 123 +-- .../src/main/resources/ui/app/helpers/ajax.js | 9 ++ .../resources/ui/app/models/config_property.js | 44 +++ .../ui/app/templates/common/config.hbs | 37 ++ .../app/templates/components/configSection.hbs | 29 +++-- .../src/main/resources/ui/app/translations.js | 1 + .../ui/app/views/common/config_set_view.js | 56 + 10 files changed, 358 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/43a4283b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json -- diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json new file mode 100644 index 000..f255bec --- /dev/null +++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json @@ -0,0 +1,38 @@ +{ + items : [ +{ + cluster_name : cl, + configurations : [ +{ + Config : { +cluster_name : cl + }, + type : ganglia-env, + tag : version1410432304443, + version : 1, + properties : { +rrdcached_timeout : 3600, +gmetad_user : nobody, +rrdcached_base_dir : /var/lib/ganglia/rrds, +rrdcached_write_threads : 4, +rrdcached_delay : 1800, +rrdcached_flush_timeout : 7200, +gmond_user : nobody, +ganglia_runtime_dir : /var/run/ganglia/hdp, +ganglia_custom_clusters: 'HBaseCluster1','7000','AccumuloCluster1','7001','HBaseCluster2','7002' + }, + properties_attributes : { } +} + ], + createtime : 1410432307174, + group_id : -1, + group_name : default, + hosts : [ ], + is_current : true, + service_config_version : 1, + service_config_version_note : Initial configurations for Ganglia, + service_name : GANGLIA, + user : admin +} + ] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/43a4283b/contrib/views/slider/src/main/resources/ui/app/components/configSection.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/components/configSection.js b/contrib/views/slider/src/main/resources/ui/app/components/configSection.js index 43a2427..bcdff12 100644 --- a/contrib/views/slider/src/main/resources/ui/app/components/configSection.js +++ b/contrib/views/slider/src/main/resources/ui/app/components/configSection.js @@ -46,8 +46,12 @@ App.ConfigSectionComponent = Em.Component.extend({ /** * Filtered configs for current section + * @type {Array} */ sectionConfigs: Ember.computed.filter('config', function (item) { +if (item.isSet) { + return item.section === this.get('section'); +} if (this.get('isGeneral')) { return !item.name.match('^site.') this.get('predefinedConfigNames').contains(item.name); } http://git-wip-us.apache.org/repos/asf/ambari/blob/43a4283b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js index b267170..9faaa32 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js @@ -82,6 +82,7 @@ App.CreateAppWizardStep1Controller = Ember.Controller.extend({ */ loadStep: function () { this.loadGangliaHost(); +this.loadGangliaClusters();
[09/26] git commit: AMBARI-7245. Can not get HDFS configs tab to load (just spinners)(vbrodetskyi)
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/branch-alerts-dev 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 : configGroupsWithGlobalConfigs) { + String configData =
[06/26] git commit: AMBARI-7239. Ambari items in /tmp (aonishuk)
AMBARI-7239. Ambari items in /tmp (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/adb87a44 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/adb87a44 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/adb87a44 Branch: refs/heads/branch-alerts-dev Commit: adb87a44792eaa588ace009ac92e68926ba0cc37 Parents: 3f9d5a5 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Sep 10 19:25:27 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Sep 10 19:25:27 2014 +0300 -- ambari-server/conf/unix/ambari.properties | 1 + .../server/api/services/ComponentService.java | 5 +++- .../api/services/HostComponentService.java | 5 +++- .../server/configuration/Configuration.java | 4 +++ .../internal/ClientConfigResourceProvider.java | 5 ++-- ambari-server/src/main/python/bootstrap.py | 24 ++-- .../ClientConfigResourceProviderTest.java | 16 +++ ambari-server/src/test/python/TestBootstrap.py | 29 8 files changed, 71 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/adb87a44/ambari-server/conf/unix/ambari.properties -- diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index b77ae32..41cada7 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -31,6 +31,7 @@ bootstrap.script=/usr/lib/python2.6/site-packages/ambari_server/bootstrap.py bootstrap.setup_agent.script=/usr/lib/python2.6/site-packages/ambari_server/setupAgent.py recommendations.dir=/var/run/ambari-server/stack-recommendations stackadvisor.script=/var/lib/ambari-server/resources/scripts/stack_advisor.py +server.tmp.dir=/var/lib/ambari-server/tmp api.authenticate=true server.connection.max.idle.millis=90 http://git-wip-us.apache.org/repos/asf/ambari/blob/adb87a44/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java index 16a8ffa..5510697 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java @@ -20,6 +20,7 @@ package org.apache.ambari.server.api.services; import com.google.inject.Inject; import org.apache.ambari.server.api.resources.ResourceInstance; +import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.spi.ClusterController; import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.controller.utilities.ClusterControllerHelper; @@ -231,7 +232,9 @@ public class ComponentService extends BaseService { } Response.ResponseBuilder rb = Response.status(Response.Status.OK); -File file = new File(/tmp/ambari-server/+componentName+-configs.tar.gz); +Configuration configs = new Configuration(); +String tmpDir = configs.getProperty(Configuration.SERVER_TMP_DIR_KEY); +File file = new File(tmpDir+File.separator+componentName+-configs.tar.gz); InputStream resultInputStream = null; try { resultInputStream = new FileInputStream(file); http://git-wip-us.apache.org/repos/asf/ambari/blob/adb87a44/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java index 35c7826..4990ad7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java @@ -32,6 +32,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import org.apache.ambari.server.api.resources.ResourceInstance; +import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.spi.Resource; /** @@ -270,7 +271,9 @@ public class HostComponentService extends BaseService { } Response.ResponseBuilder rb = Response.status(Response.Status.OK); -File file = new File(/tmp/ambari-server/+hostComponentName+-configs.tar.gz); +Configuration configs = new Configuration(); +String tmpDir =
[12/26] 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)
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/branch-alerts-dev 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;
[13/26] git commit: AMBARI-7252. Decouple Slider View from ambari-server dependency (srimanth)
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/branch-alerts-dev 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 org.apache.ambari.view.ViewContext; -import
[24/26] git commit: AMBARI-7265. Error message present at UI after Install by Blueprints or after Upgrade (aonishuk)
AMBARI-7265. Error message present at UI after Install by Blueprints or after Upgrade (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e293b67f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e293b67f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e293b67f Branch: refs/heads/branch-alerts-dev Commit: e293b67f6b1893596046c1153483ceb56c1aa1dd Parents: 701165b Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Sep 11 20:46:59 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Sep 11 20:46:59 2014 +0300 -- .../internal/BaseBlueprintProcessor.java| 7 +- .../internal/BlueprintResourceProviderTest.java | 15 ++ .../internal/ClusterResourceProviderTest.java | 226 --- 3 files changed, 216 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e293b67f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java index c9f0124..9c10ac1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java @@ -26,6 +26,7 @@ import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.controller.StackConfigurationRequest; import org.apache.ambari.server.controller.StackConfigurationResponse; +import org.apache.ambari.server.controller.StackLevelConfigurationRequest; import org.apache.ambari.server.controller.StackServiceComponentRequest; import org.apache.ambari.server.controller.StackServiceComponentResponse; import org.apache.ambari.server.controller.StackServiceRequest; @@ -41,6 +42,7 @@ import org.apache.ambari.server.orm.entities.HostGroupEntity; import org.apache.ambari.server.state.AutoDeployInfo; import org.apache.ambari.server.state.ConfigHelper; import org.apache.ambari.server.state.DependencyInfo; +import org.apache.ambari.server.state.PropertyInfo; import java.util.Collection; import java.util.Collections; @@ -816,7 +818,10 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP SetStackConfigurationResponse serviceConfigs = ambariManagementController.getStackConfigurations( Collections.singleton(new StackConfigurationRequest(name, version, service, null))); - + SetStackConfigurationResponse stackLevelConfigs = ambariManagementController.getStackLevelConfigurations( + Collections.singleton(new StackLevelConfigurationRequest(name, version, null))); + serviceConfigs.addAll(stackLevelConfigs); + for (StackConfigurationResponse config : serviceConfigs) { String type = config.getType(); //strip .xml from type http://git-wip-us.apache.org/repos/asf/ambari/blob/e293b67f/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java index 84cc2a9..3b3ec5f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java @@ -19,11 +19,13 @@ package org.apache.ambari.server.controller.internal; import com.google.gson.Gson; + import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.controller.StackConfigurationRequest; import org.apache.ambari.server.controller.StackConfigurationResponse; +import org.apache.ambari.server.controller.StackLevelConfigurationRequest; import org.apache.ambari.server.controller.StackServiceComponentRequest; import org.apache.ambari.server.controller.StackServiceComponentResponse; import org.apache.ambari.server.controller.StackServiceRequest; @@ -60,6 +62,7 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertEquals; import static
[03/26] git commit: AMBARI-7211 - Views : support for a system property
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/branch-alerts-dev 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); setResourceProperty(resource, VIEW_STATUS_PROPERTY_ID,
[02/26] git commit: AMBARI-7240. Change the way oozie uploads sharelib into hdfs (aonishuk)
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/branch-alerts-dev 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 \ 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/params.py
[20/26] git commit: AMBARI-7259. Slider View: Configuration section on Deploy page should have its own scrollbar (alexantonenko)
AMBARI-7259. Slider View: Configuration section on Deploy page should have its own scrollbar (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c405d5fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c405d5fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c405d5fe Branch: refs/heads/branch-alerts-dev Commit: c405d5feee32cab500a9d5c0e7c29666942fe538 Parents: 43a4283 Author: Alex Antonenko hiv...@gmail.com Authored: Thu Sep 11 17:39:12 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Thu Sep 11 17:39:12 2014 +0300 -- .../views/slider/src/main/resources/ui/app/styles/application.less | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c405d5fe/contrib/views/slider/src/main/resources/ui/app/styles/application.less -- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index b7f385a..891c991 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -355,6 +355,7 @@ a { } pre { margin-left: 30px; + max-height: 124px; } } #step2 {
[22/26] git commit: AMBARI-7262. Slider View: Flex action for running app not showing user input dialog (regression). (onechiporenko)
AMBARI-7262. Slider View: Flex action for running app not showing user input dialog (regression). (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b0fee6d4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b0fee6d4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b0fee6d4 Branch: refs/heads/branch-alerts-dev Commit: b0fee6d4c6546f650d2e255dd646a52b6dc6d46f Parents: a2f0bcd Author: Oleg Nechiporenko onechipore...@apache.org Authored: Thu Sep 11 18:39:56 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Thu Sep 11 18:39:56 2014 +0300 -- .../resources/ui/app/assets/data/apps/apps.json | 16 ++- .../ui/app/controllers/slider_app_controller.js | 127 --- .../ui/app/mappers/slider_apps_mapper.js| 4 +- .../resources/ui/app/styles/application.less| 15 ++- .../ui/app/templates/slider_app/flex_popup.hbs | 39 ++ .../src/main/resources/ui/app/translations.js | 5 +- 6 files changed, 182 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b0fee6d4/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 d774387..63aa0be 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 @@ -83,7 +83,7 @@ components : { HBASE_MASTER : { componentName : HBASE_MASTER, - instanceCount : 1, + instanceCount : 2, activeContainers : { container_1409333994422_0005_01_02 : { released : false, @@ -98,6 +98,20 @@ exitCode : 0, diagnostics : , roleId : 1 +}, +container_1409333994422_0005_01_03 : { + released : false, + startTime : 1409348511279, + createTime : 1409348510529, + environment : [AGENT_WORK_ROOT=\$PWD\, HADOOP_USER_NAME=\yarn\, AGENT_LOG_ROOT=\$LOG_DIRS\, PYTHONPATH=\./infra/agent/slider-agent/\, SLIDER_PASSPHRASE=\DEV\], + host : Ñ6402.ambari.apache.org, + name : container_1409333994422_0005_01_02, + command : python ./infra/agent/slider-agent/agent/main.py --label container_1409333994422_0005_01_02___HBASE_MASTER --zk-quorum Ñ6401.ambari.apache.org:2181 --zk-reg-path /registry/org-apache-slider/h4 ; , + state : 3, + role : HBASE_MASTER, + exitCode : 0, + diagnostics : , + roleId : 1 } }, completedContainers : { } http://git-wip-us.apache.org/repos/asf/ambari/blob/b0fee6d4/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js index f160383..e78a1b3 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js @@ -126,24 +126,82 @@ App.SliderAppController = Ember.ObjectController.extend({ }, /** + * Buttons for Flex modal popup + * @type {Em.Object[]} + */ + flexModalButtons: [ +Ember.Object.create({title: Em.I18n.t('common.cancel'), clicked:closeFlex, dismiss: 'modal'}), +Ember.Object.create({title: Em.I18n.t('common.send'), clicked:submitFlex, type:'success'}) + ], + + /** + * Grouped components by name + * @type {{name: string, count: number}[]} + */ + groupedComponents: [], + + /** + * Group components by codecomponentName/code and save them to codegroupedComponents/code + * @method groupComponents + */ + groupComponents: function() { +var groupedComponents = this.get('appType.components').map(function(c) { + return { +name: c.get('name'), +count: 0 + }; +}); + +this.get('components').forEach(function(component) { + var name = component.get('componentName'), +group = groupedComponents.findBy('name', name); + if (group) { +group.count++; + } +}); +this.set('groupedComponents', groupedComponents); + }, + + /** + * Does new instance counts are invalid + * @type {bool} + */ + groupedComponentsHaveErrors: false, + + /** + *
[16/26] git commit: AMBARI-7255 Slider View: Create slider app should have add/remove/cancel buttons consistent with Ambari. (ababiichuk)
AMBARI-7255 Slider View: Create slider app should have add/remove/cancel buttons consistent with Ambari. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/71c98457 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/71c98457 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/71c98457 Branch: refs/heads/branch-alerts-dev Commit: 71c984577ff80b1ea0adecd50badf4f632114423 Parents: 11c057d Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Thu Sep 11 12:55:33 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Thu Sep 11 12:55:33 2014 +0300 -- .../ui/app/components/configSection.js | 12 ++- .../resources/ui/app/styles/application.less| 7 +- .../app/templates/components/configSection.hbs | 90 ++-- .../src/main/resources/ui/app/translations.js | 4 +- 4 files changed, 63 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/71c98457/contrib/views/slider/src/main/resources/ui/app/components/configSection.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/components/configSection.js b/contrib/views/slider/src/main/resources/ui/app/components/configSection.js index c5858bc..43a2427 100644 --- a/contrib/views/slider/src/main/resources/ui/app/components/configSection.js +++ b/contrib/views/slider/src/main/resources/ui/app/components/configSection.js @@ -92,6 +92,15 @@ App.ConfigSectionComponent = Em.Component.extend({ }); }, + addPropertyModalButtons: [ +Ember.Object.create({title: Em.I18n.t('common.cancel'), clicked:discard, dismiss: 'modal'}), +Ember.Object.create({title: Em.I18n.t('common.add'), clicked:submit, type:'success'}) + ], + + addPropertyModalTitle: Em.I18n.t('configs.add_property'), + + tooltipRemove: Em.I18n.t('common.remove'), + actions: { /** @@ -99,7 +108,7 @@ App.ConfigSectionComponent = Em.Component.extend({ * @method addProperty */ addProperty: function() { - this.toggleProperty('buttonVisible'); + return Bootstrap.ModalManager.show('addPropertyModal'); }, /** @@ -116,6 +125,7 @@ App.ConfigSectionComponent = Em.Component.extend({ * @method submit */ submit: function() { + Bootstrap.ModalManager.hide('addPropertyModal'); var name = this.get('newConfig.name'), value = this.get('newConfig.value'); if (this.get('config').mapBy('name').contains(name)) { http://git-wip-us.apache.org/repos/asf/ambari/blob/71c98457/contrib/views/slider/src/main/resources/ui/app/styles/application.less -- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index f5024a1..eb71c9a 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -19,7 +19,12 @@ html { overflow-y: scroll; } - +.icon-minus-sign { + color: #FF4B4B; +} +.tooltip { + z-index: 1500; +} .popover { max-width: 800px; } http://git-wip-us.apache.org/repos/asf/ambari/blob/71c98457/contrib/views/slider/src/main/resources/ui/app/templates/components/configSection.hbs -- diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/components/configSection.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/components/configSection.hbs index c6c77ec..b0d1db7 100644 --- a/contrib/views/slider/src/main/resources/ui/app/templates/components/configSection.hbs +++ b/contrib/views/slider/src/main/resources/ui/app/templates/components/configSection.hbs @@ -17,60 +17,56 @@ }} {{#bs-panel heading=sectionLabel collapsible=true dismiss=false open=isGeneral }} - form class=form-horizontal role=form -{{#each config in sectionConfigs}} - div class=form-group - -label class=col-sm-4 control-label{{formatWordBreak config.label devider='.'}}/label - -div class=col-sm-6 - {{input value=config.value class=form-control}} -/div +form class=form-horizontal role=form + {{#each config in sectionConfigs}} + div class=form-group + label class=col-sm-4 control-label{{formatWordBreak config.label devider='.'}}/label + div class=col-sm-6 +{{input value=config.value class=form-control}} + /div +{{#if isCustom}} +div class=col-sm-2 + {{#bs-button clicked=deleteConfig clickedParamBinding=config}} +
[18/26] git commit: AMBARI-7256. Slider View: Create app wizard's 'Allocate Resources' page should have smaller text boxes (alexantonenko)
AMBARI-7256. Slider View: Create app wizard's 'Allocate Resources' page should have smaller text boxes (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/daefe5da Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/daefe5da Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/daefe5da Branch: refs/heads/branch-alerts-dev Commit: daefe5daaa5c3c3e6b4586db2a7e2ed55c9e61a1 Parents: da78f17 Author: Alex Antonenko hiv...@gmail.com Authored: Thu Sep 11 16:04:34 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Thu Sep 11 16:04:34 2014 +0300 -- .../slider/src/main/resources/ui/app/styles/application.less | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/daefe5da/contrib/views/slider/src/main/resources/ui/app/styles/application.less -- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index eb71c9a..b7f385a 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -359,16 +359,18 @@ a { } #step2 { .table-container { - max-height: 225px; + max-height: 248px; border: 1px solid #e3e3e3; padding: 5px; - margin-bottom: 20px; - overflow-y: auto; border-radius: 4px; + overflow: hidden; .components-table { width: 100%; border-spacing: 10px; border-collapse: separate; +input{ + width: 124px; +} } margin-bottom: 30px; }
[14/26] git commit: AMBARI-7251.Configs: hover dialog needs a delay(XIWANG)
AMBARI-7251.Configs: hover dialog needs a delay(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/24a486a5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24a486a5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24a486a5 Branch: refs/heads/branch-alerts-dev Commit: 24a486a5340d58f7fe459d7bcd613a5f90b01894 Parents: 11146fb Author: Xi Wang xiw...@apache.org Authored: Wed Sep 10 12:14:09 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Wed Sep 10 13:44:19 2014 -0700 -- ambari-web/app/styles/application.less | 9 +- .../views/common/configs/config_history_flow.js | 5 + ambari-web/vendor/scripts/jquery.hoverIntent.js | 115 +++ 3 files changed, 123 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/24a486a5/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index eb33e6d..31ddc76 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -4964,7 +4964,7 @@ ul.inline li { margin-top: -5px; .version-slider { width: 100%; -height: 64px; +height: 58px; margin: 5px 0; .flow-element { width: 18.5%; @@ -4985,7 +4985,7 @@ ul.inline li { font-size: 11px; .top-label { min-width: 20px; - padding: 3px 2px; + padding: 0px 2px; } .author, .content { @@ -5011,7 +5011,7 @@ ul.inline li { .version-box .version-popover { display: none; position: absolute; -bottom: 58px; +bottom: 50px; left: -45px; z-index: 1000; float: left; @@ -5044,9 +5044,6 @@ ul.inline li { } } .version-box:hover{ -.version-popover { - display: block; -} .box { background-color: #e6f1f6; } http://git-wip-us.apache.org/repos/asf/ambari/blob/24a486a5/ambari-web/app/views/common/configs/config_history_flow.js -- diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js index d7d8d3f..1fe7d23 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -142,6 +142,11 @@ App.ConfigHistoryFlowView = Em.View.extend({ }, didInsertElement: function () { +$('.version-box').hoverIntent(function() { + $(this).find('.version-popover').delay(800).fadeIn(400); +}, function() { + $(this).find('.version-popover').hide(); +}); App.tooltip(this.$('[data-toggle=tooltip]'),{ placement: 'bottom' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/24a486a5/ambari-web/vendor/scripts/jquery.hoverIntent.js -- diff --git a/ambari-web/vendor/scripts/jquery.hoverIntent.js b/ambari-web/vendor/scripts/jquery.hoverIntent.js new file mode 100644 index 000..ae2544c --- /dev/null +++ b/ambari-web/vendor/scripts/jquery.hoverIntent.js @@ -0,0 +1,115 @@ +/*! + * hoverIntent v1.8.0 // 2014.06.29 // jQuery v1.9.1+ + * http://cherne.net/brian/resources/jquery.hoverIntent.html + * + * You may use hoverIntent under the terms of the MIT license. Basically that + * means you are free to use hoverIntent as long as this header is left intact. + * Copyright 2007, 2014 Brian Cherne + */ + +/* hoverIntent is similar to jQuery's built-in hover method except that + * instead of firing the handlerIn function immediately, hoverIntent checks + * to see if the user's mouse has slowed down (beneath the sensitivity + * threshold) before firing the event. The handlerOut function is only + * called after a matching handlerIn. + * + * // basic usage ... just like .hover() + * .hoverIntent( handlerIn, handlerOut ) + * .hoverIntent( handlerInOut ) + * + * // basic usage ... with event delegation! + * .hoverIntent( handlerIn, handlerOut, selector ) + * .hoverIntent( handlerInOut, selector ) + * + * // using a basic configuration object + * .hoverIntent( config ) + * + * @param handlerIn function OR configuration object + * @param handlerOut function OR selector for delegation OR undefined + * @param selectorselector OR undefined + * @author Brian Cherne brian(at)cherne(dot)net + */ +(function($) { + $.fn.hoverIntent = function(handlerIn,handlerOut,selector) { + +// default configuration values +var cfg = { + interval: 100, + sensitivity: 6, + timeout: 0 +}; + +if ( typeof handlerIn ===
[11/26] git commit: AMBARI-7249. Slider View: On Create app wizard's 'Allocate Resources' page inputs are updated, and changes are removed (alexantonenko)
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/branch-alerts-dev 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}
[15/26] git commit: AMBARI-7254. Slider View: Slider view not initializing due to long parameter description (srimanth)
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/branch-alerts-dev 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
[04/26] git commit: AMBARI-7237. No start action for stopped service in MM mode Stack 1.3 (dlysnichenko)
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/branch-alerts-dev 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 org.easymock.EasyMock.reset; import static org.easymock.EasyMock.verify;
[26/26] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2262400c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2262400c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2262400c Branch: refs/heads/branch-alerts-dev Commit: 2262400c6057aec451027f432b83f2c88ac1d8c3 Parents: 05da121 3035978 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Thu Sep 11 15:02:05 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Sep 11 15:02:05 2014 -0400 -- .../ui/admin-web/app/scripts/services/View.js | 6 +- .../app/views/ambariViews/listTable.html| 2 +- ambari-server/conf/unix/ambari.properties | 1 + .../server/api/services/ComponentService.java | 5 +- .../api/services/HostComponentService.java | 5 +- .../server/configuration/Configuration.java | 4 + .../controller/RequestStatusResponse.java | 12 + .../internal/AbstractResourceProvider.java | 3 + .../AmbariPrivilegeResourceProvider.java| 8 +- .../internal/BaseBlueprintProcessor.java| 7 +- .../internal/ClientConfigResourceProvider.java | 5 +- .../internal/ClusterResourceProvider.java | 17 +- .../internal/ServiceResourceProvider.java | 14 +- .../internal/ViewVersionResourceProvider.java | 3 + .../server/orm/entities/AlertCurrentEntity.java | 19 ++ .../ambari/server/orm/entities/ViewEntity.java | 29 +- .../server/upgrade/UpgradeCatalog161.java | 2 +- .../server/upgrade/UpgradeCatalog170.java | 86 ++ .../server/view/configuration/ViewConfig.java | 14 + ambari-server/src/main/python/bootstrap.py | 24 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 3 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 3 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 3 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 3 +- .../services/HIVE/package/scripts/params.py | 6 +- .../services/OOZIE/package/scripts/oozie.py | 2 +- .../OOZIE/package/scripts/oozie_service.py | 2 +- .../services/OOZIE/package/scripts/params.py| 10 + .../2.1.GlusterFS/services/STORM/metainfo.xml | 5 + .../2.1.GlusterFS/services/YARN/metainfo.xml| 1 + .../AmbariPrivilegeResourceProviderTest.java| 1 + .../internal/BlueprintResourceProviderTest.java | 15 + .../ClientConfigResourceProviderTest.java | 16 +- .../internal/ClusterResourceProviderTest.java | 239 --- .../internal/RequestResourceProviderTest.java | 16 +- .../internal/ServiceResourceProviderTest.java | 122 +++- .../server/orm/entities/ViewEntityTest.java | 11 + .../server/upgrade/UpgradeCatalog161Test.java | 2 +- .../server/upgrade/UpgradeCatalog170Test.java | 49 +++- .../view/configuration/ViewConfigTest.java | 23 ++ ambari-server/src/test/python/TestBootstrap.py | 29 +- ambari-web/app/app.js | 3 + .../app/controllers/wizard/step5_controller.js | 2 +- .../app/controllers/wizard/step6_controller.js | 2 +- .../app/controllers/wizard/step8_controller.js | 2 +- ambari-web/app/data/HDP2/config_mapping.js | 4 +- ambari-web/app/data/config_mapping.js | 4 +- ambari-web/app/data/site_properties.js | 2 +- ambari-web/app/styles/application.less | 9 +- .../common/configs/config_history_flow.hbs | 12 +- .../main/dashboard/widgets/cluster_metrics.hbs | 2 +- .../main/dashboard/widgets/hbase_links.hbs | 2 +- .../main/dashboard/widgets/hdfs_links.hbs | 2 +- .../main/dashboard/widgets/mapreduce_links.hbs | 2 +- .../main/dashboard/widgets/mapreduce_slots.hbs | 2 +- .../main/dashboard/widgets/pie_chart.hbs| 2 +- .../main/dashboard/widgets/simple_text.hbs | 2 +- .../templates/main/dashboard/widgets/uptime.hbs | 2 +- ambari-web/app/utils/config.js | 19 +- .../views/common/configs/config_history_flow.js | 5 + ambari-web/app/views/main/dashboard/widget.js | 4 +- ambari-web/app/views/main/dashboard/widgets.js | 14 + ambari-web/vendor/scripts/jquery.hoverIntent.js | 115 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 - .../resources/ui/app/assets/data/apps/apps.json | 16
[17/26] git commit: AMBARI-7248. No deprecation warning after creating blueprint with global configs (aonishuk)
AMBARI-7248. No deprecation warning after creating blueprint with global configs (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/da78f178 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/da78f178 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/da78f178 Branch: refs/heads/branch-alerts-dev Commit: da78f17816e9fa30d8d7dc9decea642ebfe5e37a Parents: 71c9845 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Sep 11 14:28:44 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Sep 11 14:28:44 2014 +0300 -- .../server/controller/RequestStatusResponse.java | 12 .../internal/AbstractResourceProvider.java | 3 +++ .../internal/ClusterResourceProvider.java | 17 - .../internal/ClusterResourceProviderTest.java | 13 +++-- .../internal/RequestResourceProviderTest.java | 16 +++- 5 files changed, 49 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/da78f178/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestStatusResponse.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestStatusResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestStatusResponse.java index d6eabf4..26d866d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestStatusResponse.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestStatusResponse.java @@ -31,6 +31,11 @@ public class RequestStatusResponse { private String logs; /** + * Request message + */ + private String message; + + /** * Request context */ private String requestContext; @@ -78,4 +83,11 @@ public class RequestStatusResponse { this.requestContext = requestContext; } + public String getMessage() { +return message; + } + + public void setMessage(String message) { +this.message = message; + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/da78f178/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java index d14cdf3..2c25623 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java @@ -206,6 +206,9 @@ public abstract class AbstractResourceProvider extends BaseProvider implements R protected RequestStatus getRequestStatus(RequestStatusResponse response, SetResource associatedResources) { if (response != null){ Resource requestResource = new ResourceImpl(Resource.Type.Request); + if (response.getMessage() != null){ +requestResource.setProperty(PropertyHelper.getPropertyId(Requests, message), response.getMessage()); + } requestResource.setProperty(PropertyHelper.getPropertyId(Requests, id), response.getRequestId()); requestResource.setProperty(PropertyHelper.getPropertyId(Requests, status), InProgress); return new RequestStatusImpl(requestResource, associatedResources); http://git-wip-us.apache.org/repos/asf/ambari/blob/da78f178/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java index 3307b59..f40979c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java @@ -43,6 +43,7 @@ import org.apache.ambari.server.controller.spi.SystemException; import org.apache.ambari.server.controller.spi.UnsupportedPropertyException; import org.apache.ambari.server.controller.utilities.PropertyHelper; import org.apache.ambari.server.orm.dao.BlueprintDAO; +import org.apache.ambari.server.orm.entities.BlueprintConfigEntity; import org.apache.ambari.server.orm.entities.BlueprintEntity; import org.apache.ambari.server.orm.entities.HostGroupEntity; import
[23/26] git commit: AMBARI-7264. Dashboard widgets on moving strangeness. (akovalenko)
AMBARI-7264. Dashboard widgets on moving strangeness. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/701165b6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/701165b6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/701165b6 Branch: refs/heads/branch-alerts-dev Commit: 701165b66eff9214ed22d65f0e2c2b8c62f0137c Parents: b0fee6d Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Thu Sep 11 19:39:15 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Thu Sep 11 19:43:06 2014 +0300 -- .../main/dashboard/widgets/cluster_metrics.hbs| 2 +- .../templates/main/dashboard/widgets/hbase_links.hbs | 2 +- .../templates/main/dashboard/widgets/hdfs_links.hbs | 2 +- .../main/dashboard/widgets/mapreduce_links.hbs| 2 +- .../main/dashboard/widgets/mapreduce_slots.hbs| 2 +- .../templates/main/dashboard/widgets/pie_chart.hbs| 2 +- .../templates/main/dashboard/widgets/simple_text.hbs | 2 +- .../app/templates/main/dashboard/widgets/uptime.hbs | 2 +- ambari-web/app/views/main/dashboard/widget.js | 4 ++-- ambari-web/app/views/main/dashboard/widgets.js| 14 ++ 10 files changed, 24 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/701165b6/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs -- diff --git a/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs b/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs index eef559d..6156906 100644 --- a/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs +++ b/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs @@ -19,7 +19,7 @@ div class=cluster-metrics ul li class=thumbnail row - a class=corner-icon span1 href=# {{action deleteWidget target=view}} + a {{bindAttr class=:corner-icon :span1 view.parentView.isMoving:hidden}} href=# {{action deleteWidget target=view}} i class=icon-remove-sign icon-large/i /a div class=caption span10{{view.title}}/div http://git-wip-us.apache.org/repos/asf/ambari/blob/701165b6/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs -- diff --git a/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs b/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs index d7501f4..66d5d23 100644 --- a/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs +++ b/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs @@ -19,7 +19,7 @@ div class=links ul li class=thumbnail row - a class=corner-icon span1 href=# {{action deleteWidget target=view}}i class=icon-remove-sign icon-large/i/a + a {{bindAttr class=:corner-icon :span1 view.parentView.isMoving:hidden}} href=# {{action deleteWidget target=view}}i class=icon-remove-sign icon-large/i/a div class=caption span10 {{view.title}}/div div class=widget-content http://git-wip-us.apache.org/repos/asf/ambari/blob/701165b6/ambari-web/app/templates/main/dashboard/widgets/hdfs_links.hbs -- diff --git a/ambari-web/app/templates/main/dashboard/widgets/hdfs_links.hbs b/ambari-web/app/templates/main/dashboard/widgets/hdfs_links.hbs index 2d26c3a..9be5ba4 100644 --- a/ambari-web/app/templates/main/dashboard/widgets/hdfs_links.hbs +++ b/ambari-web/app/templates/main/dashboard/widgets/hdfs_links.hbs @@ -19,7 +19,7 @@ div class=links ul li class=thumbnail row -a class=corner-icon span1 href=# {{action deleteWidget target=view}} +a {{bindAttr class=:corner-icon :span1 view.parentView.isMoving:hidden}} href=# {{action deleteWidget target=view}} i class=icon-remove-sign icon-large/i /a div class=caption span10 {{view.title}}/div http://git-wip-us.apache.org/repos/asf/ambari/blob/701165b6/ambari-web/app/templates/main/dashboard/widgets/mapreduce_links.hbs -- diff --git a/ambari-web/app/templates/main/dashboard/widgets/mapreduce_links.hbs b/ambari-web/app/templates/main/dashboard/widgets/mapreduce_links.hbs index 15c8a18..13d6f41 100644 --- a/ambari-web/app/templates/main/dashboard/widgets/mapreduce_links.hbs +++ b/ambari-web/app/templates/main/dashboard/widgets/mapreduce_links.hbs @@ -19,7 +19,7 @@ div class=links ul li class=thumbnail row - a class=corner-icon span1 href=# {{action deleteWidget target=view}} + a {{bindAttr class=:corner-icon :span1 view.parentView.isMoving:hidden}} href=# {{action deleteWidget
git commit: AMBARI-7221 - Ambari Server REST API Memory Leak (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 4209a4929 - 33557337b 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/33557337 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/33557337 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/33557337 Branch: refs/heads/trunk Commit: 33557337bb7bc917fa08509587031e077652803d Parents: 4209a49 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Sep 9 21:30:46 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Fri Sep 12 19:47:24 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/33557337/ambari-server/conf/unix/ambari.properties -- diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index 41cada7..f1bb88c 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -53,3 +53,6 @@ agent.threadpool.size.max=25 # linux open-file limit ulimit.open.files=1 + +# Server HTTP settings +server.http.session.inactive_timeout=1800 http://git-wip-us.apache.org/repos/asf/ambari/blob/33557337/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 78fd7b6..9bdbc31 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 @@ -261,12 +261,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; @@ -310,6 +309,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; @@ -404,7 +405,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)); @@ -467,14 +468,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; } @@ -490,8 +491,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
[27/30] git commit: AMBARI-7287. Slider View: Unable to see added config in create slider app wizard (alexantonenko)
AMBARI-7287. Slider View: Unable to see added config in create slider app wizard (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/85a89775 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/85a89775 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/85a89775 Branch: refs/heads/branch-alerts-dev Commit: 85a8977582171013394604a0308575267c96cbb1 Parents: fc569f1 Author: Alex Antonenko hiv...@gmail.com Authored: Fri Sep 12 21:01:24 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Sat Sep 13 01:30:49 2014 +0300 -- .../slider/src/main/resources/ui/app/components/configSection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/85a89775/contrib/views/slider/src/main/resources/ui/app/components/configSection.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/components/configSection.js b/contrib/views/slider/src/main/resources/ui/app/components/configSection.js index bcdff12..a1608d2 100644 --- a/contrib/views/slider/src/main/resources/ui/app/components/configSection.js +++ b/contrib/views/slider/src/main/resources/ui/app/components/configSection.js @@ -146,7 +146,7 @@ App.ConfigSectionComponent = Em.Component.extend({ }); return; } - this.get('config').pushObject({name: name, value: value, label: name}); + this.get('config').pushObject(App.ConfigProperty.create({name: name, value: value, label: name})); this.cleanNewConfig(); this.toggleProperty('buttonVisible'); },
[29/30] 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/33557337 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/33557337 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/33557337 Branch: refs/heads/branch-alerts-dev Commit: 33557337bb7bc917fa08509587031e077652803d Parents: 4209a49 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Sep 9 21:30:46 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Fri Sep 12 19:47:24 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/33557337/ambari-server/conf/unix/ambari.properties -- diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index 41cada7..f1bb88c 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -53,3 +53,6 @@ agent.threadpool.size.max=25 # linux open-file limit ulimit.open.files=1 + +# Server HTTP settings +server.http.session.inactive_timeout=1800 http://git-wip-us.apache.org/repos/asf/ambari/blob/33557337/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 78fd7b6..9bdbc31 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 @@ -261,12 +261,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; @@ -310,6 +309,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; @@ -404,7 +405,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)); @@ -467,14 +468,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; } @@ -490,8 +491,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
[25/30] git commit: AMBARI-7227 - Views : Extract System view on ambari-server setup
AMBARI-7227 - Views : Extract System view on ambari-server setup Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/093ed17d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/093ed17d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/093ed17d Branch: refs/heads/branch-alerts-dev Commit: 093ed17d46e6b3e2e1528e27e4cbd42e18a9d610 Parents: bd28cd9 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Thu Sep 11 16:38:57 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Fri Sep 12 14:59:48 2014 -0400 -- .../ambari/server/view/ViewArchiveUtility.java | 120 ++ .../ambari/server/view/ViewExtractor.java | 223 ++ .../apache/ambari/server/view/ViewRegistry.java | 429 ++- ambari-server/src/main/python/ambari-server.py | 29 ++ .../AmbariPrivilegeResourceProviderTest.java| 2 +- .../ViewPrivilegeResourceProviderTest.java | 2 +- .../ambari/server/view/ViewExtractorTest.java | 262 +++ .../ambari/server/view/ViewRegistryTest.java| 105 +++-- .../src/test/python/TestAmbariServer.py | 8 +- 9 files changed, 834 insertions(+), 346 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/093ed17d/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java new file mode 100644 index 000..f5f2732 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java @@ -0,0 +1,120 @@ +/** + * 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.view; + +import org.apache.ambari.server.view.configuration.ViewConfig; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.jar.JarFile; + +/** + * Helper class for basic view archive utility. + */ +public class ViewArchiveUtility { + + /** + * Constants + */ + private static final String VIEW_XML = view.xml; + + + // - ViewArchiveUtility + + /** + * Get the view configuration from the given archive file. + * + * @param archiveFile the archive file + * + * @return the associated view configuration + */ + public ViewConfig getViewConfigFromArchive(File archiveFile) + throws MalformedURLException, JAXBException { +ClassLoader cl = URLClassLoader.newInstance(new URL[]{archiveFile.toURI().toURL()}); + +InputStream configStream = cl.getResourceAsStream(VIEW_XML); +JAXBContext jaxbContext = JAXBContext.newInstance(ViewConfig.class); +Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); + +return (ViewConfig) jaxbUnmarshaller.unmarshal(configStream); + } + + /** + * Get the view configuration from the extracted archive file. + * + * @param archivePath path to extracted archive + * + * @return the associated view configuration + * + * @throws JAXBException if xml is malformed + * @throws java.io.FileNotFoundException if xml was not found + */ + public ViewConfig getViewConfigFromExtractedArchive(String archivePath) + throws JAXBException, FileNotFoundException { + +InputStream configStream = new FileInputStream(new File(archivePath + File.separator + VIEW_XML)); +JAXBContext jaxbContext = JAXBContext.newInstance(ViewConfig.class); +Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); + +return (ViewConfig)
[10/30] git commit: AMBARI-7272. Configs: make final icon more clear selected / not selected.(xiwang)
AMBARI-7272. Configs: make final icon more clear selected / not selected.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e71d4fa8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e71d4fa8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e71d4fa8 Branch: refs/heads/branch-alerts-dev Commit: e71d4fa8facd19d0430960025ba3d49dc19737a3 Parents: 9bd6873 Author: Xi Wang xiw...@apache.org Authored: Thu Sep 11 16:43:58 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Thu Sep 11 17:00:34 2014 -0700 -- ambari-web/app/styles/application.less | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e71d4fa8/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 9dc4307..e4b455e 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -1204,12 +1204,16 @@ h1 { color: rgb(243, 178, 11); margin-right: 2px; } -.btn-final .icon-lock { - color: grey; +.btn-final{ + background: none repeat scroll 0 0 #fff; +} +.btn-final .icon-lock{ + color: #a6a6a6; } .btn-final.active .icon-lock { color: blue; } +.btn-final.active, .btn-final.active[disabled] { //copied from Bootstrap .btn.active background-color: #e6e6e6; background-color: #d9d9d9 \9;
[08/30] git commit: AMBARI-7180 ambari build failure caused by ApacheDSContainer's working directory conflict (jun aoki via alejandro)
AMBARI-7180 ambari build failure caused by ApacheDSContainer's working directory conflict (jun aoki via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91a01f1c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91a01f1c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91a01f1c Branch: refs/heads/branch-alerts-dev Commit: 91a01f1cd548ff35883c5a4f894a524d21a835ea Parents: 9ed5e3b Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Thu Sep 11 15:32:43 2014 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Thu Sep 11 15:32:43 2014 -0700 -- ...mbariLdapAuthenticationProviderBaseTest.java | 50 ...uthenticationProviderForDNWithSpaceTest.java | 4 +- .../AmbariLdapAuthenticationProviderTest.java | 4 +- 3 files changed, 54 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/91a01f1c/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderBaseTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderBaseTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderBaseTest.java new file mode 100644 index 000..2a323f8 --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderBaseTest.java @@ -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. + */ + +package org.apache.ambari.server.security.authorization; + +import org.apache.commons.io.FileUtils; +import org.easymock.EasyMockSupport; + +import java.io.File; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class AmbariLdapAuthenticationProviderBaseTest extends EasyMockSupport { + + private static final Log logger = LogFactory.getLog(AmbariLdapAuthenticationProviderBaseTest.class); + + protected static void createCleanApacheDSContainerWorkDir() throws IOException{ +// Set ApacheDsContainer's work dir under the current folder (Jenkins' job workspace) instead of the default /tmp/apacheds-spring-security. See AMBARI-7180 +SimpleDateFormat sdf = new SimpleDateFormat(HHmmss); +String timestamp = sdf.format(new Date()); +final String workParent = new File(.).getAbsolutePath() + File.separator + target + File.separator + timestamp; +new File(workParent).mkdirs(); +// The folder structure looks like {job-root}/target/{timestamp}/apacheds-spring-security +final String apacheDSWorkDir = workParent + File.separator + apacheds-spring-security; +FileUtils.deleteDirectory(new File(apacheDSWorkDir)); +System.setProperty(apacheDSWorkDir, apacheDSWorkDir ); +logger.info(System property apacheDSWorkDir was set to + apacheDSWorkDir); + + } + +} http://git-wip-us.apache.org/repos/asf/ambari/blob/91a01f1c/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java index ae8054b..c04af86 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java @@ -24,7 +24,6 @@ import com.google.inject.persist.PersistService; import
[18/30] git commit: AMBARI-7280. Slider View: View should use existing parameters if set. (onechiporenko)
AMBARI-7280. Slider View: View should use existing parameters if set. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2fbbfb37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2fbbfb37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2fbbfb37 Branch: refs/heads/branch-alerts-dev Commit: 2fbbfb370155ef9adb69fc43362dd0ad1c1448a9 Parents: 941b56a Author: Oleg Nechiporenko onechipore...@apache.org Authored: Fri Sep 12 17:22:31 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Fri Sep 12 17:22:31 2014 +0300 -- .../assets/data/resource/slider-properties.json | 64 .../app/controllers/slider_apps_controller.js | 187 .../ui/app/controllers/slider_controller.js | 294 +++ .../src/main/resources/ui/app/helpers/ajax.js | 44 +-- .../src/main/resources/ui/app/initialize.js | 16 +- .../ui/app/mappers/application_status.js| 52 +++- 6 files changed, 434 insertions(+), 223 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2fbbfb37/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json -- diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json new file mode 100644 index 000..53a3331 --- /dev/null +++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json @@ -0,0 +1,64 @@ +{ + href : http://host:8080/api/v1/views/SLIDER/versions/1.0.0/instances/MySliderName;, + ViewInstanceInfo : { +context_path : /views/SLIDER/1.0.0/MySliderName, +description : MySliderDescription, +icon64_path : null, +icon_path : null, +instance_name : MySliderName, +label : MySliderDisplay, +static : false, +version : 1.0.0, +view_name : SLIDER, +visible : true, +instance_data : { }, +properties : { + hdfs.address : hdfs://slider-1.c.pramod-thangali.internal:8020, + yarn.resourcemanager.address : slider-2.c.pramod-thangali.internal:8050, + yarn.resourcemanager.scheduler.address : slider-2.c.pramod-thangali.internal:8030, + zookeeper.quorum : slider-1.c.pramod-thangali.internal:2181,slider-2.c.pramod-thangali.internal:2181,slider-3.c.pramod-thangali.internal:2181 +} + }, + resources : [ +{ + href : http://host:8080/api/v1/views/SLIDER/versions/1.0.0/instances/MySliderName/resources/status;, + instance_name : MySliderName, + name : status, + version : 1.0.0, + view_name : SLIDER +} + ], + apps : [ +{ + href : http://host:8080/api/v1/views/SLIDER/versions/1.0.0/instances/MySliderName/apps/1410332504508_1;, + id : 1410332504508_1, + instance_name : MySliderName, + version : 1.0.0, + view_name : SLIDER +}, +{ + href : http://host:8080/api/v1/views/SLIDER/versions/1.0.0/instances/MySliderName/apps/1410332504508_2;, + id : 1410332504508_2, + instance_name : MySliderName, + version : 1.0.0, + view_name : SLIDER +} + ], + privileges : [ ], + apptypes : [ +{ + href : http://host:8080/api/v1/views/SLIDER/versions/1.0.0/instances/MySliderName/apptypes/HBASE;, + id : HBASE, + instance_name : MySliderName, + version : 1.0.0, + view_name : SLIDER +}, +{ + href : http://host:8080/api/v1/views/SLIDER/versions/1.0.0/instances/MySliderName/apptypes/STORM;, + id : STORM, + instance_name : MySliderName, + version : 1.0.0, + view_name : SLIDER +} + ] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2fbbfb37/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 2f422f1..1bca7e4 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 @@ -18,191 +18,4 @@ App.SliderAppsController = Ember.ArrayController.extend({ - /** - * Load resources on controller initialization - * @method initResources - */ - initResources:function () { -this.getClusterName(); - }, - - initialValuesToLoad: Em.Object.create({ -ambariAddress: null, -clusterName: null, -hdfsAddress: null, -yarnRMAddress: null, -
[03/30] AMBARI-7257 Use Versioned RPMS for HDP 2.2 stack and make it plugabable to be able to reuse the scripts for HDP 2.* (dsen)
http://git-wip-us.apache.org/repos/asf/ambari/blob/7d9feb6a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py index 6aff622..83e40c6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py @@ -78,7 +78,7 @@ def yarn(name = None): ) XmlConfig(core-site.xml, -conf_dir=params.config_dir, +conf_dir=params.hadoop_conf_dir, configurations=params.config['configurations']['core-site'], configuration_attributes=params.config['configuration_attributes']['core-site'], owner=params.hdfs_user, @@ -87,7 +87,7 @@ def yarn(name = None): ) XmlConfig(mapred-site.xml, -conf_dir=params.config_dir, +conf_dir=params.hadoop_conf_dir, configurations=params.config['configurations']['mapred-site'], configuration_attributes=params.config['configuration_attributes']['mapred-site'], owner=params.yarn_user, @@ -96,7 +96,7 @@ def yarn(name = None): ) XmlConfig(yarn-site.xml, -conf_dir=params.config_dir, +conf_dir=params.hadoop_conf_dir, configurations=params.config['configurations']['yarn-site'], configuration_attributes=params.config['configuration_attributes']['yarn-site'], owner=params.yarn_user, @@ -105,7 +105,7 @@ def yarn(name = None): ) XmlConfig(capacity-scheduler.xml, -conf_dir=params.config_dir, +conf_dir=params.hadoop_conf_dir, configurations=params.config['configurations']['capacity-scheduler'], configuration_attributes=params.config['configuration_attributes']['capacity-scheduler'], owner=params.yarn_user, @@ -140,7 +140,7 @@ def yarn(name = None): content=Template('mapreduce.conf.j2') ) - File(format({config_dir}/yarn-env.sh), + File(format({hadoop_conf_dir}/yarn-env.sh), owner=params.yarn_user, group=params.user_group, mode=0755, @@ -154,7 +154,7 @@ def yarn(name = None): mode=06050 ) -File(format({config_dir}/container-executor.cfg), +File(format({hadoop_conf_dir}/container-executor.cfg), group=params.user_group, mode=0644, content=Template('container-executor.cfg.j2') @@ -168,7 +168,7 @@ def yarn(name = None): tc_mode = None tc_owner = params.hdfs_user - File(format({config_dir}/mapred-env.sh), + File(format({hadoop_conf_dir}/mapred-env.sh), owner=tc_owner, content=InlineTemplate(params.mapred_env_sh_template) ) http://git-wip-us.apache.org/repos/asf/ambari/blob/7d9feb6a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py index 2dc3792..6016b99 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py @@ -26,15 +26,24 @@ import status_params config = Script.get_config() tmp_dir = Script.get_tmp_dir() -config_dir = /etc/zookeeper/conf +#RPM versioning support +rpm_version = default(/configurations/hadoop-env/rpm_version, None) + +#hadoop params +if rpm_version is not None: + config_dir = format('/usr/hdp/{rpm_version}/etc/zookeeper/conf') + zk_bin = format('/usr/hdp/{rpm_version}/zookeeper/bin') + smoke_script = format('/usr/hdp/{rpm_version}/zookeeper/bin/zkCli.sh') +else: + config_dir = /etc/zookeeper/conf + zk_bin = '/usr/lib/zookeeper/bin' + smoke_script = /usr/lib/zookeeper/bin/zkCli.sh + zk_user = config['configurations']['zookeeper-env']['zk_user'] hostname = config['hostname'] -zk_bin = '/usr/lib/zookeeper/bin' user_group = config['configurations']['cluster-env']['user_group'] zk_env_sh_template = config['configurations']['zookeeper-env']['content'] -smoke_script = /usr/lib/zookeeper/bin/zkCli.sh - zk_log_dir = config['configurations']['zookeeper-env']['zk_log_dir'] zk_data_dir = config['configurations']['zookeeper-env']['zk_data_dir'] zk_pid_dir = status_params.zk_pid_dir http://git-wip-us.apache.org/repos/asf/ambari/blob/7d9feb6a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/params.py
[06/30] git commit: AMBARI-7242. Make Nagios client dependencies conditional on client service being deployed.
AMBARI-7242. Make Nagios client dependencies conditional on client service being deployed. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9d201f54 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9d201f54 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9d201f54 Branch: refs/heads/branch-alerts-dev Commit: 9d201f548b3cc77745e6a7616cc2e7be8920dbe1 Parents: d961ca0 Author: Robert Nettleton rnettle...@hortonworks.com Authored: Thu Sep 11 16:10:27 2014 -0400 Committer: John Speidel jspei...@hortonworks.com Committed: Thu Sep 11 16:12:09 2014 -0400 -- .../internal/BaseBlueprintProcessor.java| 13 +- .../internal/BaseBlueprintProcessorTest.java| 413 +++ 2 files changed, 425 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9d201f54/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java index 9c10ac1..5a99af8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java @@ -595,6 +595,11 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP return version; } + +MapDependencyInfo, String getDependencyConditionalServiceMap() { + return dependencyConditionalServiceMap; +} + /** * Get services contained in the stack. * @@ -842,13 +847,19 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP * Register conditional dependencies. */ //todo: This information should be specified in the stack definition. -private void registerConditionalDependencies() { +void registerConditionalDependencies() { CollectionDependencyInfo nagiosDependencies = getDependenciesForComponent(NAGIOS_SERVER); for (DependencyInfo dependency : nagiosDependencies) { if (dependency.getComponentName().equals(HCAT)) { dependencyConditionalServiceMap.put(dependency, HCATALOG); } else if (dependency.getComponentName().equals(OOZIE_CLIENT)) { dependencyConditionalServiceMap.put(dependency, OOZIE); +} else if (dependency.getComponentName().equals(YARN_CLIENT)) { + dependencyConditionalServiceMap.put(dependency, YARN); +} else if (dependency.getComponentName().equals(TEZ_CLIENT)) { + dependencyConditionalServiceMap.put(dependency, TEZ); +} else if (dependency.getComponentName().equals(MAPREDUCE2_CLIENT)) { + dependencyConditionalServiceMap.put(dependency, MAPREDUCE2); } } dbDependencyInfo.put(MYSQL_SERVER, global/hive_database); http://git-wip-us.apache.org/repos/asf/ambari/blob/9d201f54/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessorTest.java new file mode 100644 index 000..ffe2ea0 --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessorTest.java @@ -0,0 +1,413 @@ +package org.apache.ambari.server.controller.internal; + +import org.apache.ambari.server.controller.AmbariManagementController; +import org.apache.ambari.server.controller.StackServiceResponse; +import org.apache.ambari.server.state.DependencyInfo; +import org.easymock.EasyMockSupport; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.isA; + +import org.junit.Before; +import org.junit.Test; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import static org.junit.Assert.*; + +/** + * 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 + * + *
[11/30] git commit: AMBARI-7268. Configs: need better handling of notes in config history table.(XIWANG)
AMBARI-7268. Configs: need better handling of notes in config history table.(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9bd68735 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9bd68735 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9bd68735 Branch: refs/heads/branch-alerts-dev Commit: 9bd6873554c83c9ea3ed14adfe32206a9745fbb0 Parents: f3e76ef Author: Xi Wang xiw...@apache.org Authored: Thu Sep 11 16:18:02 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Thu Sep 11 17:00:34 2014 -0700 -- .../main/dashboard/config_history_controller.js | 2 +- ambari-web/app/models/service_config_version.js | 5 - ambari-web/app/styles/application.less| 12 +++- .../templates/common/configs/config_history_flow.hbs | 8 .../app/templates/main/dashboard/config_history.hbs | 14 +- .../app/views/main/dashboard/config_history_view.js | 8 ++-- 6 files changed, 39 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9bd68735/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 41816bc..e6d8614 100644 --- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js +++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js @@ -46,7 +46,7 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin associations[2] = 'configGroup'; associations[3] = 'createTime'; associations[4] = 'author'; -associations[5] = 'briefNotes'; +associations[5] = 'notes'; return associations; }.property(), http://git-wip-us.apache.org/repos/asf/ambari/blob/9bd68735/ambari-web/app/models/service_config_version.js -- diff --git a/ambari-web/app/models/service_config_version.js b/ambari-web/app/models/service_config_version.js index 1a3922c..4a65ac2 100644 --- a/ambari-web/app/models/service_config_version.js +++ b/ambari-web/app/models/service_config_version.js @@ -43,7 +43,10 @@ App.ServiceConfigVersion = DS.Model.extend({ return (this.get('groupName') === 'default') ? (this.get('displayName') + ' ' + Em.I18n.t('common.default')) : this.get('groupName'); }.property('groupName'), briefNotes: function () { -return (typeof this.get('notes') === 'string') ? this.get('notes').slice(0, 100) : ; +return (typeof this.get('notes') === 'string') ? this.get('notes').slice(0, 81) : ; + }.property('notes'), + moreNotesExists: function () { +return (typeof this.get('notes') === 'string') ? this.get('notes').length 80 : false; }.property('notes'), versionText: function () { return Em.I18n.t('dashboard.configHistory.table.version.versionText').format(this.get('version')); http://git-wip-us.apache.org/repos/asf/ambari/blob/9bd68735/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 31ddc76..9dc4307 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -553,6 +553,9 @@ h1 { .tooltip-inner { text-align: left; + max-width: 400px; + overflow-wrap: break-word; + white-space:pre-wrap; } .popover { @@ -4944,6 +4947,9 @@ ul.inline li { width: 75%; } } +td.notes .show-more-button { + font-size: @default-font-size - 1; +} } div.page-bar div.filtered-info { margin-left: 17px; @@ -5015,7 +5021,7 @@ ul.inline li { left: -45px; z-index: 1000; float: left; -min-width: 300px; +width: 300px; padding: 8px; list-style: none; background-color: #ff; @@ -5031,7 +5037,9 @@ ul.inline li { padding: 1px 5px 15px 5px; text-align: left; .notes{ +overflow-wrap: break-word; word-wrap: break-word; +white-space: pre-wrap; } .date{ color: #808080; @@ -5191,6 +5199,8 @@ ul.inline li { } .notes{ word-wrap: break-word; + overflow-wrap: break-word; + white-space: pre-wrap; } } .btn { http://git-wip-us.apache.org/repos/asf/ambari/blob/9bd68735/ambari-web/app/templates/common/configs/config_history_flow.hbs -- diff --git
[16/30] git commit: AMBARI-7277 Slider View: Creating app without metrics should not show Metrics section. (atkach)
AMBARI-7277 Slider View: Creating app without metrics should not show Metrics section. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e10ec8b0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e10ec8b0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e10ec8b0 Branch: refs/heads/branch-alerts-dev Commit: e10ec8b0943eda245c6ae6959b31430c45515f4a Parents: 18f427d Author: atkach atk...@hortonworks.com Authored: Fri Sep 12 14:48:05 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Fri Sep 12 14:48:05 2014 +0300 -- .../createAppWizard/step1_controller.js | 26 +++- .../createAppWizard/step3_controller.js | 4 +++ .../main/resources/ui/app/models/slider_app.js | 7 +- .../app/templates/components/configSection.hbs | 3 ++- 4 files changed, 27 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e10ec8b0/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js index 9faaa32..9ffc432 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js @@ -139,18 +139,22 @@ App.CreateAppWizardStep1Controller = Ember.Controller.extend({ */ loadGangliaClustersSuccessCallback: function (data) { var gangliaCustomClusters = []; + if (data.items[0]) { - //parse CSV string with cluster names and ports - Em.get(data.items[0].configurations[0].properties, 'ganglia_custom_clusters').replace(/\'/g, ).split(',').forEach(function(item, index){ -if (index % 2 === 0) { - gangliaCustomClusters.push({ -name: item - }) -} else { - gangliaCustomClusters[gangliaCustomClusters.length - 1].port = parseInt(item); -} - }); - App.set('gangliaClusters', gangliaCustomClusters); + var prop = Em.get(data.items[0].configurations[0].properties, 'ganglia_custom_clusters'); + if (prop) { +//parse CSV string with cluster names and ports +prop.replace(/\'/g, ).split(',').forEach(function(item, index){ + if (index % 2 === 0) { +gangliaCustomClusters.push({ + name: item +}) + } else { +gangliaCustomClusters[gangliaCustomClusters.length - 1].port = parseInt(item); + } +}); +App.set('gangliaClusters', gangliaCustomClusters); + } } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/e10ec8b0/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js index a2eaa2e..2dd5b72 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js @@ -76,6 +76,7 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({ */ configsSet: [ { + name: 'ganglia_metrics', trigger: {value: false, label: Em.I18n.t('configs.enable.metrics'), viewType: 'checkbox'}, isSet: true, section: 'global', @@ -152,6 +153,9 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({ configsSet.forEach(function (configSet) { if (configSet.configs.length === configSet.configNames.length) { delete configSet.configNames; +if (configSet.name === 'ganglia_metrics') { + configSet.trigger.readOnly = (!App.get('gangliaClusters') || App.get('gangliaClusters').length === 0); +} configSet.trigger = App.ConfigProperty.create(configSet.trigger); this.initConfigSetDependecies(configSet); configs.unshift(configSet); http://git-wip-us.apache.org/repos/asf/ambari/blob/e10ec8b0/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 bf02f30..3710877 100644 ---
[17/30] git commit: AMBARI-7260. Total space Utilization metric is not displaying on stack 1.3 (aonishuk)
AMBARI-7260. Total space Utilization metric is not displaying on stack 1.3 (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/941b56a3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/941b56a3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/941b56a3 Branch: refs/heads/branch-alerts-dev Commit: 941b56a39aff7c53514d235e86143a8269b1b0a5 Parents: 6d6f4dd Author: Andrew Onishuk aonis...@hortonworks.com Authored: Fri Sep 12 17:00:53 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Fri Sep 12 17:00:53 2014 +0300 -- .../src/main/resources/ganglia_properties.json | 40 1 file changed, 40 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/941b56a3/ambari-server/src/main/resources/ganglia_properties.json -- diff --git a/ambari-server/src/main/resources/ganglia_properties.json b/ambari-server/src/main/resources/ganglia_properties.json index 3fe9460..e64309a 100644 --- a/ambari-server/src/main/resources/ganglia_properties.json +++ b/ambari-server/src/main/resources/ganglia_properties.json @@ -1649,6 +1649,26 @@ pointInTime:false, temporal:true }, + metrics/dfs/FSNamesystem/CapacityRemaining:{ +metric:dfs.FSNamesystem.CapacityRemaining, +pointInTime:false, +temporal:true + }, + metrics/dfs/FSNamesystem/CapacityTotal:{ +metric:dfs.FSNamesystem.CapacityTotal, +pointInTime:false, +temporal:true + }, + metrics/dfs/FSNamesystem/CapacityUsed:{ +metric:dfs.FSNamesystem.CapacityUsed, +pointInTime:false, +temporal:true + }, + metrics/dfs/FSNamesystem/CapacityNonDFSUsed: { +metric: dfs.FSNamesystem.CapacityUsedNonDFS, +pointInTime: false, +temporal: true + }, metrics/dfs/FSNamesystem/CorruptBlocks:{ metric:dfs.FSNamesystem.CorruptBlocks, pointInTime:false, @@ -5,6 +11135,26 @@ pointInTime:false, temporal:true }, + metrics/dfs/FSNamesystem/CapacityRemaining:{ +metric:dfs.FSNamesystem.CapacityRemaining, +pointInTime:false, +temporal:true + }, + metrics/dfs/FSNamesystem/CapacityTotal:{ +metric:dfs.FSNamesystem.CapacityTotal, +pointInTime:false, +temporal:true + }, + metrics/dfs/FSNamesystem/CapacityUsed:{ +metric:dfs.FSNamesystem.CapacityUsed, +pointInTime:false, +temporal:true + }, + metrics/dfs/FSNamesystem/CapacityNonDFSUsed: { +metric: dfs.FSNamesystem.CapacityUsedNonDFS, +pointInTime: false, +temporal: true + }, metrics/dfs/FSNamesystem/CorruptBlocks:{ metric:dfs.FSNamesystem.CorruptBlocks, pointInTime:false,
[15/30] git commit: AMBARI-7278. Could not load configs for Hive and Oozie at UI after upgrad from 1.4.4 to 1.7.0(vbrodetskyi)
AMBARI-7278. Could not load configs for Hive and Oozie at UI after upgrad from 1.4.4 to 1.7.0(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6d6f4dda Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6d6f4dda Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6d6f4dda Branch: refs/heads/branch-alerts-dev Commit: 6d6f4dda59c6d8ab76f459b8b16a835f07053195 Parents: e10ec8b Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Fri Sep 12 14:37:31 2014 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Fri Sep 12 14:37:31 2014 +0300 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6d6f4dda/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 0e8aea5..4a9b83f 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 @@ -1004,6 +1004,8 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog { result.put(zookeeper_keytab_path,zookeeper-env); result.put(storm_principal_name,storm-env); result.put(storm_keytab,storm-env); +result.put(hive_hostname,hive-env); +result.put(oozie_hostname,oozie-env); return result; }
[30/30] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/conf/unix/ambari.properties ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aaf05135 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aaf05135 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aaf05135 Branch: refs/heads/branch-alerts-dev Commit: aaf051357de9493217fd5b2e05daa06c55a13132 Parents: 853497f 3355733 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Fri Sep 12 19:52:41 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Fri Sep 12 19:52:41 2014 -0400 -- .../main/resources/ui/admin-web/app/index.html | 7 +- .../resources/ui/admin-web/app/scripts/app.js | 3 +- .../controllers/ambariViews/ViewsEditCtrl.js| 7 +- .../controllers/groups/GroupsEditCtrl.js| 8 +- .../app/scripts/controllers/mainCtrl.js | 2 +- .../scripts/controllers/users/UsersShowCtrl.js | 18 +- .../ui/admin-web/app/scripts/i18n.config.js | 29 ++ .../resources/ui/admin-web/app/styles/main.css | 9 + .../admin-web/app/views/ambariViews/edit.html | 10 +- .../app/views/clusters/manageAccess.html| 2 +- .../ui/admin-web/app/views/groups/edit.html | 4 +- .../ui/admin-web/app/views/leftNavbar.html | 15 +- .../ui/admin-web/app/views/users/show.html | 8 +- .../src/main/resources/ui/admin-web/bower.json | 4 +- .../libraries/providers/execute_hadoop.py | 9 +- .../libraries/providers/hdfs_directory.py | 16 +- .../libraries/resources/execute_hadoop.py | 1 + .../libraries/resources/hdfs_directory.py | 1 + ambari-server/conf/unix/ambari.properties | 2 +- ambari-server/docs/api/v1/clusters-cluster.md | 284 +++- .../server/configuration/Configuration.java | 5 +- .../internal/BaseBlueprintProcessor.java| 13 +- .../ServiceConfigVersionResourceProvider.java | 2 +- .../internal/StackAdvisorResourceProvider.java | 6 +- .../server/upgrade/UpgradeCatalog170.java | 2 + .../ambari/server/view/ViewArchiveUtility.java | 120 ++ .../ambari/server/view/ViewExtractor.java | 223 ++ .../apache/ambari/server/view/ViewRegistry.java | 429 ++- ambari-server/src/main/python/ambari-server.py | 100 - .../src/main/resources/ganglia_properties.json | 40 ++ .../2.0.6/hooks/after-INSTALL/scripts/params.py | 20 +- .../hooks/before-INSTALL/scripts/params.py | 3 +- .../hooks/before-START/files/checkForFormat.sh | 3 + .../2.0.6/hooks/before-START/scripts/params.py | 25 +- .../services/FLUME/package/scripts/flume.py | 2 +- .../FLUME/package/scripts/flume_check.py| 2 +- .../services/FLUME/package/scripts/params.py| 14 +- .../HBASE/package/files/hbaseSmokeVerify.sh | 3 +- .../services/HBASE/package/scripts/params.py| 37 +- .../HBASE/package/scripts/service_check.py | 6 +- .../HDFS/package/files/checkForFormat.sh| 4 +- .../HDFS/package/scripts/hdfs_namenode.py | 15 +- .../services/HDFS/package/scripts/namenode.py | 2 +- .../services/HDFS/package/scripts/params.py | 34 +- .../HDFS/package/scripts/service_check.py | 27 +- .../2.0.6/services/HIVE/package/scripts/hcat.py | 6 + .../HIVE/package/scripts/hcat_service_check.py | 8 +- .../2.0.6/services/HIVE/package/scripts/hive.py | 2 + .../HIVE/package/scripts/hive_service.py| 9 +- .../HIVE/package/scripts/install_jars.py| 6 +- .../services/HIVE/package/scripts/params.py | 73 ++-- .../package/templates/startHiveserver2.sh.j2| 2 +- .../services/OOZIE/configuration/oozie-env.xml | 2 +- .../services/OOZIE/package/files/oozieSmoke2.sh | 8 +- .../OOZIE/package/scripts/oozie_service.py | 4 +- .../services/OOZIE/package/scripts/params.py| 24 +- .../services/PIG/package/scripts/params.py | 20 +- .../PIG/package/scripts/service_check.py| 10 +- .../services/SQOOP/package/scripts/params.py| 10 +- .../WEBHCAT/configuration/webhcat-env.xml | 2 +- .../services/WEBHCAT/package/scripts/params.py | 41 +- .../services/WEBHCAT/package/scripts/webhcat.py | 11 +- .../services/YARN/package/scripts/params.py | 45 +- .../YARN/package/scripts/resourcemanager.py | 5 +- .../services/YARN/package/scripts/service.py| 2 +- .../YARN/package/scripts/service_check.py | 3 +- .../2.0.6/services/YARN/package/scripts/yarn.py | 14 +- .../ZOOKEEPER/package/scripts/params.py | 17 +- .../services/FALCON/package/scripts/params.py | 15 +- .../services/STORM/package/scripts/params.py| 5 +- .../main/resources/stacks/HDP/2.2/metainfo.xml | 23 +
[04/30] git commit: AMBARI-7257 Use Versioned RPMS for HDP 2.2 stack and make it plugabable to be able to reuse the scripts for HDP 2.* (dsen)
AMBARI-7257 Use Versioned RPMS for HDP 2.2 stack and make it plugabable to be able to reuse the scripts for HDP 2.* (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d9feb6a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d9feb6a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d9feb6a Branch: refs/heads/branch-alerts-dev Commit: 7d9feb6afa6cd310fb8b11221ab67f01f048dd38 Parents: 8778556 Author: Dmytro Sen d...@hortonworks.com Authored: Thu Sep 11 22:26:27 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Thu Sep 11 22:26:27 2014 +0300 -- .../libraries/providers/execute_hadoop.py | 9 +- .../libraries/providers/hdfs_directory.py | 16 +++- .../libraries/resources/execute_hadoop.py | 1 + .../libraries/resources/hdfs_directory.py | 1 + .../2.0.6/hooks/after-INSTALL/scripts/params.py | 20 +++-- .../hooks/before-INSTALL/scripts/params.py | 3 +- .../hooks/before-START/files/checkForFormat.sh | 3 + .../2.0.6/hooks/before-START/scripts/params.py | 25 -- .../services/FLUME/package/scripts/flume.py | 2 +- .../FLUME/package/scripts/flume_check.py| 2 +- .../services/FLUME/package/scripts/params.py| 14 +++- .../HBASE/package/files/hbaseSmokeVerify.sh | 3 +- .../services/HBASE/package/scripts/params.py| 37 ++-- .../HBASE/package/scripts/service_check.py | 6 +- .../HDFS/package/files/checkForFormat.sh| 4 +- .../HDFS/package/scripts/hdfs_namenode.py | 15 ++-- .../services/HDFS/package/scripts/namenode.py | 2 +- .../services/HDFS/package/scripts/params.py | 34 +--- .../HDFS/package/scripts/service_check.py | 27 -- .../2.0.6/services/HIVE/package/scripts/hcat.py | 6 ++ .../HIVE/package/scripts/hcat_service_check.py | 8 +- .../2.0.6/services/HIVE/package/scripts/hive.py | 2 + .../HIVE/package/scripts/hive_service.py| 9 +- .../HIVE/package/scripts/install_jars.py| 6 +- .../services/HIVE/package/scripts/params.py | 73 ++-- .../package/templates/startHiveserver2.sh.j2| 2 +- .../services/OOZIE/configuration/oozie-env.xml | 2 +- .../services/OOZIE/package/files/oozieSmoke2.sh | 8 +- .../OOZIE/package/scripts/oozie_service.py | 4 +- .../services/OOZIE/package/scripts/params.py| 24 -- .../services/PIG/package/scripts/params.py | 20 - .../PIG/package/scripts/service_check.py| 10 ++- .../services/SQOOP/package/scripts/params.py| 10 ++- .../WEBHCAT/configuration/webhcat-env.xml | 2 +- .../services/WEBHCAT/package/scripts/params.py | 41 ++--- .../services/WEBHCAT/package/scripts/webhcat.py | 11 ++- .../services/YARN/package/scripts/params.py | 45 ++ .../YARN/package/scripts/resourcemanager.py | 5 +- .../services/YARN/package/scripts/service.py| 2 +- .../YARN/package/scripts/service_check.py | 3 +- .../2.0.6/services/YARN/package/scripts/yarn.py | 14 ++-- .../ZOOKEEPER/package/scripts/params.py | 17 +++- .../services/FALCON/package/scripts/params.py | 15 +++- .../services/STORM/package/scripts/params.py| 5 +- .../main/resources/stacks/HDP/2.2/metainfo.xml | 23 + .../resources/stacks/HDP/2.2/repos/repoinfo.xml | 82 ++ .../stacks/HDP/2.2/role_command_order.json | 88 .../stacks/HDP/2.2/services/FALCON/metainfo.xml | 28 +++ .../stacks/HDP/2.2/services/FLUME/metainfo.xml | 40 + .../stacks/HDP/2.2/services/HBASE/metainfo.xml | 42 ++ .../services/HDFS/configuration/hadoop-env.xml | 29 +++ .../services/HDFS/configuration/hdfs-site.xml | 34 .../stacks/HDP/2.2/services/HDFS/metainfo.xml | 68 +++ .../stacks/HDP/2.2/services/HIVE/metainfo.xml | 44 ++ .../services/OOZIE/configuration/oozie-site.xml | 38 + .../stacks/HDP/2.2/services/OOZIE/metainfo.xml | 28 +++ .../stacks/HDP/2.2/services/PIG/metainfo.xml| 41 + .../stacks/HDP/2.2/services/SQOOP/metainfo.xml | 29 +++ .../services/STORM/configuration/storm-env.xml | 29 +++ .../services/STORM/configuration/storm-site.xml | 54 .../stacks/HDP/2.2/services/STORM/metainfo.xml | 29 +++ .../stacks/HDP/2.2/services/TEZ/metainfo.xml| 40 + .../WEBHCAT/configuration/webhcat-site.xml | 59 + .../HDP/2.2/services/WEBHCAT/metainfo.xml | 44 ++ .../YARN/configuration-mapred/mapred-site.xml | 36 .../services/YARN/configuration/yarn-site.xml | 35 .../stacks/HDP/2.2/services/YARN/metainfo.xml | 71 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml | 40 + .../stacks/1.3.2/HDFS/test_service_check.py | 18 +++- .../stacks/2.0.6/HBASE/test_hbase_master.py | 6 ++
[19/30] git commit: AMBARI-7281. Slider View: App summary details shown differently than Ambari service summary. (onechiporenko)
AMBARI-7281. Slider View: App summary details shown differently than Ambari service summary. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b52db2a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b52db2a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b52db2a Branch: refs/heads/branch-alerts-dev Commit: 1b52db2a467ee0600eea67907abeeb7e51cfcf7d Parents: 2fbbfb3 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Fri Sep 12 17:26:55 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Fri Sep 12 17:26:55 2014 +0300 -- .../resources/ui/app/styles/application.less| 26 ++- .../ui/app/templates/slider_app/summary.hbs | 200 +-- .../ui/app/views/slider_app/summary_view.js | 4 +- 3 files changed, 119 insertions(+), 111 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1b52db2a/contrib/views/slider/src/main/resources/ui/app/styles/application.less -- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index f2d6260..b415da0 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -529,19 +529,27 @@ a { * App Summary Page */ .app_summary { - .container { -padding-left: 0; -.panel-summury { - min-height: 400px; - table tr td:last-child { -word-break: break-word; + padding-left: 0; + table { +.no-borders { + td { +border-width: 0; } } -.panel-link { - margin-top: -5px; - margin-right: -7px; + } + .panel-heading { +font-weight: 700; + } + .panel-summary { +min-height: 400px; +td:first-child { + text-align: right; } } + .panel-link { +margin-top: -5px; +margin-right: -7px; + } } .chart-container { http://git-wip-us.apache.org/repos/asf/ambari/blob/1b52db2a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs -- diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs index cf86dc5..5cb2cd1 100644 --- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs +++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs @@ -16,113 +16,113 @@ * limitations under the License. }} -div class=container - div class=row -div class=col-md-6 - {{#bs-panel heading=Summary class=panel-summury}} -table class=table table-striped table-bordered table-condensed - tbody -tr - td{{t common.status}}/td - td{{controller.model.status}}/td -/tr -tr - td{{t common.type}}/td - td{{controller.appType}}/td -/tr -tr - td{{t common.started}}/td - td{{formatWordBreak controller.model.started}}/td -/tr -tr - td{{t common.finished}}/td - td{{formatWordBreak controller.model.ended}}/td -/tr -tr - td{{t common.diagnostics}}/td - td{{formatWordBreak controller.model.diagnostics devider=.}}/td -/tr -{{#each controller.model.jmx}} - tr -td{{humanize key}}/td -td{{formatWordBreak value}}/td - /tr -{{/each}} - /tbody -/table - {{/bs-panel}} -/div -div class=col-md-6 - {{#bs-panel heading=Components class=panel-components}} - table class=table table-striped table-bordered table-condensed - tbody - {{#each controller.model.components}} -tr - td{{componentName}}/td - td{{host}}/td -/tr - {{/each}} - /tbody - /table - {{/bs-panel}} - div class=panel panel-default panel-alerts -div class=panel-heading - {{t common.alerts}} - div class=btn-group pull-right panel-link -{{!--a class=btn btn-default btn-sm target=_blank rel=tooltip - {{translateAttr title=sliderApp.summary.go_to_nagios}} - {{bind-attr href=view.nagiosUrl}} -i class=icon-link/i -/a--}} - /div -/div -div class=app-alerts -ul - {{#each
[07/30] git commit: AMBARI-7212 Enable security fails for Zookeeper using HDP 1.3 (alejandro)
AMBARI-7212 Enable security fails for Zookeeper using HDP 1.3 (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9ed5e3be Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9ed5e3be Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9ed5e3be Branch: refs/heads/branch-alerts-dev Commit: 9ed5e3be948de91a5be923d880b44342343b62d9 Parents: 9d201f5 Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Mon Sep 8 17:48:13 2014 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Thu Sep 11 14:09:00 2014 -0700 -- ambari-web/app/data/secure_properties.js | 15 +++ 1 file changed, 15 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9ed5e3be/ambari-web/app/data/secure_properties.js -- diff --git a/ambari-web/app/data/secure_properties.js b/ambari-web/app/data/secure_properties.js index ba1e26d..a00783e 100644 --- a/ambari-web/app/data/secure_properties.js +++ b/ambari-web/app/data/secure_properties.js @@ -752,6 +752,21 @@ module.exports = category: ZooKeeper Server, component: ZOOKEEPER_SERVER }, +{ + id: puppet var, + name: zookeeper_keytab_path, + displayName: Path to keytab file, + value: , + defaultValue: /etc/security/keytabs/zk.service.keytab, + description: Path to ZooKeeper keytab file, + displayType: directory, + isVisible: true, + isOverridable: false, + serviceName: ZOOKEEPER, + filename: zookeeper-env.xml, + category: ZooKeeper Server, + component: ZOOKEEPER_SERVER +}, //NAGIOS { id: puppet var,
[02/30] AMBARI-7257 Use Versioned RPMS for HDP 2.2 stack and make it plugabable to be able to reuse the scripts for HDP 2.* (dsen)
http://git-wip-us.apache.org/repos/asf/ambari/blob/7d9feb6a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py index 6da9d2f..2a5481c 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py @@ -28,7 +28,10 @@ class TestHcatClient(RMFTestCase): command = configure, config_file=default.json ) - +self.assertResourceCalled('Directory', '/etc/hive/conf', + owner = 'hcat', + group = 'hadoop', +) self.assertResourceCalled('Directory', '/etc/hcatalog/conf', owner = 'hcat', group = 'hadoop', @@ -59,7 +62,10 @@ class TestHcatClient(RMFTestCase): command = configure, config_file=secured.json ) - +self.assertResourceCalled('Directory', '/etc/hive/conf', + owner = 'hcat', + group = 'hadoop', +) self.assertResourceCalled('Directory', '/etc/hcatalog/conf', owner = 'hcat', group = 'hadoop', http://git-wip-us.apache.org/repos/asf/ambari/blob/7d9feb6a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py index 0bef64d..204e384 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py @@ -17,6 +17,7 @@ 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. ''' +import os from mock.mock import MagicMock, call, patch from stacks.utils.RMFTestCase import * @@ -40,6 +41,8 @@ class TestHiveMetastore(RMFTestCase): self.assert_configure_default() self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid /etc/hive/conf.server /var/log/hive', not_if = 'ls /var/run/hive/hive.pid /dev/null 21 ps `cat /var/run/hive/hive.pid` /dev/null 21', +environment = {'PATH' : os.environ['PATH'] + os.pathsep + /usr/lib/hive/bin, + 'HADOOP_HOME' : '/usr'}, user = 'hive', ) self.assertResourceCalled('Execute', '/usr/jdk64/jdk1.7.0_45/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification \'jdbc:mysql://c6402.ambari.apache.org/hive?createDatabaseIfNotExist=true\' hive \'!`\'\'\' 1\' com.mysql.jdbc.Driver', @@ -78,8 +81,11 @@ class TestHiveMetastore(RMFTestCase): ) self.assert_configure_secured() +self.maxDiff = None self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid /etc/hive/conf.server /var/log/hive', not_if = 'ls /var/run/hive/hive.pid /dev/null 21 ps `cat /var/run/hive/hive.pid` /dev/null 21', +environment = {'PATH' : os.environ['PATH'] + os.pathsep + /usr/lib/hive/bin, + 'HADOOP_HOME' : '/usr'}, user = 'hive', ) self.assertResourceCalled('Execute', '/usr/jdk64/jdk1.7.0_45/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification \'jdbc:mysql://c6402.ambari.apache.org/hive?createDatabaseIfNotExist=true\' hive \'!`\'\'\' 1\' com.mysql.jdbc.Driver', @@ -196,6 +202,7 @@ class TestHiveMetastore(RMFTestCase): ) 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', +environment = {'PATH' : os.environ['PATH'] + os.pathsep + /usr/lib/hive/bin}, path = ['/bin', '/usr/bin/'], not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar', ) @@ -322,6 +329,7 @@ class TestHiveMetastore(RMFTestCase): 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',
[28/30] git commit: AMBARI-7288. Slider View: Create Slider App wizard config sections should have triangles (alexantonenko)
AMBARI-7288. Slider View: Create Slider App wizard config sections should have triangles (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4209a492 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4209a492 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4209a492 Branch: refs/heads/branch-alerts-dev Commit: 4209a492938e541be626d524bf46181bfc8d3f9b Parents: 85a8977 Author: Alex Antonenko hiv...@gmail.com Authored: Fri Sep 12 21:32:40 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Sat Sep 13 01:30:50 2014 +0300 -- .../main/resources/ui/app/styles/application.less| 15 +++ .../ui/app/templates/createAppWizard/step3.hbs | 2 +- .../ui/app/views/createAppWizard/step3_view.js | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4209a492/contrib/views/slider/src/main/resources/ui/app/styles/application.less -- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index b415da0..c193d3e 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -383,6 +383,16 @@ a { margin-bottom: 30px; } } + .app-wiz-configs { +.accordion-toggle { + display: block; +} +.panel-heading{ + .icon{ +width: 23px; + } +} + } } .app-page { @@ -636,6 +646,11 @@ a { a.accordion-toggle { display: block; } + .panel-heading{ +.icon{ + width: 24px; +} + } .row { .table-row(); textarea { http://git-wip-us.apache.org/repos/asf/ambari/blob/4209a492/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step3.hbs -- diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step3.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step3.hbs index c7ae662..8faa52c 100644 --- a/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step3.hbs +++ b/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step3.hbs @@ -19,7 +19,7 @@ p {{t wizard.step3.header}} /p -div {{bind-attr class=controller.isError:has-error :form-group}} +div {{bind-attr class=controller.isError:has-error :form-group :app-wiz-configs}} {{#each controller.sectionKeys}} {{config-section section=this http://git-wip-us.apache.org/repos/asf/ambari/blob/4209a492/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step3_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step3_view.js b/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step3_view.js index e612c0a..5d3bd57 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step3_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step3_view.js @@ -16,9 +16,10 @@ * limitations under the License. */ -App.CreateAppWizardStep3View = Ember.View.extend({ +App.CreateAppWizardStep3View = Ember.View.extend(App.WithPanels, { didInsertElement: function () { this.get('controller').loadStep(); +this.addCarets(); } });
[14/30] git commit: AMBARI-7276 Property: dfs.namenode.http-address has final flag - 'true' in downloaded hdfs-site.xml in HA cluster. (ababiichuk)
AMBARI-7276 Property: dfs.namenode.http-address has final flag - 'true' in downloaded hdfs-site.xml in HA cluster. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/18f427dd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/18f427dd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/18f427dd Branch: refs/heads/branch-alerts-dev Commit: 18f427dd12c016a11a81e80913b15ab40865c48f Parents: 5976555 Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Fri Sep 12 14:05:54 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Fri Sep 12 14:05:54 2014 +0300 -- ambari-web/app/assets/test/tests.js | 1 + .../highAvailability/progress_controller.js | 15 +- ambari-web/app/utils/config.js | 14 +- .../progress_controller_test.js | 144 +++ 4 files changed, 163 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/18f427dd/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index c76bd52..0c5f875 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -46,6 +46,7 @@ var files = ['test/init_model_test', 'test/controllers/main/admin/repositories_test', 'test/controllers/main/admin/serviceAccounts_controller_test', 'test/controllers/main/admin/highAvailability_controller_test', + 'test/controllers/main/admin/highAvailability/progress_controller_test', 'test/controllers/main/admin/security_test', 'test/controllers/main/admin/security/disable_test', 'test/controllers/main/admin/security/security_progress_controller_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/18f427dd/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js index 67ec07d..242a6b6 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js @@ -412,8 +412,8 @@ App.HighAvailabilityProgressPageController = App.HighAvailabilityWizardControlle * * @param siteNames Array */ - reconfigureSites: function(siteNames,data) { -var tagName = 'version' + (new Date).getTime(); + reconfigureSites: function(siteNames, data) { +var tagName = App.get('testMode') ? 'version1' : 'version' + (new Date).getTime(); var componentName; switch (this.get('content.controllerName')) { case 'rMHighAvailabilityWizardController': @@ -422,13 +422,18 @@ App.HighAvailabilityProgressPageController = App.HighAvailabilityWizardControlle default: componentName = 'NAMENODE'; } -return siteNames.map(function(_siteName){ - return { +return siteNames.map(function(_siteName) { + var config = data.items.findProperty('type', _siteName); + var configToSave = { type: _siteName, tag: tagName, -properties: data.items.findProperty('type', _siteName).properties, +properties: config config.properties, service_config_version_note: Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role(componentName)) } + if (config config.properties_attributes) { +configToSave.properties_attributes = config.properties_attributes; + } + return configToSave; }); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/18f427dd/ambari-web/app/utils/config.js -- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 16089d9..35ca305 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -591,14 +591,16 @@ 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') : []; +var definedService = this.get('preDefinedServiceConfigs').findProperty('serviceName', serviceName); +if (definedService) { + var definedConfigs = (serviceName) ?
[24/30] git commit: AMBARI-7214. Upgrade to Ambari 1.7.0 requires updating server.jdbc.database_name property in ambari.properties (alejandro)
AMBARI-7214. Upgrade to Ambari 1.7.0 requires updating server.jdbc.database_name property in ambari.properties (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bd28cd9e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bd28cd9e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bd28cd9e Branch: refs/heads/branch-alerts-dev Commit: bd28cd9e80dc6026e7c4dfa768b4f14318185644 Parents: 3cf2ee4 Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Thu Sep 11 16:21:42 2014 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Fri Sep 12 10:22:50 2014 -0700 -- .../server/configuration/Configuration.java | 1 - ambari-server/src/main/python/ambari-server.py | 71 +++- .../src/test/python/TestAmbariServer.py | 52 +++--- 3 files changed, 98 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bd28cd9e/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 a3a07b0..78fd7b6 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 @@ -106,7 +106,6 @@ public class Configuration { public static final String CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY = client.api.ssl.cert_pass_file; public static final String CLIENT_API_SSL_CRT_PASS_KEY = client.api.ssl.crt_pass; public static final String CLIENT_API_SSL_KEY_NAME_KEY = client.api.ssl.key_name; - public static final String SERVER_DB_TYPE_KEY = server.jdbc.database; // E.g., oracle|mysql|postgres public static final String SERVER_DB_NAME_KEY = server.jdbc.database_name; public static final String SERVER_DB_NAME_DEFAULT = ambari; public static final String SERVER_JDBC_POSTGRES_SCHEMA_NAME = server.jdbc.postgres.schema; http://git-wip-us.apache.org/repos/asf/ambari/blob/bd28cd9e/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 35ba17b..50420b2 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -304,7 +304,7 @@ DATABASE_INDEX = 0 PROMPT_DATABASE_OPTIONS = False USERNAME_PATTERN = ^[a-zA-Z_][a-zA-Z0-9_\-]*$ PASSWORD_PATTERN = ^[a-zA-Z0-9_-]*$ -DATABASE_NAMES = [postgres, oracle, mysql] +DATABASE_TYPES = [postgres, oracle, mysql] DATABASE_STORAGE_NAMES = [Database, Service, Database] DATABASE_PORTS = [5432, 1521, 3306] DATABASE_DRIVER_NAMES = [org.postgresql.Driver, oracle.jdbc.driver.OracleDriver, com.mysql.jdbc.Driver] @@ -838,8 +838,6 @@ def restart_postgres(): return 0, , -# todo: check if the scheme is already exist - def write_property(key, value): conf_file = find_properties_file() properties = Properties() @@ -1087,7 +1085,7 @@ def get_pass_file_path(conf_file): # Set database properties to default values def load_default_db_properties(args): args.persistence_type = 'local' - args.dbms = DATABASE_NAMES[DATABASE_INDEX] + args.dbms = DATABASE_TYPES[DATABASE_INDEX] args.database_host = localhost args.database_port = DATABASE_PORTS[DATABASE_INDEX] args.database_name = DEFAULT_DB_NAME @@ -1141,7 +1139,7 @@ def prompt_db_properties(args): pass DATABASE_INDEX = args.database_index - args.dbms = DATABASE_NAMES[args.database_index] + args.dbms = DATABASE_TYPES[args.database_index] if args.persistence_type != 'local': args.database_host = get_validated_string_input( @@ -1386,12 +1384,48 @@ def configure_database_password(showDefault=True): return password -def check_database_name_property(): +def get_ambari_version(properties): + + :param properties: Ambari properties + :return: Return a string of the ambari version. When comparing versions, please use compare_versions function. + + version = None + try: +server_version_file_path = properties[SERVER_VERSION_FILE_PATH] +if server_version_file_path and os.path.exists(server_version_file_path): + with open(server_version_file_path, 'r') as file: +version = file.read().strip() + except: +print_error_msg(Error getting ambari version) + return version + + +def check_database_name_property(args, upgrade=False): + + :param upgrade: If Ambari is being upgraded. + :return: +
[12/30] git commit: AMBARI-7273. Admin View: cluster rename controls look a bit out of place.(xi wang)
AMBARI-7273. Admin View: cluster rename controls look a bit out of place.(xi wang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/10dd42ea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/10dd42ea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/10dd42ea Branch: refs/heads/branch-alerts-dev Commit: 10dd42eab0e6ee83e4c1181a3126681863c558e5 Parents: e71d4fa Author: Xi Wang xiw...@apache.org Authored: Thu Sep 11 17:26:51 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Thu Sep 11 17:26:51 2014 -0700 -- .../resources/ui/admin-web/app/views/leftNavbar.html | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/10dd42ea/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 8b57754..b1ab544 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 @@ -38,17 +38,16 @@ class=form-control input-sm tooltip=Only alpha-numeric characters. tooltip-trigger=focus - - button - type=submit - class=btn btn-success btn-xs - ng-class={'disabled': editClusterNameForm.newClusterName.$invalid || editCluster.name == cluster.Clusters.cluster_name} -i class=glyphicon glyphicon-ok/i - /button button ng-click=toggleEditName() - class=btn btn-danger btn-xs + class=btn btn-xs i class=glyphicon glyphicon-remove/i /button + button +type=submit +class=btn btn-primary btn-xs +ng-class={'disabled': editClusterNameForm.newClusterName.$invalid || editCluster.name == cluster.Clusters.cluster_name} +i class=glyphicon glyphicon-ok/i + /button /div /form
[13/30] git commit: AMBARI-7269. StackAdvisorResourceProvider ignores configurations with array type values
AMBARI-7269. StackAdvisorResourceProvider ignores configurations with array type values Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59765552 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59765552 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59765552 Branch: refs/heads/branch-alerts-dev Commit: 59765552c48ec83ad2a54077dc00e69aecd85e8b Parents: 10dd42e Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Thu Sep 11 17:07:47 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Thu Sep 11 18:19:13 2014 -0700 -- .../internal/StackAdvisorResourceProvider.java | 6 +- .../StackAdvisorResourceProviderTest.java | 76 .../resources/ui/app/styles/application.less| 8 +++ 3 files changed, 87 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/59765552/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java index 40b423e..6ae557d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java @@ -176,9 +176,9 @@ public abstract class StackAdvisorResourceProvider extends ReadOnlyResourceProvi return map; } - private static final String CONFIGURATIONS_PROPERTY_ID = recommendations/blueprint/configurations/; + protected static final String CONFIGURATIONS_PROPERTY_ID = recommendations/blueprint/configurations/; - private MapString, MapString, MapString, String calculateConfigurations(Request request) { + protected MapString, MapString, MapString, String calculateConfigurations(Request request) { MapString, MapString, MapString, String configurations = new HashMapString, MapString, MapString, String(); MapString, Object properties = request.getProperties().iterator().next(); for (String property : properties.keySet()) { @@ -202,7 +202,7 @@ public abstract class StackAdvisorResourceProvider extends ReadOnlyResourceProvi siteMap.put(propertiesProperty, propertiesMap); } - String value = (String) properties.get(property); + String value = properties.get(property).toString(); propertiesMap.put(propertyName, value); } catch (Exception e) { LOG.debug(String.format(Error handling configuration property, name = %s, property), e); http://git-wip-us.apache.org/repos/asf/ambari/blob/59765552/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProviderTest.java new file mode 100644 index 000..8c5337b --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProviderTest.java @@ -0,0 +1,76 @@ +/** + * 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.controller.internal; + +import org.apache.ambari.server.controller.AmbariManagementController; +import org.apache.ambari.server.controller.spi.Request; +import org.apache.ambari.server.controller.spi.Resource; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static
[22/30] git commit: Merge remote-tracking branch 'origin/trunk' into origin-trunk
Merge remote-tracking branch 'origin/trunk' into origin-trunk Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a7fb78e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a7fb78e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a7fb78e Branch: refs/heads/branch-alerts-dev Commit: 2a7fb78ec0e9e9a0e0220a474f2821bd997c98ad Parents: 1b52db2 6aeb3be Author: Oleg Nechiporenko onechipore...@apache.org Authored: Fri Sep 12 18:08:09 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Fri Sep 12 18:08:09 2014 +0300 -- .../internal/ServiceConfigVersionResourceProvider.java | 2 +- .../HDP/2.2/services/OOZIE/configuration/oozie-site.xml | 11 +-- 2 files changed, 10 insertions(+), 3 deletions(-) --
[23/30] git commit: AMBARI-7285. Incorrect default configuration for Storm in Ambari 1.6.1. (akovalenko)
AMBARI-7285. Incorrect default configuration for Storm in Ambari 1.6.1. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3cf2ee4d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3cf2ee4d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3cf2ee4d Branch: refs/heads/branch-alerts-dev Commit: 3cf2ee4d483091519279cc9f0e9db5a7fce2eb71 Parents: 2a7fb78 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Fri Sep 12 20:01:23 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Fri Sep 12 20:01:23 2014 +0300 -- ambari-web/app/controllers/wizard/step7_controller.js | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3cf2ee4d/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 3ad55d3..45647bb 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -674,12 +674,16 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, { * @method resolveStormConfigs */ resolveStormConfigs: function (configs) { -var dependentConfigs, gangliaServerHost; +var dependentConfigs, gangliaServerHost, gangliaHostId, hosts; dependentConfigs = ['nimbus.childopts', 'supervisor.childopts', 'worker.childopts']; // if Ganglia selected or installed, set ganglia host to configs if (this.get('installedServiceNames').contains('STORM') this.get('installedServiceNames').contains('GANGLIA')) return; if (this.get('allSelectedServiceNames').contains('GANGLIA') || this.get('installedServiceNames').contains('GANGLIA')) { - gangliaServerHost = this.get('wizardController').getDBProperty('masterComponentHosts').findProperty('component', 'GANGLIA_SERVER').hostName; + hosts = this.get('wizardController').getDBProperty('hosts'); + gangliaHostId = this.get('wizardController').getDBProperty('masterComponentHosts').findProperty('component', 'GANGLIA_SERVER').host_id; + for (var hostName in hosts) { +if (hosts[hostName].id == gangliaHostId) gangliaServerHost = hosts[hostName].name; + } dependentConfigs.forEach(function (configName) { var config = configs.findProperty('name', configName); var replaceStr = config.value.match(/.jar=host[^,]+/)[0];
[05/30] git commit: AMBARI-7233. Admin View: misc UI improvements. (yusaku)
AMBARI-7233. Admin View: misc UI improvements. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d961ca00 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d961ca00 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d961ca00 Branch: refs/heads/branch-alerts-dev Commit: d961ca0049aaf756616a91220f5d9878f7518f2b Parents: 7d9feb6 Author: Yusaku Sako yus...@hortonworks.com Authored: Thu Sep 11 12:49:27 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Thu Sep 11 12:57:11 2014 -0700 -- .../main/resources/ui/admin-web/app/index.html | 7 +++-- .../resources/ui/admin-web/app/scripts/app.js | 3 +- .../controllers/ambariViews/ViewsEditCtrl.js| 7 + .../controllers/groups/GroupsEditCtrl.js| 8 +++--- .../app/scripts/controllers/mainCtrl.js | 2 +- .../scripts/controllers/users/UsersShowCtrl.js | 18 .../ui/admin-web/app/scripts/i18n.config.js | 29 .../resources/ui/admin-web/app/styles/main.css | 9 ++ .../admin-web/app/views/ambariViews/edit.html | 10 +++ .../app/views/clusters/manageAccess.html| 2 +- .../ui/admin-web/app/views/groups/edit.html | 4 +-- .../ui/admin-web/app/views/users/show.html | 8 +++--- .../src/main/resources/ui/admin-web/bower.json | 4 ++- 13 files changed, 78 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d961ca00/ambari-admin/src/main/resources/ui/admin-web/app/index.html -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html b/ambari-admin/src/main/resources/ui/admin-web/app/index.html index e7a8371..7ff0638 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html +++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html @@ -29,6 +29,7 @@ !-- bower:css -- link rel=stylesheet href=bower_components/bootstrap/dist/css/bootstrap.css / link rel=stylesheet href=bower_components/angular-bootstrap-toggle-switch/style/bootstrap3/angular-toggle-switch-bootstrap-3.css / +link rel=stylesheet href=bower_components/font-awesome/css/font-awesome.min.css/ !-- endbower -- !-- endbuild -- @@ -52,12 +53,12 @@ li div class=btn-group dropdown is-open=status.isopen button type=button class=btn btn-default dropdown-toggle navbar-btn ng-disabled=disabled -{{currentUser}} span class=caret/span +i class=fa fa-user/i {{currentUser}} span class=caret/span /button ul class=dropdown-menu role=menu lia href ng-click=about()About/a/li li class=divider/li -lia href ng-click=signOut()Sign Out/a/li +lia href ng-click=signOut()Sign out/a/li /ul /div /li @@ -91,6 +92,7 @@ script src=bower_components/lodash/dist/lodash.compat.js/script script src=bower_components/restangular/dist/restangular.js/script script src=bower_components/angular-bootstrap-toggle-switch/angular-toggle-switch.min.js/script +script src=bower_components/angular-translate/angular-translate.min.js/script !-- endbower -- !-- endbuild -- @@ -112,6 +114,7 @@ !-- build:js scripts/main.js -- script src=scripts/app.js/script script src=scripts/routes.js/script +script src=scripts/i18n.config.js/script script src=scripts/controllers/mainCtrl.js/script script src=scripts/controllers/NavbarCtrl.js/script script src=scripts/controllers/users/UsersCreateCtrl.js/script http://git-wip-us.apache.org/repos/asf/ambari/blob/d961ca00/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js index b580da7..868dafe 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js @@ -23,7 +23,8 @@ angular.module('ambariAdminConsole', [ 'ui.bootstrap', 'restangular', 'angularAlert', - 'toggle-switch' + 'toggle-switch', + 'pascalprecht.translate' ]) .constant('Settings',{ baseUrl: '/api/v1' http://git-wip-us.apache.org/repos/asf/ambari/blob/d961ca00/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js -- diff --git
[26/30] git commit: AMBARI-7274 - Detailed response in 'view cluster information' under Server API documentation (Saurabh Jain via tbeerbower)
AMBARI-7274 - Detailed response in 'view cluster information' under Server API documentation (Saurabh Jain via tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc569f19 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc569f19 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc569f19 Branch: refs/heads/branch-alerts-dev Commit: fc569f191f5a44994e68d4e54aae0ff80192935d Parents: 093ed17 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Fri Sep 12 15:16:58 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Fri Sep 12 15:16:58 2014 -0400 -- ambari-server/docs/api/v1/clusters-cluster.md | 284 ++--- 1 file changed, 188 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc569f19/ambari-server/docs/api/v1/clusters-cluster.md -- diff --git a/ambari-server/docs/api/v1/clusters-cluster.md b/ambari-server/docs/api/v1/clusters-cluster.md index 0a57e43..8da5b29 100644 --- a/ambari-server/docs/api/v1/clusters-cluster.md +++ b/ambari-server/docs/api/v1/clusters-cluster.md @@ -60,105 +60,197 @@ Returns information for the specified cluster identified by :name **Example** -Get information for the cluster c1. +Get information for the cluster cluster001. -GET /clusters/c1 +GET /clusters/cluster001 200 OK { - href : http://your.ambari.server/api/v1/clusters/c1;, - Clusters : { - cluster_name : c1, - cluster_id : 1, - version : HDP-1.2.0 - }, - services : [ - { - href : http://your.ambari.server/api/v1/clusters/c1/services/NAGIOS;, - ServiceInfo : { - cluster_name : c1, - service_name : NAGIOS - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/HCATALOG;, - ServiceInfo : { - cluster_name : c1, - service_name : HCATALOG - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/PIG;, - ServiceInfo : { - cluster_name : c1, - service_name : PIG - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/MAPREDUCE;, - ServiceInfo : { - cluster_name : c1, - service_name : MAPREDUCE - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/GANGLIA;, - ServiceInfo : { - cluster_name : c1, - service_name : GANGLIA - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/HIVE;, - ServiceInfo : { - cluster_name : c1, - service_name : HIVE - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/HDFS;, - ServiceInfo : { - cluster_name : MyIE9, - service_name : HDFS - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/ZOOKEEPER;, - ServiceInfo : { - cluster_name : c1, - service_name : ZOOKEEPER - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/HBASE;, - ServiceInfo : { - cluster_name : c1, - service_name : HBASE - } - }, - { - href : http://your.ambari.server/api/v1/clusters/c1/services/OOZIE;, - ServiceInfo : { - cluster_name : c1, - service_name : OOZIE - } - } + href : http://your.ambari.server/api/v1/clusters/cluster001;, + Clusters : { + cluster_id :
[01/30] git commit: AMBARI-7258 Slider View: FE - Make ganglia monitoring optional when creating app, second patch. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-alerts-dev 853497f8e - aaf051357 AMBARI-7258 Slider View: FE - Make ganglia monitoring optional when creating app, second patch. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8778556f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8778556f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8778556f Branch: refs/heads/branch-alerts-dev Commit: 8778556f438f35c650912ea32e375c5ba0619986 Parents: 3035978 Author: atkach atk...@hortonworks.com Authored: Thu Sep 11 22:08:20 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Thu Sep 11 22:08:20 2014 +0300 -- .../ui/app/controllers/createAppWizard/step3_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8778556f/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js index 0377388..a2eaa2e 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js @@ -127,8 +127,8 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({ Object.keys(newAppConfigs).forEach(function (key) { var label = (!!key.match('^site.')) ? key.substr(5) : key; var configSetting = (configSettings[key]) ? -$.extend({name: key, value: configs[key], label: label}, configSettings[key]) : -{name: key, value: configs[key], label: label}; +$.extend({name: key, value: newAppConfigs[key], label: label}, configSettings[key]) : +{name: key, value: newAppConfigs[key], label: label}; if (key === site.global.ganglia_server_host !!setDefaults App.get('gangliaHost')) { configSetting.value = App.get('gangliaHost');
[21/30] git commit: AMBARI-7283 Oozie config backward in compatible change in HDP2.2 (dsen)
AMBARI-7283 Oozie config backward in compatible change in HDP2.2 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6aeb3be2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6aeb3be2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6aeb3be2 Branch: refs/heads/branch-alerts-dev Commit: 6aeb3be27c4f0f9abc473cd388e954f41fe5172a Parents: ae48015 Author: Dmytro Sen d...@hortonworks.com Authored: Fri Sep 12 17:56:55 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Fri Sep 12 17:56:55 2014 +0300 -- .../HDP/2.2/services/OOZIE/configuration/oozie-site.xml | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6aeb3be2/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml index d39f542..8e8be78 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml @@ -32,7 +32,14 @@ /description /property - - + property +nameoozie.service.coord.check.maximum.frequency/name +valuefalse/value +description + When true, Oozie will reject any coordinators with a frequency faster than 5 minutes. It is not recommended to disable + this check or submit coordinators with frequencies faster than 5 minutes: doing so can cause unintended behavior and + additional system stress. +/description + /property /configuration
git commit: AMBARI-7316 - Alerts: Create Alert Notices For Incoming Alert State Changes (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-alerts-dev aaf051357 - 760bedfe3 AMBARI-7316 - Alerts: Create Alert Notices For Incoming Alert State Changes (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/760bedfe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/760bedfe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/760bedfe Branch: refs/heads/branch-alerts-dev Commit: 760bedfe32f2a673a14cc14e7f2d41794ca3db98 Parents: aaf0513 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Sep 15 14:04:42 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Sep 15 14:04:42 2014 -0400 -- .../ambari/server/agent/HeartBeatHandler.java | 20 ++- .../server/controller/ControllerModule.java | 15 ++ .../apache/ambari/server/events/AlertEvent.java | 58 +++ .../server/events/AlertReceivedEvent.java | 50 +++ .../server/events/AlertStateChangeEvent.java| 85 +++ .../events/listeners/AlertReceivedListener.java | 150 +++ .../listeners/AlertStateChangedListener.java| 98 .../events/publishers/AlertEventPublisher.java | 100 + .../ambari/server/orm/dao/AlertDispatchDAO.java | 22 +++ .../server/orm/entities/AlertGroupEntity.java | 7 +- .../org/apache/ambari/server/state/Alert.java | 55 --- .../server/state/cluster/AlertDataManager.java | 111 -- .../server/orm/dao/AlertDispatchDAOTest.java| 29 .../state/cluster/AlertDataManagerTest.java | 129 14 files changed, 753 insertions(+), 176 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/760bedfe/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java index 492d832..a366301 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java @@ -39,6 +39,9 @@ import org.apache.ambari.server.actionmanager.HostRoleStatus; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.MaintenanceStateHelper; +import org.apache.ambari.server.events.AlertEvent; +import org.apache.ambari.server.events.AlertReceivedEvent; +import org.apache.ambari.server.events.publishers.AlertEventPublisher; import org.apache.ambari.server.metadata.ActionMetadata; import org.apache.ambari.server.state.AgentVersion; import org.apache.ambari.server.state.Alert; @@ -60,7 +63,6 @@ import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.State; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionHash; -import org.apache.ambari.server.state.cluster.AlertDataManager; import org.apache.ambari.server.state.fsm.InvalidStateTransitionException; import org.apache.ambari.server.state.host.HostHealthyHeartbeatEvent; import org.apache.ambari.server.state.host.HostRegistrationRequestEvent; @@ -115,9 +117,12 @@ public class HeartBeatHandler { @Inject private AlertDefinitionHash alertDefinitionHash; - + + /** + * Publishes {@link AlertEvent} instances. + */ @Inject - private AlertDataManager alertManager; + private AlertEventPublisher alertEventPublisher; private MapString, Long hostResponseIds = new ConcurrentHashMapString, Long(); @@ -236,13 +241,16 @@ public class HeartBeatHandler { if (null == hostname || null == heartbeat) { return; } - + if (null != heartbeat.getAlerts()) { for (Alert alert : heartbeat.getAlerts()) { -if (null == alert.getHost()) +if (null == alert.getHost()) { alert.setHost(hostname); +} + Cluster cluster = clusterFsm.getCluster(alert.getCluster()); -alertManager.add(cluster.getClusterId(), alert); +AlertEvent event = new AlertReceivedEvent(cluster.getClusterId(), alert); +alertEventPublisher.publish(event); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/760bedfe/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java index
[03/27] git commit: AMBARI-7303. Manage Ambari and Dashboard should NOT open in named tabs. (onechiporenko)
AMBARI-7303. Manage Ambari and Dashboard should NOT open in named tabs. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae0b1f36 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae0b1f36 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae0b1f36 Branch: refs/heads/branch-alerts-dev Commit: ae0b1f36f32233810bda17bd16fccfe047ee0066 Parents: a96b3f8 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Mon Sep 15 13:56:31 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Mon Sep 15 13:56:31 2014 +0300 -- .../src/main/resources/ui/admin-web/app/views/leftNavbar.html | 2 +- ambari-web/app/templates/application.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ae0b1f36/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 b1ab544..4da46d7 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 @@ -57,7 +57,7 @@ li ng-class={active: isActive('clusters.manageAccess')} a href=#/clusters/{{cluster.Clusters.cluster_name}}/manageAccess class=permissionsPermissions/a /li - lia href=/#/main/dashboard class=gotodashboard target={{cluster.Clusters.cluster_name}}Go to Dashboard/a/li + lia href=/#/main/dashboard class=gotodashboardGo to Dashboard/a/li /ul /div http://git-wip-us.apache.org/repos/asf/ambari/blob/ae0b1f36/ambari-web/app/templates/application.hbs -- diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs index 002c590..6401500 100644 --- a/ambari-web/app/templates/application.hbs +++ b/ambari-web/app/templates/application.hbs @@ -52,7 +52,7 @@ ul class=dropdown-menu lia href= {{action showAboutPopup target=controller}}{{t app.aboutAmbari}}/a/li {{#if App.isAdmin}}{{#unless App.isOperator}} - lia href=/views/ADMIN_VIEW/1.0.0/INSTANCE/#/ target=adminconsole{{t app.manageAmbari}}/a/li + lia href=/views/ADMIN_VIEW/1.0.0/INSTANCE/#/{{t app.manageAmbari}}/a/li {{/unless}}{{/if}} {{#if isClusterDataLoaded}} {{#if App.isAdmin}}
[22/27] git commit: AMBARI-7299. Slider View: Update slider-core JAR to 0.51.0 version (srimanth)
AMBARI-7299. Slider View: Update slider-core JAR to 0.51.0 version (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/26cd2f4b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/26cd2f4b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/26cd2f4b Branch: refs/heads/branch-alerts-dev Commit: 26cd2f4b0f1e7ed23aab9fef3e6365bc4d91094e Parents: f84ee8d Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Sun Sep 14 17:20:06 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Mon Sep 15 15:32:20 2014 -0700 -- .../slider-core/0.41.0/slider-core-0.41.0.jar | Bin 1125710 - 0 bytes .../slider-core/0.41.0/slider-core-0.41.0.pom | 25 -- .../slider-core/0.51.0/slider-core-0.51.0.jar | Bin 0 - 1144236 bytes .../slider-core/0.51.0/slider-core-0.51.0.pom | 25 ++ .../slider/slider-core/maven-metadata-local.xml | 6 +- contrib/views/slider/lib/slider-agent.tar.gz| Bin 0 - 480985 bytes contrib/views/slider/pom.xml| 2 +- .../view/slider/SliderAppsResourceProvider.java | 15 +- .../view/slider/SliderAppsViewController.java | 9 +- .../slider/SliderAppsViewControllerImpl.java| 324 ++- .../view/slider/rest/SliderAppsResource.java| 2 +- .../ambari/view/slider/rest/client/Metric.java | 3 + 12 files changed, 228 insertions(+), 183 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar -- diff --git a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar deleted file mode 100644 index a6e9063..000 Binary files a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar and /dev/null differ http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom -- diff --git a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom deleted file mode 100644 index bdd574b..000 --- a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom +++ /dev/null @@ -1,25 +0,0 @@ -?xml version=1.0 encoding=UTF-8? -!-- - 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. --- -project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns=http://maven.apache.org/POM/4.0.0; -xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; - modelVersion4.0.0/modelVersion - groupIdorg.apache.slider/groupId - artifactIdslider-core/artifactId - version0.41.0/version - descriptionPOM was created from install:install-file/description -/project http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar -- diff --git a/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar new file mode 100644 index 000..e7d7665 Binary files /dev/null and b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar differ http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.pom -- diff --git a/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.pom b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.pom new file mode 100644
[11/27] git commit: AMBARI-7289 - Views : Delete view instance causes auto sign out
AMBARI-7289 - Views : Delete view instance causes auto sign out Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/002a190f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/002a190f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/002a190f Branch: refs/heads/branch-alerts-dev Commit: 002a190fc42752c5a695f29bfc5fb5e1ecbf0052 Parents: 02e9fdb Author: tbeerbower tbeerbo...@hortonworks.com Authored: Fri Sep 12 17:54:33 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Mon Sep 15 13:19:43 2014 -0400 -- .../server/controller/AmbariHandlerList.java| 33 +++- 1 file changed, 32 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/002a190f/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 6a831f8..da15a66 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 @@ -32,6 +32,7 @@ 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.server.session.SessionHandler; import org.eclipse.jetty.servlet.FilterHolder; import org.eclipse.jetty.webapp.WebAppContext; import org.springframework.web.context.WebApplicationContext; @@ -91,7 +92,7 @@ public class AmbariHandlerList extends FailsafeHandlerList implements ViewInstan context.setClassLoader(viewInstanceDefinition.getViewEntity().getClassLoader()); context.setAttribute(ViewContext.CONTEXT_ATTRIBUTE, new ViewContextImpl(viewInstanceDefinition, viewRegistry)); -context.getSessionHandler().setSessionManager(sessionManager); +context.setSessionHandler(new SharedSessionHandler(sessionManager)); context.getServletContext().setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, springWebAppContext); context.addFilter(new FilterHolder(springSecurityFilter), /*, 1); @@ -142,6 +143,7 @@ public class AmbariHandlerList extends FailsafeHandlerList implements ViewInstan public void removeViewInstance(ViewInstanceEntity viewInstanceDefinition) { Handler handler = handlerMap.get(viewInstanceDefinition); if (handler != null) { + handlerMap.remove(viewInstanceDefinition); removeHandler(handler); } } @@ -181,4 +183,33 @@ public class AmbariHandlerList extends FailsafeHandlerList implements ViewInstan */ public Handler create(ViewInstanceEntity viewInstanceDefinition, String webApp, String contextPath); } + + + // - inner class : SharedSessionHandler + + /** + * A session handler that shares its session manager with another app. + * This handler DOES NOT attempt stop the shared session manager. + */ + private static class SharedSessionHandler extends SessionHandler { + +// - Constructors + +/** + * Construct a SharedSessionHandler. + * + * @param manager the shared session manager. + */ +public SharedSessionHandler(SessionManager manager) { + super(manager); +} + + +// - SessionHandler -- + +@Override +protected void doStop() throws Exception { + // do nothing... +} + } }
[23/27] git commit: AMBARI-7190 - Views: attempting to access views during extraction throws exception (reopened)
AMBARI-7190 - Views: attempting to access views during extraction throws exception (reopened) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a412da83 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a412da83 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a412da83 Branch: refs/heads/branch-alerts-dev Commit: a412da83c531ab4c6b0034c4dc087c5b58dff74c Parents: 26cd2f4 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Mon Sep 15 17:58:19 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Mon Sep 15 20:34:54 2014 -0400 -- .../apache/ambari/server/view/ViewRegistry.java | 6 +++-- .../ambari/server/view/ViewRegistryTest.java| 23 2 files changed, 27 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a412da83/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 17d77a6..8f6774e 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 @@ -261,8 +261,10 @@ public class ViewRegistry { public ViewEntity getDefinition(ResourceTypeEntity resourceTypeEntity) { for (ViewEntity viewEntity : viewDefinitions.values()) { - if (viewEntity.getResourceType().equals(resourceTypeEntity)) { -return viewEntity; + if (viewEntity.isDeployed()) { +if (viewEntity.getResourceType().equals(resourceTypeEntity)) { + return viewEntity; +} } } return null; http://git-wip-us.apache.org/repos/asf/ambari/blob/a412da83/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 8e36dba..eba0c25 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 @@ -533,6 +533,29 @@ public class ViewRegistryTest { } @Test + public void testGetDefinition() throws Exception { +ViewEntity viewDefinition = ViewEntityTest.getViewEntity(); + +ViewRegistry registry = ViewRegistry.getInstance(); + +ResourceTypeEntity resourceTypeEntity = new ResourceTypeEntity(); +resourceTypeEntity.setId(10); +resourceTypeEntity.setName(viewDefinition.getName()); + +viewDefinition.setResourceType(resourceTypeEntity); + +registry.addDefinition(viewDefinition); + +viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYING); + +Assert.assertNull(registry.getDefinition(resourceTypeEntity)); + +viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYED); + +Assert.assertEquals(viewDefinition, registry.getDefinition(resourceTypeEntity)); + } + + @Test public void testAddGetInstanceDefinitions() throws Exception { ViewEntity viewDefinition = ViewEntityTest.getViewEntity(); ViewInstanceEntity viewInstanceDefinition = ViewInstanceEntityTest.getViewInstanceEntity();
[26/27] git commit: AMBARI-7328 Config versions have wrong values after switching groups. (atkach)
AMBARI-7328 Config versions have wrong values after switching groups. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bd04a28e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bd04a28e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bd04a28e Branch: refs/heads/branch-alerts-dev Commit: bd04a28e14171f8d64fb6b62678a0a441f444005 Parents: 127978c Author: atkach atk...@hortonworks.com Authored: Tue Sep 16 14:30:45 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Tue Sep 16 14:30:45 2014 +0300 -- .../controllers/main/service/info/configs.js| 113 +-- ambari-web/app/utils/ajax/ajax.js | 9 ++ .../views/common/configs/config_history_flow.js | 2 +- 3 files changed, 86 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bd04a28e/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 2f79685..e10a0ba 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -48,8 +48,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM preSelectedConfigVersion: null, // contain Service Config Property, when user proceed from Select Config Group dialog overrideToAdd: null, - //latest version of service config versions - currentVersion: null, + //version of default config group, configs of which currently applied + currentDefaultVersion: null, //version selected to view selectedVersion: null, // file names of changed configs @@ -58,8 +58,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM serviceConfigVersionNote: '', versionLoaded: false, isCurrentSelected: function () { -return this.get('selectedVersion') === this.get('currentVersion'); - }.property('selectedVersion', 'currentVersion'), +return App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + this.get('selectedVersion')).get('isCurrent'); + }.property('selectedVersion'), serviceConfigs: function () { return App.config.get('preDefinedServiceConfigs'); }.property('App.config.preDefinedServiceConfigs'), @@ -179,6 +179,16 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM }.property('propertyFilters', 'isCompareMode'), /** + * indicate wtether service config version belongs to default config group + * @method isVersionDefault + * @param version + * @return {Boolean} + */ + isVersionDefault: function(version) { +return version version.get('groupId') == -1; + }, + + /** * clear and set properties to default value */ clearStep: function () { @@ -290,41 +300,45 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM /** * load service config versions to model - * set currentVersion + * set currentDefaultVersion * @param data * @param opt * @param params */ loadServiceConfigVersionsSuccess: function (data, opt, params) { App.serviceConfigVersionsMapper.map(data); +this.set('currentDefaultVersion', data.items.filterProperty('group_id', -1).findProperty('is_current').service_config_version); if (this.get('preSelectedConfigVersion')) { - this.set('currentVersion', this.get('preSelectedConfigVersion.version')); + this.loadSelectedVersion(this.get('preSelectedConfigVersion.version')); } else { - this.set('currentVersion', data.items.filterProperty('group_id', -1).findProperty('is_current').service_config_version); + this.loadSelectedVersion(); } -this.loadSelectedVersion(); }, /** * get selected service config version - * In case selected version is undefined then take currentVersion + * In case selected version is undefined then take currentDefaultVersion * @param version */ loadSelectedVersion: function (version) { var self = this; this.set('versionLoaded', false); -var groupName = App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + version).get('groupName'); +version = version || this.get('currentDefaultVersion'); +var versionRecord = App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + version); +//version of non-default group require properties from current version of default group to correctly display page +var versions = (this.isVersionDefault(versionRecord)) ? [version] : [this.get('currentDefaultVersion'), version]; -if (self.get('dataIsLoaded') !(groupName
[04/27] git commit: AMBARI-7304 Python TestExecuteHadoopResource test failures (dsen)
AMBARI-7304 Python TestExecuteHadoopResource test failures (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/258f4541 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/258f4541 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/258f4541 Branch: refs/heads/branch-alerts-dev Commit: 258f454191ad88c0f2ade1c40fb233e0b09b4ebf Parents: ae0b1f3 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Sep 15 14:28:33 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Sep 15 14:32:00 2014 +0300 -- .../TestExecuteHadoopResource.py| 37 1 file changed, 31 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/258f4541/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py index e357390..28453a5 100644 --- a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py +++ b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py @@ -15,6 +15,7 @@ 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. ''' +import os from unittest import TestCase from mock.mock import patch @@ -38,7 +39,11 @@ class TestExecuteHadoopResource(TestCase): self.assertEqual(execute_mock.call_count, 1) self.assertEqual(execute_mock.call_args[0][0].command,'hadoop --config conf_dir command') self.assertEqual(execute_mock.call_args[0][0].arguments, - {'logoutput': True, 'tries': 1, 'user': 'user', 'try_sleep': 0}) + {'logoutput': True, +'tries': 1, +'user': 'user', +'try_sleep': 0, +'environment': {'PATH': os.environ['PATH']}}) @patch(resource_management.core.providers.system.ExecuteProvider) @@ -58,7 +63,11 @@ class TestExecuteHadoopResource(TestCase): self.assertEqual(execute_mock.call_count, 1) self.assertEqual(execute_mock.call_args[0][0].command,'hadoop --config conf_dir command') self.assertEqual(execute_mock.call_args[0][0].arguments, - {'logoutput': False, 'tries': 1, 'user': 'user', 'try_sleep': 0}) + {'logoutput': False, +'tries': 1, +'user': 'user', +'try_sleep': 0, +'environment': {'PATH': os.environ['PATH']}}) @patch(resource_management.core.providers.system.ExecuteProvider) @@ -83,7 +92,11 @@ class TestExecuteHadoopResource(TestCase): self.assertEqual(execute_mock.call_count, 1) self.assertEqual(execute_mock.call_args[0][0].command,'hadoop --config conf_dir command') self.assertEqual(execute_mock.call_args[0][0].arguments, - {'logoutput': True, 'tries': 2, 'user': 'user', 'try_sleep': 2}) + {'logoutput': True, +'tries': 2, +'user': 'user', +'try_sleep': 2, +'environment': {'PATH': os.environ['PATH']}}) @patch(resource_management.core.providers.system.ExecuteProvider) @@ -105,9 +118,17 @@ class TestExecuteHadoopResource(TestCase): self.assertEqual(execute_mock.call_args_list[1][0][0].command, 'hadoop --config conf_dir command2') self.assertEqual(execute_mock.call_args_list[0][0][0].arguments, - {'logoutput': False, 'tries': 1, 'user': 'user', 'try_sleep': 0}) + {'logoutput': False, +'tries': 1, +'user': 'user', +'try_sleep': 0, +'environment': {'PATH': os.environ['PATH']}}) self.assertEqual(execute_mock.call_args_list[1][0][0].arguments, - {'logoutput': False, 'tries': 1, 'user': 'user', 'try_sleep': 0}) + {'logoutput': False, +'tries': 1, +'user': 'user', +'try_sleep': 0, +'environment': {'PATH': os.environ['PATH']}}) @patch(resource_management.core.providers.system.ExecuteProvider) @@ -156,7 +177,11 @@ class TestExecuteHadoopResource(TestCase): self.assertEqual(execute_mock.call_args_list[1][0][0].command, 'hadoop --config conf_dir
[20/27] git commit: AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)
AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/601014ed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/601014ed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/601014ed Branch: refs/heads/branch-alerts-dev Commit: 601014ed8b047c676ece41016a3278c19703794f Parents: 610bb1e Author: Jaimin Jetly jai...@hortonworks.com Authored: Mon Sep 15 12:12:17 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Mon Sep 15 12:12:46 2014 -0700 -- .../ambari_agent/TestActualConfigHandler.py | 6 +- .../test/python/ambari_agent/TestLiveStatus.py | 4 +- ambari-server/docs/api/v1/services.md | 7 - .../internal/BaseBlueprintProcessor.java| 2 +- .../ambari/server/metadata/ActionMetadata.java | 1 - .../org/apache/ambari/server/state/Service.java | 8 +- .../server/upgrade/UpgradeCatalog170.java | 190 + .../custom_actions/validate_configs.py | 2 - .../stacks/HDP/1.3.2/role_command_order.json| 4 +- .../services/HIVE/configuration/webhcat-env.xml | 54 .../HIVE/configuration/webhcat-site.xml | 156 +++ .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 154 ++- .../HIVE/package/files/templetonSmoke.sh| 96 +++ .../services/HIVE/package/scripts/params.py | 31 ++- .../HIVE/package/scripts/service_check.py | 2 + .../HIVE/package/scripts/status_params.py | 3 + .../services/HIVE/package/scripts/webhcat.py| 107 .../HIVE/package/scripts/webhcat_server.py | 53 .../HIVE/package/scripts/webhcat_service.py | 40 +++ .../package/scripts/webhcat_service_check.py| 42 +++ .../HDP/1.3.2/services/NAGIOS/metainfo.xml | 2 +- .../templates/hadoop-servicegroups.cfg.j2 | 6 - .../package/templates/hadoop-services.cfg.j2| 2 +- .../WEBHCAT/configuration/webhcat-env.xml | 54 .../WEBHCAT/configuration/webhcat-site.xml | 156 --- .../HDP/1.3.2/services/WEBHCAT/metainfo.xml | 103 --- .../WEBHCAT/package/files/templetonSmoke.sh | 96 --- .../WEBHCAT/package/scripts/__init__.py | 20 -- .../services/WEBHCAT/package/scripts/params.py | 78 -- .../WEBHCAT/package/scripts/service_check.py| 44 --- .../WEBHCAT/package/scripts/status_params.py| 26 -- .../services/WEBHCAT/package/scripts/webhcat.py | 107 .../WEBHCAT/package/scripts/webhcat_server.py | 53 .../WEBHCAT/package/scripts/webhcat_service.py | 40 --- .../stacks/HDP/1.3/role_command_order.json | 4 +- .../stacks/HDP/1.3/services/HIVE/metainfo.xml | 5 - .../stacks/HDP/2.0.6/role_command_order.json| 4 +- .../services/HIVE/configuration/webhcat-env.xml | 54 .../HIVE/configuration/webhcat-site.xml | 138 ++ .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 165 ++- .../HIVE/package/files/templetonSmoke.sh| 96 +++ .../services/HIVE/package/scripts/params.py | 44 ++- .../HIVE/package/scripts/service_check.py | 2 + .../HIVE/package/scripts/status_params.py | 1 + .../services/HIVE/package/scripts/webhcat.py| 112 .../HIVE/package/scripts/webhcat_server.py | 53 .../HIVE/package/scripts/webhcat_service.py | 40 +++ .../package/scripts/webhcat_service_check.py| 41 +++ .../HDP/2.0.6/services/NAGIOS/metainfo.xml | 2 +- .../templates/hadoop-servicegroups.cfg.j2 | 8 +- .../package/templates/hadoop-services.cfg.j2| 2 +- .../WEBHCAT/configuration/webhcat-env.xml | 54 .../WEBHCAT/configuration/webhcat-site.xml | 138 -- .../HDP/2.0.6/services/WEBHCAT/metainfo.xml | 110 .../WEBHCAT/package/files/templetonSmoke.sh | 96 --- .../WEBHCAT/package/scripts/__init__.py | 20 -- .../services/WEBHCAT/package/scripts/params.py | 102 --- .../WEBHCAT/package/scripts/service_check.py| 45 --- .../WEBHCAT/package/scripts/status_params.py| 26 -- .../services/WEBHCAT/package/scripts/webhcat.py | 112 .../WEBHCAT/package/scripts/webhcat_server.py | 53 .../WEBHCAT/package/scripts/webhcat_service.py | 40 --- .../HDP/2.1.GlusterFS/role_command_order.json | 4 +- .../2.1.GlusterFS/services/HIVE/metainfo.xml| 100 --- .../WEBHCAT/configuration/webhcat-site.xml | 143 -- .../2.1.GlusterFS/services/WEBHCAT/metainfo.xml | 46 .../stacks/HDP/2.1/role_command_order.json | 3 +- .../stacks/HDP/2.1/services/HIVE/metainfo.xml | 62 - .../WEBHCAT/configuration/webhcat-site.xml | 143 -- .../HDP/2.1/services/WEBHCAT/metainfo.xml | 47
[13/27] git commit: AMBARI-7313. Services not starting up after enabling security.(vbrodetskyi)
AMBARI-7313. Services not starting up after enabling security.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bee1d09b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bee1d09b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bee1d09b Branch: refs/heads/branch-alerts-dev Commit: bee1d09b0e82f8dea085b227528995dcf879dd23 Parents: 66048a0 Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Mon Sep 15 20:40:52 2014 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Mon Sep 15 20:40:52 2014 +0300 -- .../1.3.2/hooks/before-START/scripts/shared_initialization.py | 3 ++- .../2.0.6/hooks/before-START/scripts/shared_initialization.py | 3 ++- .../stacks/1.3.2/hooks/before-START/test_before_start.py | 6 -- .../stacks/2.0.6/hooks/before-START/test_before_start.py | 6 -- 4 files changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py index 669414c..60956b0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py @@ -39,7 +39,8 @@ def setup_hadoop(): Directory(params.hdfs_log_dir_prefix, recursive=True, owner='root', - group='root' + group=params.user_group, + mode=0775 ) Directory(params.hadoop_pid_dir_prefix, recursive=True, http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 0d00aca..3c77761 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -38,7 +38,8 @@ def setup_hadoop(): Directory(params.hdfs_log_dir_prefix, recursive=True, owner='root', - group='root' + group=params.user_group, + mode=0775 ) Directory(params.hadoop_pid_dir_prefix, recursive=True, http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py -- diff --git a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py index 112b3e8..d569a95 100644 --- a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py @@ -41,7 +41,8 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('Directory', '/var/log/hadoop', owner = 'root', - group = 'root', + group = 'hadoop', + mode = 0775, recursive = True, ) self.assertResourceCalled('Directory', '/var/run/hadoop', @@ -99,7 +100,8 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('Directory', '/var/log/hadoop', owner = 'root', - group = 'root', + group = 'hadoop', + mode = 0775, recursive = True, ) self.assertResourceCalled('Directory', '/var/run/hadoop', http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py -- diff --git
[08/27] git commit: AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled hdfs for HDP 2.1.x. (Denys Buzhor via akovalenko)
AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled hdfs for HDP 2.1.x. (Denys Buzhor via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8dd0e81d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8dd0e81d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8dd0e81d Branch: refs/heads/branch-alerts-dev Commit: 8dd0e81d8c8c3d4bfb14a0b6e6f301d74c0eac72 Parents: e3dba26 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Mon Sep 15 19:06:50 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Mon Sep 15 19:09:05 2014 +0300 -- .../services/HDFS/configuration/core-site.xml | 9 + .../HDP/2.0.6/services/HDFS/configuration/core-site.xml | 10 ++ ambari-web/app/views/common/quick_view_link_view.js | 6 +- 3 files changed, 24 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8dd0e81d/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml index e335fe2..e79b146 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml @@ -164,4 +164,13 @@ DEFAULT /description /property + property +namedfs.http.policy/name +valueHTTP_ONLY/value +description + Decide if HTTPS(SSL) is supported on HDFS This configures the HTTP endpoint for HDFS daemons: + The following values are supported: - HTTP_ONLY : Service is provided only on http - HTTPS_ONLY : + Service is provided only on https - HTTP_AND_HTTPS : Service is provided both on http and https +/description + /property /configuration http://git-wip-us.apache.org/repos/asf/ambari/blob/8dd0e81d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml index 52764ac..31254b6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml @@ -177,4 +177,14 @@ DEFAULT /description /property + property +namedfs.http.policy/name +valueHTTP_ONLY/value +description + Decide if HTTPS(SSL) is supported on HDFS This configures the HTTP endpoint for HDFS daemons: + The following values are supported: - HTTP_ONLY : Service is provided only on http - HTTPS_ONLY : + Service is provided only on https - HTTP_AND_HTTPS : Service is provided both on http and https +/description + /property + /configuration http://git-wip-us.apache.org/repos/asf/ambari/blob/8dd0e81d/ambari-web/app/views/common/quick_view_link_view.js -- diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js index a8b8a40..0304559 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -309,7 +309,11 @@ App.QuickViewLinks = Em.View.extend({ var hadoopSslEnabled = false; if (configProperties configProperties.length 0) { var site = configProperties.findProperty('type', 'core-site'); - hadoopSslEnabled = (site site.properties site.properties['hadoop.ssl.enabled'] == true); + if (parseInt(App.get('currentStackVersionNumber')[0]) 1) { +hadoopSslEnabled = (Em.get(site, 'properties') site.properties['dfs.http.policy'] === 'HTTPS_ONLY'); + } else { +hadoopSslEnabled = (Em.get(site, 'properties') site.properties['hadoop.ssl.enabled'] == true); + } } switch (service_id) { case GANGLIA:
[07/27] git commit: AMBARI-7310. Error message on ambari-server removal.(vbrodetskyi)
AMBARI-7310. Error message on ambari-server removal.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e3dba263 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e3dba263 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e3dba263 Branch: refs/heads/branch-alerts-dev Commit: e3dba263475ab4a29c57ed041539eebbef8f16d7 Parents: 1719a5c Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Mon Sep 15 18:38:01 2014 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Mon Sep 15 18:38:01 2014 +0300 -- ambari-agent/src/main/package/rpm/preremove.sh | 2 +- ambari-server/src/main/package/rpm/preremove.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e3dba263/ambari-agent/src/main/package/rpm/preremove.sh -- diff --git a/ambari-agent/src/main/package/rpm/preremove.sh b/ambari-agent/src/main/package/rpm/preremove.sh index 5fb9be2..2078acd 100644 --- a/ambari-agent/src/main/package/rpm/preremove.sh +++ b/ambari-agent/src/main/package/rpm/preremove.sh @@ -29,7 +29,7 @@ if [ $1 -eq 0 ]; then # Action is uninstall /var/lib/ambari-agent/install-helper.sh remove fi -chkconfig --del ambari-agent +chkconfig --list | grep ambari-server chkconfig --del ambari-server fi exit 0 http://git-wip-us.apache.org/repos/asf/ambari/blob/e3dba263/ambari-server/src/main/package/rpm/preremove.sh -- diff --git a/ambari-server/src/main/package/rpm/preremove.sh b/ambari-server/src/main/package/rpm/preremove.sh index 073c07f..12b69b6 100644 --- a/ambari-server/src/main/package/rpm/preremove.sh +++ b/ambari-server/src/main/package/rpm/preremove.sh @@ -34,7 +34,7 @@ if [ $1 -eq 0 ]; then # Action is uninstall /var/lib/ambari-server/install-helper.sh remove fi -chkconfig --del ambari-server +chkconfig --list | grep ambari-server chkconfig --del ambari-server fi exit 0
[15/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/data/HDP2/site_properties.js -- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index edcb322..e2cb1cf 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -1564,7 +1564,7 @@ module.exports = name: templeton.hive.archive, displayName: templeton.hive.archive, isRequired: false, - serviceName: WEBHCAT, + serviceName: HIVE, category: Advanced webhcat-site }, { @@ -1572,7 +1572,7 @@ module.exports = name: templeton.pig.archive, displayName: templeton.pig.archive, isRequired: false, - serviceName: WEBHCAT, + serviceName: HIVE, category: Advanced webhcat-site }, { @@ -1580,7 +1580,7 @@ module.exports = name: templeton.zookeeper.hosts, displayName: templeton.zookeeper.hosts, displayType: multiLine, - serviceName: WEBHCAT, + serviceName: HIVE, category: Advanced webhcat-site }, /**pig.properties*/ @@ -2585,7 +2585,7 @@ module.exports = filename: hive-env.xml, category: Advanced hive-env }, - /**WEBHCAT***/ + /**HIVE***/ { id: puppet var, name: webhcatserver_host, @@ -2597,7 +2597,7 @@ module.exports = isOverridable: false, isVisible: true, isRequiredByAgent: false, - serviceName: WEBHCAT, + serviceName: HIVE, filename: webhcat-env.xml, category: WEBHCAT_SERVER }, @@ -2611,7 +2611,7 @@ module.exports = displayType: directory, isOverridable: false, isVisible: true, - serviceName: WEBHCAT, + serviceName: HIVE, filename: webhcat-env.xml, category: Advanced webhcat-env }, @@ -2625,7 +2625,7 @@ module.exports = displayType: directory, isOverridable: false, isVisible: true, - serviceName: WEBHCAT, + serviceName: HIVE, filename: webhcat-env.xml, category: Advanced webhcat-env }, @@ -3334,7 +3334,7 @@ module.exports = filename: core-site.xml, serviceName: MISC, category: Users and Groups, - belongsToService: [HIVE, WEBHCAT, OOZIE, FALCON], + belongsToService: [HIVE, OOZIE, FALCON], index: 18 }, { @@ -3442,9 +3442,9 @@ module.exports = isOverridable: false, isVisible: true, serviceName: MISC, - filename: hcatalog-env.xml, + filename: hive-env.xml, category: Users and Groups, - belongsToService: [HCATALOG], + belongsToService: [HIVE], index: 6 }, { @@ -3460,7 +3460,7 @@ module.exports = serviceName: MISC, filename: webhcat-env.xml, category: Users and Groups, - belongsToService: [WEBHCAT], + belongsToService: [HIVE], index: 7 }, { http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/data/secure_configs.js -- diff --git a/ambari-web/app/data/secure_configs.js b/ambari-web/app/data/secure_configs.js index c0b4dba..c6079c8 100644 --- a/ambari-web/app/data/secure_configs.js +++ b/ambari-web/app/data/secure_configs.js @@ -64,20 +64,11 @@ module.exports = [ displayName: 'Hive', filename: 'hive-site', configCategories: [ - App.ServiceConfigCategory.create({ name: 'Hive Metastore', displayName: 'Hive Metastore and Hive Server 2'}) -], -sites: ['hive-site'], -configs: configProperties.filterProperty('serviceName', 'HIVE') - }, - { -serviceName: 'WEBHCAT', -displayName: 'WebHCat', -filename: 'webhcat-site', -configCategories: [ + App.ServiceConfigCategory.create({ name: 'Hive Metastore', displayName: 'Hive Metastore and Hive Server 2'}), App.ServiceConfigCategory.create({ name: 'WebHCat Server', displayName : 'WebHCat Server'}) ], -sites: ['webhcat-site'], -configs: configProperties.filterProperty('serviceName', 'WEBHCAT') +sites: ['hive-site','webhcat-site'], +configs: configProperties.filterProperty('serviceName', 'HIVE') }, { serviceName: 'HBASE', http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/data/secure_mapping.js -- diff --git a/ambari-web/app/data/secure_mapping.js b/ambari-web/app/data/secure_mapping.js index cc6cc40..c4bd6a4 100644 --- a/ambari-web/app/data/secure_mapping.js +++ b/ambari-web/app/data/secure_mapping.js @@ -371,7 +371,7 @@ module.exports = [
[25/27] git commit: AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and instances created - fixes (srimanth)
AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and instances created - fixes (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/127978c2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/127978c2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/127978c2 Branch: refs/heads/branch-alerts-dev Commit: 127978c2463d8cd8ad55d3ccee276cb350b02b9a Parents: 63f5ed2 Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Tue Sep 16 00:46:38 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Tue Sep 16 00:46:38 2014 -0700 -- .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java| 2 +- .../views/slider/src/main/resources/ui/app/styles/application.less | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/127978c2/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 cc35dec..04533ee 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 @@ -681,7 +681,7 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController { final ActionInstallPackageArgs installArgs = new ActionInstallPackageArgs(); installArgs.name = appName; - installArgs.packageURI = getAppsFolderPath() + configs.get(application.def).getAsString(); + installArgs.packageURI = getAppsFolderPath() + / + configs.get(application.def).getAsString(); installArgs.replacePkg = true; return invokeSliderClientRunnable(new SliderClientContextRunnableString() { http://git-wip-us.apache.org/repos/asf/ambari/blob/127978c2/contrib/views/slider/src/main/resources/ui/app/styles/application.less -- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index c193d3e..b934a20 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -38,7 +38,6 @@ a { #slider-apps-table { .create-app { -margin-top:27px; margin-bottom: 20px; } #slider-table {
[12/27] git commit: AMBARI-7315.Wizards: Wrong behavior on fast clicking Next button. (akovalenko)
AMBARI-7315.Wizards: Wrong behavior on fast clicking Next button. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/66048a05 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/66048a05 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/66048a05 Branch: refs/heads/branch-alerts-dev Commit: 66048a0539b2239bf2aafdaf897f5afb45f71e5d Parents: 002a190 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Mon Sep 15 20:30:35 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Mon Sep 15 20:31:53 2014 +0300 -- .../app/controllers/wizard/step5_controller.js | 38 1 file changed, 24 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/66048a05/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 258e856..68342c7 100644 --- a/ambari-web/app/controllers/wizard/step5_controller.js +++ b/ambari-web/app/controllers/wizard/step5_controller.js @@ -92,6 +92,12 @@ App.WizardStep5Controller = Em.Controller.extend(App.BlueprintMixin, { submitDisabled: false, /** + * Is Submit-click processing now + * @type {bool} + */ + submitButtonClicked: false, + + /** * Trigger for executing host names check for components * Should de triggered when host changed for some component and when new multiple component is added/removed * @type {bool} @@ -1075,30 +1081,34 @@ App.WizardStep5Controller = Em.Controller.extend(App.BlueprintMixin, { /** * Submit button click handler - * @metohd submit + * @method submit */ submit: function () { var self = this; +if (!this.get('submitButtonClicked')) { + this.set('submitButtonClicked', true); -var goNextStepIfValid = function() { - if (!self.get('submitDisabled')) { -App.router.send('next'); - } -}; + var goNextStepIfValid = function () { +if (!self.get('submitDisabled')) { + App.router.send('next'); +} +self.set('submitButtonClicked', false); + }; -if (App.get('supports.serverRecommendValidate')) { - self.recommendAndValidate(function() { -self.showValidationIssuesAcceptBox(goNextStepIfValid); - }); -} else { - self.updateIsSubmitDisabled(); - goNextStepIfValid(); + if (App.get('supports.serverRecommendValidate')) { +self.recommendAndValidate(function () { + self.showValidationIssuesAcceptBox(goNextStepIfValid); +}); + } else { +self.updateIsSubmitDisabled(); +goNextStepIfValid(); + } } }, /** * In case of any validation issues shows accept dialog box for user which allow cancel and fix issues or continue anyway - * @metohd submit + * @method showValidationIssuesAcceptBox */ showValidationIssuesAcceptBox: function(callback) { var self = this;
[05/27] git commit: AMBARI-7305 Nimbus can not be started on CentOS5.9 (dsen)
AMBARI-7305 Nimbus can not be started on CentOS5.9 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/db9b7763 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/db9b7763 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/db9b7763 Branch: refs/heads/branch-alerts-dev Commit: db9b7763f5f69b4a4d03352b668b980d2576f8b3 Parents: 258f454 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Sep 15 15:28:41 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Sep 15 15:28:41 2014 +0300 -- .../stacks/HDP/2.1/services/STORM/configuration/storm-env.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/db9b7763/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml index d3804ee..c663116 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml @@ -48,7 +48,7 @@ # Set Storm specific environment variables here. # The java implementation to use. -export JAVA_HOME={{java_home}} +export JAVA_HOME={{java64_home}} # export STORM_CONF_DIR= /value
[21/27] git commit: AMBARI-7319. Rebalance of HDFS is not working for HDP 1.3. (jaimin)
AMBARI-7319. Rebalance of HDFS is not working for HDP 1.3. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f84ee8dd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f84ee8dd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f84ee8dd Branch: refs/heads/branch-alerts-dev Commit: f84ee8dd7985224b6481a796c6102bb56e0251e8 Parents: 601014e Author: Jaimin Jetly jai...@hortonworks.com Authored: Mon Sep 15 15:31:52 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Mon Sep 15 15:31:52 2014 -0700 -- ambari-web/app/views/main/service/item.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f84ee8dd/ambari-web/app/views/main/service/item.js -- diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js index 2dda3c0..7a388fd 100644 --- a/ambari-web/app/views/main/service/item.js +++ b/ambari-web/app/views/main/service/item.js @@ -196,7 +196,10 @@ App.MainServiceItemView = Em.View.extend({ } options.push(actionMap.TOGGLE_PASSIVE); var serviceName = service.get('serviceName'); - if (serviceName === 'HDFS') { + var nnComponent = App.StackServiceComponent.find().findProperty('componentName','NAMENODE'); + if (serviceName === 'HDFS' nnComponent) { +var namenodeCustomCommands = nnComponent.get('customCommands'); +if (namenodeCustomCommands namenodeCustomCommands.contains('REBALANCEHDFS')) options.push(actionMap.REBALANCE_HDFS); } self.addActionMap().filterProperty('service', serviceName).forEach(function(item) {
[14/27] git commit: AMBARI-7314 - Views : change view status names
AMBARI-7314 - Views : change view status names Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/610bb1e7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/610bb1e7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/610bb1e7 Branch: refs/heads/branch-alerts-dev Commit: 610bb1e7644112f159b15f9fc6f4e51a3350b406 Parents: bee1d09 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Mon Sep 15 14:31:16 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Mon Sep 15 15:10:31 2014 -0400 -- .../AmbariPrivilegeResourceProvider.java| 2 +- .../internal/ViewInstanceResourceProvider.java | 10 - .../ViewPermissionResourceProvider.java | 4 ++-- .../internal/ViewPrivilegeResourceProvider.java | 8 +++ .../ambari/server/orm/entities/ViewEntity.java | 8 +++ .../apache/ambari/server/view/ViewRegistry.java | 4 ++-- .../AmbariPrivilegeResourceProviderTest.java| 2 +- .../ViewInstanceResourceProviderTest.java | 10 - .../ViewPermissionResourceProviderTest.java | 4 ++-- .../ViewPrivilegeResourceProviderTest.java | 2 +- .../server/orm/entities/ViewEntityTest.java | 22 ++-- .../ambari/server/view/ViewRegistryTest.java| 5 ++--- .../org/apache/ambari/view/ViewDefinition.java | 8 +++ 13 files changed, 44 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/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 85e5906..f4839e9 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 @@ -125,7 +125,7 @@ public class AmbariPrivilegeResourceProvider extends PrivilegeResourceProviderO //add view entities ViewRegistry viewRegistry = ViewRegistry.getInstance(); for (ViewEntity viewEntity : viewRegistry.getDefinitions()) { - if (viewEntity.isLoaded()) { + if (viewEntity.isDeployed()) { for (ViewInstanceEntity viewInstanceEntity : viewEntity.getInstances()) { resourceEntities.put(viewInstanceEntity.getResource().getId(), viewInstanceEntity); } http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/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 09b63a4..9a48b41 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 @@ -146,7 +146,7 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider { for (ViewEntity viewDefinition : viewRegistry.getDefinitions()){ // do not report instances for views that are not loaded. -if (viewDefinition.isLoaded()){ +if (viewDefinition.isDeployed()){ if (viewName == null || viewName.equals(viewDefinition.getCommonName())) { for (ViewInstanceEntity viewInstanceDefinition : viewRegistry.getInstanceDefinitions(viewDefinition)) { if (instanceName == null || instanceName.equals(viewInstanceDefinition.getName())) { @@ -348,8 +348,8 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider { throw new IllegalStateException(The view + viewName + is not registered.); } - // the view must be in the LOADED state to create an instance - if (!view.isLoaded()) { + // the view must be in the DEPLOYED state to create an instance + if (!view.isDeployed()) { throw new IllegalStateException(The view + viewName + is not loaded.); } @@ -393,8 +393,8 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider { SetViewInstanceEntity viewInstanceEntities = new HashSetViewInstanceEntity(); for (ViewEntity viewEntity : viewRegistry.getDefinitions()){ -
[18/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py deleted file mode 100644 index c56ae5f..000 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py +++ /dev/null @@ -1,112 +0,0 @@ - -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. - -Ambari Agent - - -from resource_management import * -import sys - - -def webhcat(): - import params - - params.HdfsDirectory(params.webhcat_apps_dir, - action=create_delayed, - owner=params.webhcat_user, - mode=0755 - ) - if params.hcat_hdfs_user_dir != params.webhcat_hdfs_user_dir: -params.HdfsDirectory(params.hcat_hdfs_user_dir, - action=create_delayed, - owner=params.hcat_user, - mode=params.hcat_hdfs_user_mode -) - params.HdfsDirectory(params.webhcat_hdfs_user_dir, - action=create_delayed, - owner=params.webhcat_user, - mode=params.webhcat_hdfs_user_mode - ) - params.HdfsDirectory(None, action=create) - - Directory(params.templeton_pid_dir, -owner=params.webhcat_user, -mode=0755, -group=params.user_group, -recursive=True) - - Directory(params.templeton_log_dir, -owner=params.webhcat_user, -mode=0755, -group=params.user_group, -recursive=True) - - Directory(params.config_dir, -owner=params.webhcat_user, -group=params.user_group) - - XmlConfig(webhcat-site.xml, -conf_dir=params.config_dir, -configurations=params.config['configurations']['webhcat-site'], - configuration_attributes=params.config['configuration_attributes']['webhcat-site'], -owner=params.webhcat_user, -group=params.user_group, - ) - - File(format({config_dir}/webhcat-env.sh), - owner=params.webhcat_user, - group=params.user_group, - content=InlineTemplate(params.webhcat_env_sh_template) - ) - - if params.security_enabled: -kinit_if_needed = format({kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name};) - else: -kinit_if_needed = - - if kinit_if_needed: -Execute(kinit_if_needed, -user=params.webhcat_user, -path='/bin' -) - - CopyFromLocal(params.hadoop_streeming_jars, -owner=params.webhcat_user, -mode=0755, -dest_dir=params.webhcat_apps_dir, -kinnit_if_needed=kinit_if_needed, -hdfs_user=params.hdfs_user, -hadoop_conf_dir=params.hadoop_conf_dir - ) - - CopyFromLocal('/usr/share/HDP-webhcat/pig.tar.gz', -owner=params.webhcat_user, -mode=0755, -dest_dir=params.webhcat_apps_dir, -kinnit_if_needed=kinit_if_needed, -hdfs_user=params.hdfs_user, -hadoop_conf_dir=params.hadoop_conf_dir - ) - - CopyFromLocal('/usr/share/HDP-webhcat/hive.tar.gz', -owner=params.webhcat_user, -mode=0755, -dest_dir=params.webhcat_apps_dir, -kinnit_if_needed=kinit_if_needed, -hdfs_user=params.hdfs_user, -hadoop_conf_dir=params.hadoop_conf_dir - ) http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py deleted file mode 100644 index 2111fa4..000 ---