ambari git commit: AMBARI-10550. NameNode Restart fails after attempt to Kerberize Cluster (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk f69d157c8 -> 7c3015fee AMBARI-10550. NameNode Restart fails after attempt to Kerberize Cluster (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c3015fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c3015fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c3015fe Branch: refs/heads/trunk Commit: 7c3015fee5afd647c73b1af6ac492569dc958ee4 Parents: f69d157 Author: Robert Levas Authored: Fri Apr 17 21:35:16 2015 -0400 Committer: Robert Levas Committed: Fri Apr 17 21:35:16 2015 -0400 -- .../2.1.0.2.0/package/scripts/params_linux.py | 30 ++-- .../package/scripts/setup_ranger_hdfs.py| 6 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3015fe/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py index b0e100f..034d544 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py @@ -244,23 +244,23 @@ if journalnode_address: if security_enabled: - _dn_principal_name = config['configurations']['hdfs-site']['dfs.datanode.kerberos.principal'] - _dn_keytab = config['configurations']['hdfs-site']['dfs.datanode.keytab.file'] - _dn_principal_name = _dn_principal_name.replace('_HOST',hostname.lower()) + dn_principal_name = config['configurations']['hdfs-site']['dfs.datanode.kerberos.principal'] + dn_keytab = config['configurations']['hdfs-site']['dfs.datanode.keytab.file'] + dn_principal_name = dn_principal_name.replace('_HOST',hostname.lower()) - dn_kinit_cmd = format("{kinit_path_local} -kt {_dn_keytab} {_dn_principal_name};") + dn_kinit_cmd = format("{kinit_path_local} -kt {dn_keytab} {dn_principal_name};") - _nn_principal_name = config['configurations']['hdfs-site']['dfs.namenode.kerberos.principal'] - _nn_keytab = config['configurations']['hdfs-site']['dfs.namenode.keytab.file'] - _nn_principal_name = _nn_principal_name.replace('_HOST',hostname.lower()) + nn_principal_name = config['configurations']['hdfs-site']['dfs.namenode.kerberos.principal'] + nn_keytab = config['configurations']['hdfs-site']['dfs.namenode.keytab.file'] + nn_principal_name = nn_principal_name.replace('_HOST',hostname.lower()) - nn_kinit_cmd = format("{kinit_path_local} -kt {_nn_keytab} {_nn_principal_name};") + nn_kinit_cmd = format("{kinit_path_local} -kt {nn_keytab} {nn_principal_name};") - _jn_principal_name = default("/configurations/hdfs-site/dfs.journalnode.kerberos.principal", None) - if _jn_principal_name: -_jn_principal_name = _jn_principal_name.replace('_HOST', hostname.lower()) - _jn_keytab = default("/configurations/hdfs-site/dfs.journalnode.keytab.file", None) - jn_kinit_cmd = format("{kinit_path_local} -kt {_jn_keytab} {_jn_principal_name};") + jn_principal_name = default("/configurations/hdfs-site/dfs.journalnode.kerberos.principal", None) + if jn_principal_name: +jn_principal_name = jn_principal_name.replace('_HOST', hostname.lower()) + jn_keytab = default("/configurations/hdfs-site/dfs.journalnode.keytab.file", None) + jn_kinit_cmd = format("{kinit_path_local} -kt {jn_keytab} {jn_principal_name};") else: dn_kinit_cmd = "" nn_kinit_cmd = "" @@ -372,8 +372,8 @@ repo_config_username = default("/configurations/ranger-hdfs-plugin-properties/RE repo_config_password = default("/configurations/ranger-hdfs-plugin-properties/REPOSITORY_CONFIG_PASSWORD", "hadoop") if security_enabled: - _sn_principal_name = default("/configurations/hdfs-site/dfs.secondary.namenode.kerberos.principal", "nn/_h...@example.com") - _sn_principal_name = _sn_principal_name.replace('_HOST',hostname.lower()) + sn_principal_name = default("/configurations/hdfs-site/dfs.secondary.namenode.kerberos.principal", "nn/_h...@example.com") + sn_principal_name = sn_principal_name.replace('_HOST',hostname.lower()) admin_uname = default("/configurations/ranger-env/admin_username", "admin") admin_password = default("/configurations/ranger-env/admin_password", "admin") http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3015fe/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py -- diff --git a/ambari-server/src/ma
[2/2] ambari git commit: AMBARI-10582. Clicking on cancel icon on the widget should hide it(XIWANG)
AMBARI-10582. Clicking on cancel icon on the widget should hide it(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/87198125 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/87198125 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/87198125 Branch: refs/heads/trunk Commit: 871981252da501cecb33290a4e191be0b66c595a Parents: fc5b29f Author: Xi Wang Authored: Fri Apr 17 15:49:51 2015 -0700 Committer: Xi Wang Committed: Fri Apr 17 17:36:30 2015 -0700 -- .../app/controllers/main/service/info/summary.js | 4 ambari-web/app/mixins/common/widget_mixin.js | 14 ++ .../app/templates/common/widget/gauge_widget.hbs | 2 +- .../app/templates/common/widget/graph_widget.hbs | 2 +- .../app/templates/common/widget/number_widget.hbs | 2 +- .../app/templates/common/widget/template_widget.hbs | 2 +- .../app/templates/main/service/info/summary.hbs | 2 +- 7 files changed, 19 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/87198125/ambari-web/app/controllers/main/service/info/summary.js -- diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js index 696d2c9..054ab31 100644 --- a/ambari-web/app/controllers/main/service/info/summary.js +++ b/ambari-web/app/controllers/main/service/info/summary.js @@ -331,6 +331,10 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({ * @type {boolean} */ isAllSharedWidgetsLoaded: false, + + /** + * @type {boolean} + */ isMineWidgetsLoaded: false, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/87198125/ambari-web/app/mixins/common/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widget_mixin.js b/ambari-web/app/mixins/common/widget_mixin.js index 35b11b1..33d81fc 100644 --- a/ambari-web/app/mixins/common/widget_mixin.js +++ b/ambari-web/app/mixins/common/widget_mixin.js @@ -316,20 +316,26 @@ App.WidgetMixin = Ember.Mixin.create({ /* * make call when clicking on "remove icon" on widget */ - hideWidget: function () { - + hideWidget: function (event) { +this.get('controller').hideWidget( + { +context: Em.Object.create({ + id: event.context +}) + } +); }, /* * make call when clicking on "clone icon" on widget */ - cloneWidget: function () { + cloneWidget: function (event) { }, /* * make call when clicking on "edit icon" on widget */ - editWidget: function () { + editWidget: function (event) { } http://git-wip-us.apache.org/repos/asf/ambari/blob/87198125/ambari-web/app/templates/common/widget/gauge_widget.hbs -- diff --git a/ambari-web/app/templates/common/widget/gauge_widget.hbs b/ambari-web/app/templates/common/widget/gauge_widget.hbs index 1846670..3dd54c1 100644 --- a/ambari-web/app/templates/common/widget/gauge_widget.hbs +++ b/ambari-web/app/templates/common/widget/gauge_widget.hbs @@ -18,7 +18,7 @@ {{#if view.isLoaded}} - + {{view.content.displayName}} http://git-wip-us.apache.org/repos/asf/ambari/blob/87198125/ambari-web/app/templates/common/widget/graph_widget.hbs -- diff --git a/ambari-web/app/templates/common/widget/graph_widget.hbs b/ambari-web/app/templates/common/widget/graph_widget.hbs index ede376f..9c1560f 100644 --- a/ambari-web/app/templates/common/widget/graph_widget.hbs +++ b/ambari-web/app/templates/common/widget/graph_widget.hbs @@ -18,7 +18,7 @@ {{#if view.isLoaded}} - + {{view.content.displayName}} http://git-wip-us.apache.org/repos/asf/ambari/blob/87198125/ambari-web/app/templates/common/widget/number_widget.hbs -- diff --git a/ambari-web/app/templates/common/widget/number_widget.hbs b/ambari-web/app/templates/common/widget/number_widget.hbs index be32201..d1bdc97 100644 --- a/ambari-web/app/templates/common/widget/number_widget.hbs +++ b/ambari-web/app/templates/common/widget/number_widget.hbs @@ -18,7 +18,7 @@ {{#if view.isLoaded}} - + {{view.content.displayName}} http://git-wip-us.apache.org/repos/asf/ambari/blob/87198125/ambari-web/app/templates/common/widget/template_widget.hbs -- diff --git a/ambari-web/app/templates/common/widget/template_widget.hbs b/ambari-web/app/templates/common/widget/template_widget
[1/2] ambari git commit: AMBARI-10584. Widget Browser: need to update api call because of api change.(XIWANG)
Repository: ambari Updated Branches: refs/heads/trunk fc5b29f43 -> f69d157c8 AMBARI-10584. Widget Browser: need to update api call because of api change.(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f69d157c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f69d157c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f69d157c Branch: refs/heads/trunk Commit: f69d157c8d428f31a206ec9e92a66e43c3e4e980 Parents: 8719812 Author: Xi Wang Authored: Fri Apr 17 17:36:22 2015 -0700 Committer: Xi Wang Committed: Fri Apr 17 17:36:30 2015 -0700 -- .../controllers/main/service/info/summary.js| 28 ++-- ambari-web/app/utils/ajax/ajax.js | 4 +-- .../app/views/main/service/info/summary.js | 1 - 3 files changed, 16 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f69d157c/ambari-web/app/controllers/main/service/info/summary.js -- diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js index 054ab31..9acf5ee 100644 --- a/ambari-web/app/controllers/main/service/info/summary.js +++ b/ambari-web/app/controllers/main/service/info/summary.js @@ -442,18 +442,18 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({ if (data.items[0] && data.items.length) { this.set("allSharedWidgets", data.items.filter(function (widget) { - return widget.Widgets.widget_type != "HEATMAP"; + return widget.WidgetInfo.widget_type != "HEATMAP"; }).map(function (widget) { - var widgetType = widget.Widgets.widget_type; - var widgetName = widget.Widgets.widget_name; + var widgetType = widget.WidgetInfo.widget_type; + var widgetName = widget.WidgetInfo.widget_name; return Em.Object.create({ -id: widget.Widgets.id, +id: widget.WidgetInfo.id, widgetName: widgetName, -displayName: widget.Widgets.display_name, -description: widget.Widgets.description, +displayName: widget.WidgetInfo.display_name, +description: widget.WidgetInfo.description, widgetType: widgetType, iconPath: "/img/widget-" + widgetType.toLowerCase() + ".png", -serviceName: JSON.parse(widget.Widgets.metrics).mapProperty('service_name').uniq().join('-'), +serviceName: JSON.parse(widget.WidgetInfo.metrics).mapProperty('service_name').uniq().join('-'), added: addedWidgetsNames.contains(widgetName), isShared: true }); @@ -491,18 +491,18 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({ if (data.items[0] && data.items.length) { this.set("mineWidgets", data.items.filter(function (widget) { - return widget.Widgets.widget_type != "HEATMAP"; + return widget.WidgetInfo.widget_type != "HEATMAP"; }).map(function (widget) { - var widgetType = widget.Widgets.widget_type; - var widgetName = widget.Widgets.widget_name; + var widgetType = widget.WidgetInfo.widget_type; + var widgetName = widget.WidgetInfo.widget_name; return Em.Object.create({ -id: widget.Widgets.id, +id: widget.WidgetInfo.id, widgetName: widgetName, -displayName: widget.Widgets.display_name, -description: widget.Widgets.description, +displayName: widget.WidgetInfo.display_name, +description: widget.WidgetInfo.description, widgetType: widgetType, iconPath: "/img/widget-" + widgetType.toLowerCase() + ".png", -serviceName: JSON.parse(widget.Widgets.metrics).mapProperty('service_name').uniq().join('-'), +serviceName: JSON.parse(widget.WidgetInfo.metrics).mapProperty('service_name').uniq().join('-'), added: addedWidgetsNames.contains(widgetName), isShared: false }); http://git-wip-us.apache.org/repos/asf/ambari/blob/f69d157c/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 1657196..ff3253b 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -2407,12 +2407,12 @@ var urls = { }, 'widgets.all.shared.get': { -real: '/clusters/{clusterName}/widgets?Widgets/scope=CLUSTER&fields=*', +real: '/clusters/{clusterName}/widgets?WidgetInfo/scope=CLUSTER&fields=*', mock: '/data/widget_layouts/all_shared_widgets.json' }, 'widgets.all.mine.get': {
ambari git commit: AMBARI-10567. Integrate displaying of Graph widget on service summary page with the API. (Andrii via Jaimin)
Repository: ambari Updated Branches: refs/heads/trunk f76f239d8 -> fc5b29f43 AMBARI-10567. Integrate displaying of Graph widget on service summary page with the API. (Andrii via Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc5b29f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc5b29f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc5b29f4 Branch: refs/heads/trunk Commit: fc5b29f435a2e4504d191c885403d1b6038be806 Parents: f76f239 Author: Jaimin Jetly Authored: Fri Apr 17 16:58:59 2015 -0700 Committer: Jaimin Jetly Committed: Fri Apr 17 16:58:59 2015 -0700 -- .../HBASE/0.96.0.2.0/widgets.json | 10 ++-- .../HBASE/1.1.0.2.3/widgets.json| 10 ++-- .../stacks/HDP/2.3/services/HBASE/widgets.json | 10 ++-- .../widget_layouts/HBASE/default_dashboard.json | 2 +- .../controllers/main/service/info/summary.js| 4 +- ambari-web/app/mappers/widget_layout_mapper.js | 55 ambari-web/app/mappers/widget_mapper.js | 20 +++ ambari-web/app/models/widget.js | 1 + .../views/common/widget/graph_widget_view.js| 16 +++--- .../app/views/main/service/info/summary.js | 2 +- .../main/service/info/summary_test.js | 6 ++- 11 files changed, 55 insertions(+), 81 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc5b29f4/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/widgets.json b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/widgets.json index c0e9821..8920843 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/widgets.json +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/widgets.json @@ -86,7 +86,7 @@ } ], "properties": { -"display_unit": "%" +"display_unit": "" } }, { @@ -128,7 +128,7 @@ } ], "properties": { -"display_unit": "%" +"display_unit": "" } }, { @@ -165,14 +165,14 @@ "is_visible": true, "metrics": [ { - "name": "ipc.IPC.numOpenConnections", - "metric_path": "metrics/hbase/ipc/IPC/numOpenConnections", + "name": "ipc.IPC.numActiveHandler", + "metric_path": "metrics/hbase/ipc/IPC/numActiveHandler", "service_name": "HBASE", "component_name": "HBASE_REGIONSERVER" }, { "name": "ipc.IPC.numCallsInGeneralQueue", - "metric_path": "metrics/hbase/ipc/IPC/numOpenConnections", + "metric_path": "metrics/hbase/ipc/IPC/numCallsInGeneralQueue", "service_name": "HBASE", "component_name": "HBASE_REGIONSERVER" } http://git-wip-us.apache.org/repos/asf/ambari/blob/fc5b29f4/ambari-server/src/main/resources/common-services/HBASE/1.1.0.2.3/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/1.1.0.2.3/widgets.json b/ambari-server/src/main/resources/common-services/HBASE/1.1.0.2.3/widgets.json index bdb4338..1212133 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/1.1.0.2.3/widgets.json +++ b/ambari-server/src/main/resources/common-services/HBASE/1.1.0.2.3/widgets.json @@ -92,7 +92,7 @@ } ], "properties": { -"display_unit": "%" +"display_unit": "" } }, { @@ -134,7 +134,7 @@ } ], "properties": { -"display_unit": "%" +"display_unit": "" } }, { @@ -171,14 +171,14 @@ "is_visible": true, "metrics": [ { - "name": "ipc.IPC.numOpenConnections", - "metric_path": "metrics/hbase/ipc/IPC/numOpenConnections", + "name": "ipc.IPC.numActiveHandler", + "metric_path": "metrics/hbase/ipc/IPC/numActiveHandler", "service_name": "HBASE", "component_name": "HBASE_REGIONSERVER" }, { "name": "ipc.IPC.numCallsInGeneralQueue", - "metric_path": "metrics/hbase/ipc/IPC/numOpenConnections", + "metric_path": "metrics/hbase/ipc/IPC/numCallsInGeneralQueue", "service_name": "HBASE", "component_name": "HBASE_REGIONSERVER" } http://git-wip-us.
ambari git commit: AMBARI-10577: [WinTP2] After refactoring YARN, HIVE services, some files are still located under HDPWIN\2.1\services\\package (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk 180640d94 -> f76f239d8 AMBARI-10577: [WinTP2] After refactoring YARN, HIVE services, some files are still located under HDPWIN\2.1\services\\package (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f76f239d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f76f239d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f76f239d Branch: refs/heads/trunk Commit: f76f239d809c9ab9d1380a1bdb133c91d9eccb17 Parents: 180640d Author: Jayush Luniya Authored: Fri Apr 17 15:44:42 2015 -0700 Committer: Jayush Luniya Committed: Fri Apr 17 15:44:42 2015 -0700 -- .../files/validateYarnComponentStatus.py| 170 --- .../files/validateYarnComponentStatusWindows.py | 161 ++ .../package/scripts/mapred_service_check.py | 2 +- .../2.1.0.2.0/package/scripts/service_check.py | 2 +- .../HIVE/package/files/templetonSmoke.sh| 96 --- .../HIVE/package/templates/webhcat-env.sh.j2| 62 --- .../files/validateYarnComponentStatus.py| 161 -- 7 files changed, 163 insertions(+), 491 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f76f239d/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/files/validateYarnComponentStatus.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/files/validateYarnComponentStatus.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/files/validateYarnComponentStatus.py deleted file mode 100644 index 33ed8b1..000 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/files/validateYarnComponentStatus.py +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env python - -''' -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. -''' - -import optparse -import subprocess -import json - -RESOURCEMANAGER = 'rm' -NODEMANAGER = 'nm' -HISTORYSERVER = 'hs' - -STARTED_STATE = 'STARTED' -RUNNING_STATE = 'RUNNING' - -#Return reponse for given path and address -def getResponse(path, address, ssl_enabled): - - command = "curl" - httpGssnegotiate = "--negotiate" - userpswd = "-u:" - insecure = "-k"# This is smoke test, no need to check CA of server - if ssl_enabled: -url = 'https://' + address + path - else: -url = 'http://' + address + path - - command_with_flags = [command,httpGssnegotiate,userpswd,insecure,url] - - proc = subprocess.Popen(command_with_flags, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - (stdout, stderr) = proc.communicate() - response = json.loads(stdout) - if response == None: -print 'There is no response for url: ' + str(url) -raise Exception('There is no response for url: ' + str(url)) - return response - -#Verify that REST api is available for given component -def validateAvailability(component, path, addresses, ssl_enabled): - responses = {} - for address in addresses.split(','): -try: - responses[address] = getResponse(path, address, ssl_enabled) -except Exception as e: - print 'Error checking availability status of component.', e - - if not responses: -exit(1) - - is_valid = validateAvailabilityResponse(component, responses.values()[0]) - if not is_valid: -exit(1) - -#Validate component-specific response -def validateAvailabilityResponse(component, response): - try: -if component == RESOURCEMANAGER: - rm_state = response['clusterInfo']['state'] - if rm_state == STARTED_STATE: -return True - else: -print 'Resourcemanager is not started' -return False - -elif component == NODEMANAGER: - node_healthy = bool(response['nodeInfo']['nodeHealthy']) - if node_healthy: -return True - else: -return False -elif component == HISTORYSERVER: - hs_start_time = response['historyInfo']['startedOn'] - if hs_start_time > 0: -return True - else: -return False -
ambari git commit: AMBARI-10491 [WinTP2] Ambari server: Ensure the service can be configured to run under a domain account
Repository: ambari Updated Branches: refs/heads/trunk bdf5effbe -> 180640d94 AMBARI-10491 [WinTP2] Ambari server: Ensure the service can be configured to run under a domain account +Fixed service username handling at registration. +Fixed service registration workflow. +Updated unit tests. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/180640d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/180640d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/180640d9 Branch: refs/heads/trunk Commit: 180640d943736b90ca2bc03f3ed6512e73e8d5e6 Parents: bdf5eff Author: Florian Barca Authored: Fri Apr 17 15:33:59 2015 -0700 Committer: Florian Barca Committed: Fri Apr 17 15:33:59 2015 -0700 -- .../main/python/ambari_commons/os_windows.py| 12 +- ambari-server/src/main/python/ambari-server.py | 17 +- .../python/ambari_server/serverConfiguration.py | 3 - .../main/python/ambari_server/serverSetup.py| 154 --- .../src/main/python/ambari_windows_service.py | 17 +- .../src/test/python/TestAmbariServer.py | 142 - 6 files changed, 201 insertions(+), 144 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/180640d9/ambari-common/src/main/python/ambari_commons/os_windows.py -- diff --git a/ambari-common/src/main/python/ambari_commons/os_windows.py b/ambari-common/src/main/python/ambari_commons/os_windows.py index edbcc7b..38db310 100644 --- a/ambari-common/src/main/python/ambari_commons/os_windows.py +++ b/ambari-common/src/main/python/ambari_commons/os_windows.py @@ -629,7 +629,7 @@ class WinService(win32serviceutil.ServiceFramework): installArgs.append("--perfmondll=" + perfMonDll) installArgs.append("install") -win32serviceutil.HandleCommandLine(cls, classPath, installArgs) +return win32serviceutil.HandleCommandLine(cls, classPath, installArgs) @classmethod def Start(cls, waitSecs = 30): @@ -740,6 +740,16 @@ class UserHelper(object): return UserHelper.ACTION_FAILED, e.strerror return UserHelper.ACTION_OK, "User created." + def find_user(self): +try: + user_info = win32net.NetUserGetInfo(self.dcName, self.userName, 0) +except pywintypes.error as e: + if e.winerror == 2221: +return False + else: +raise +return True + def add_user_privilege(self, privilege): try: acc_sid = win32security.LookupAccountName(self.dcName, self.userName)[0] http://git-wip-us.apache.org/repos/asf/ambari/blob/180640d9/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 f1f005d..749a965 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -69,12 +69,6 @@ class UserActionRestart(UserAction): self.need_restart = self.fn(*self.args, **self.kwargs) -def winsetup(options): - from ambari_windows_service import svcsetup - - setup(options) - svcsetup() - # # Starts the Ambari Server as a standalone process. # Ensures only one instance of the process is running. @@ -269,6 +263,13 @@ def restore(args): @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY) def init_parser_options(parser): + parser.add_option('-k', '--service-user-name', dest="svc_user", +default=None, +help="User account under which the Ambari Server service will run") + parser.add_option('-x', '--service-user-password', dest="svc_password", +default=None, +help="Password for the Ambari Server service user account") + parser.add_option('-f', '--init-script-file', dest="init_db_script_file", default="resources" + os.sep + "Ambari-DDL-SQLServer-CREATE.sql", help="File with database setup script") @@ -302,7 +303,7 @@ def init_parser_options(parser): help="Database user password") parser.add_option('--jdbc-driver', default=None, dest="jdbc_driver", help="Specifies the path to the JDBC driver JAR file") - # -b, -i, -k and -x the remaining available short options + # -b and -i the remaining available short options # -h reserved for help @OsFamilyFuncImpl(OsFamilyImpl.DEFAULT) @@ -475,7 +476,7 @@ def fix_database_options(options, parser): @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY) def create_user_action_map(args, options): action_map = { -SETUP_ACTION: UserAction(winsetup, options), +SETUP_ACTION: UserAction(setup, options), START_ACTION: UserAction(svcstart), PSTART_ACTION: UserActi
ambari git commit: AMBARI-10580 - Ambari Database Upgrades For Stack Entity Changes (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 1e631ce38 -> bdf5effbe AMBARI-10580 - Ambari Database Upgrades For Stack Entity Changes (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bdf5effb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bdf5effb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bdf5effb Branch: refs/heads/trunk Commit: bdf5effbe899c93b7da408417474f1c8cdbb4b2b Parents: 1e631ce Author: Jonathan Hurley Authored: Fri Apr 17 17:36:26 2015 -0400 Committer: Jonathan Hurley Committed: Fri Apr 17 17:56:15 2015 -0400 -- .../server/alerts/StaleAlertRunnable.java | 11 +- .../ambari/server/stack/StackManager.java | 9 + .../services/AmbariServerAlertService.java | 1 + .../server/upgrade/AbstractUpgradeCatalog.java | 8 + .../server/upgrade/SchemaUpgradeHelper.java | 19 ++ .../ambari/server/upgrade/UpgradeCatalog.java | 25 ++- .../server/upgrade/UpgradeCatalog200.java | 2 +- .../server/upgrade/UpgradeCatalog210.java | 217 ++- .../server/alerts/StaleAlertRunnableTest.java | 41 +++- .../server/upgrade/UpgradeCatalog210Test.java | 74 +++ .../ambari/server/upgrade/UpgradeTest.java | 2 - 11 files changed, 342 insertions(+), 67 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bdf5effb/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java b/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java index 40e6fb2..e23dd62 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java @@ -47,8 +47,10 @@ import com.google.inject.Provider; /** * The {@link StaleAlertRunnable} is used by the - * {@link AmbariServerAlertService} to check agent heartbeats and fire alert - * events when an agent host changes state. + * {@link AmbariServerAlertService} to check the last time that an alert was + * checked and determine if it seems to no longer be running. It will produce a + * single alert with {@link AlertState#CRITICAL} along with a textual + * description of the alerts that are stale. */ public class StaleAlertRunnable implements Runnable { @@ -154,6 +156,11 @@ public class StaleAlertRunnable implements Runnable { continue; } + // skip this alert (who watches the watchers) + if (definition.getDefinitionName().equals(STALE_ALERT_DEFINITION_NAME)) { +continue; + } + // convert minutes to milliseconds for the definition's interval long intervalInMillis = definition.getScheduleInterval() * MINUTE_TO_MS_CONVERSION; http://git-wip-us.apache.org/repos/asf/ambari/blob/bdf5effb/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java index 1026245..832370d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java @@ -104,6 +104,8 @@ public class StackManager { ActionMetadata actionMetadata, StackDAO stackDao) throws AmbariException { +LOG.info("Initializing the stack manager..."); + validateStackDirectory(stackRoot); validateCommonServicesDirectory(commonServicesRoot); @@ -125,6 +127,8 @@ public class StackManager { String stackVersion = stack.getVersion(); if (stackDao.find(stackName, stackVersion) == null) { +LOG.info("Adding stack {}-{} to the database", stackName, stackVersion); + StackEntity stackEntity = new StackEntity(); stackEntity.setStackName(stackName); stackEntity.setStackVersion(stackVersion); @@ -236,6 +240,9 @@ public class StackManager { */ private void validateCommonServicesDirectory(File commonServicesRoot) throws AmbariException { if(commonServicesRoot != null) { + LOG.info("Validating common services directory {} ...", + commonServicesRoot); + String commonServicesRootAbsolutePath = commonServicesRoot.getAbsolutePath(); if (LOG.isDebugEnabled()) { LOG.debug("Loading common services information" @@ -257,6 +264,8 @@ public class StackManager { * @throws AmbariException if the
ambari git commit: AMBARI-10579. oozie struggles to come up and stay up: admin needs to create sharelib with blueprint custom configurations (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 2e6d9d61f -> 1e631ce38 AMBARI-10579. oozie struggles to come up and stay up: admin needs to create sharelib with blueprint custom configurations (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e631ce3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e631ce3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e631ce3 Branch: refs/heads/trunk Commit: 1e631ce386a3c7fb5080ad3d09236645c84191be Parents: 2e6d9d6 Author: Andrew Onishuk Authored: Sat Apr 18 00:28:13 2015 +0300 Committer: Andrew Onishuk Committed: Sat Apr 18 00:28:13 2015 +0300 -- .../stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e631ce3/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 e44cb57..ef3e901 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 @@ -50,9 +50,9 @@ org.apache.oozie.service.SLAStoreService, org.apache.oozie.service.DBLiteWorkflowStoreService, org.apache.oozie.service.CallbackService, + org.apache.oozie.service.ActionService, org.apache.oozie.service.ShareLibService, org.apache.oozie.service.CallableQueueService, - org.apache.oozie.service.ActionService, org.apache.oozie.service.ActionCheckerService, org.apache.oozie.service.RecoveryService, org.apache.oozie.service.PurgeService,
ambari git commit: AMBARI-10479. Add the ability to enable Kerberos and not manage identities (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk 0f2a90489 -> 2e6d9d61f AMBARI-10479. Add the ability to enable Kerberos and not manage identities (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2e6d9d61 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2e6d9d61 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2e6d9d61 Branch: refs/heads/trunk Commit: 2e6d9d61f8b7e11f548b3f12da49edd9d1f8843a Parents: 0f2a904 Author: Robert Levas Authored: Fri Apr 17 17:15:50 2015 -0400 Committer: Robert Levas Committed: Fri Apr 17 17:15:56 2015 -0400 -- .../server/controller/KerberosHelper.java | 328 - .../1.10.3-10/package/scripts/params.py | 210 ++- .../1.10.3-10/package/scripts/service_check.py | 18 +- .../server/controller/KerberosHelperTest.java | 364 ++- 4 files changed, 484 insertions(+), 436 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2e6d9d61/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java index 5cd75bb..1bb0d0f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java @@ -947,6 +947,8 @@ public class KerberosHelper { * Performs operations needed to process Kerberos related tasks to manage a (unique) test identity * on the relevant cluster. * + * If Ambari is not managing Kerberos identities, than this method does nothing. + * * @param cluster the relevant Cluster * @param kerberosDetails a KerberosDetails containing information about relevant Kerberos * configuration @@ -966,191 +968,193 @@ public class KerberosHelper { Map commandParameters, RequestStageContainer requestStageContainer, Handler handler) throws AmbariException, KerberosOperationException { -if (commandParameters == null) { - throw new AmbariException("The properties map must not be null. It is needed to store data related to the service check identity"); -} - -Map services = cluster.getServices(); - -if ((services != null) && !services.isEmpty()) { - String clusterName = cluster.getClusterName(); - Map hosts = clusters.getHostsForCluster(clusterName); - - if ((hosts != null) && !hosts.isEmpty()) { -List serviceComponentHostsToProcess = new ArrayList(); -KerberosDescriptor kerberosDescriptor = getKerberosDescriptor(cluster); -KerberosIdentityDataFileWriter kerberosIdentityDataFileWriter = null; -Map kerberosDescriptorProperties = kerberosDescriptor.getProperties(); - -// While iterating over all the ServiceComponentHosts find hosts that have KERBEROS_CLIENT -// components in the INSTALLED state and add them to the hostsWithValidKerberosClient Set. -// This is needed to help determine which hosts to perform actions for and create tasks for. -Set hostsWithValidKerberosClient = new HashSet(); - -// Create a temporary directory to store metadata needed to complete this task. Information -// such as which principals and keytabs files to create as well as what configurations need -// to be update are stored in data files in this directory. Any keytab files are stored in -// this directory until they are distributed to their appropriate hosts. -File dataDirectory = createTemporaryDirectory(); - -// Create the file used to store details about principals and keytabs to create -File identityDataFile = new File(dataDirectory, KerberosIdentityDataFileWriter.DATA_FILE_NAME); - -// Create a special identity for the test user -KerberosIdentityDescriptor identity = new KerberosIdentityDescriptor(new HashMap() { - { -put("principal", -new HashMap() { - { -put("value", "${cluster-env/smokeuser}_${service_check_id}@${realm}"); -put("type", "user"); - } -}); -put("keytab", -new HashMap() { - { -put("file", "${keytab_dir}/kerberos.service_check.${service_check_id}.keytab"); - -put("owner", new HashMap() {{ - put("name", "${c
ambari git commit: AMBARI-10572. Implement UI changes for Ranger additional DB support. (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk b392c6861 -> 0f2a90489 AMBARI-10572. Implement UI changes for Ranger additional DB support. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f2a9048 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f2a9048 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f2a9048 Branch: refs/heads/trunk Commit: 0f2a90489fe7da89417f03abd1c6c422c61714c8 Parents: b392c68 Author: Aleksandr Kovalenko Authored: Fri Apr 17 20:31:28 2015 +0300 Committer: Aleksandr Kovalenko Committed: Sat Apr 18 00:09:51 2015 +0300 -- ambari-web/app/app.js | 4 ++ ambari-web/app/data/HDP2.3/site_properties.js | 64 .../configs/stack_config_properties_mapper.js | 11 +++- ambari-web/app/utils/config.js | 5 +- 4 files changed, 80 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2a9048/ambari-web/app/app.js -- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index 60bc27c..3e33f91 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -162,6 +162,10 @@ module.exports = Em.Application.create({ return (this.get('currentStackVersion') || this.get('defaultStackVersion')).replace(regExp, ''); }.property('currentStackVersion', 'defaultStackVersion', 'currentStackName'), + isHadoop23Stack: function () { +return (stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.3") > -1); + }.property('currentStackVersionNumber'), + isHadoop22Stack: function () { return (stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.2") > -1); }.property('currentStackVersionNumber'), http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2a9048/ambari-web/app/data/HDP2.3/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.3/site_properties.js b/ambari-web/app/data/HDP2.3/site_properties.js new file mode 100644 index 000..4665b2e --- /dev/null +++ b/ambari-web/app/data/HDP2.3/site_properties.js @@ -0,0 +1,64 @@ +/** + * 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. + */ + +var App = require('app'); + +var hdp22properties = require('data/HDP2.2/site_properties').configProperties; + +var excludedConfigs = [ +'DB_FLAVOR' +]; + +var hdp23properties = hdp22properties.filter(function (item) { + return !excludedConfigs.contains(item.name); +}); + +hdp23properties.push({ + "id": "site property", + "name": "DB_FLAVOR", + "displayName": "DB FLAVOR", + "value": "MYSQL", + "defaultValue": "MYSQL", + "isReconfigurable": true, + "options": [ +{ + displayName: 'MYSQL' +}, +{ + displayName: 'ORACLE' +}, +{ + displayName: 'POSTGRES' +}, +{ + displayName: 'SQLSERVER' +} + ], + "displayType": "radio button", + "radioName": "RANGER DB_FLAVOR", + "isOverridable": false, + "isVisible": true, + "serviceName": "RANGER", + "filename": "admin-properties.xml", + "category": "DBSettings" +}); + +module.exports = +{ + "configProperties": hdp23properties +}; http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2a9048/ambari-web/app/mappers/configs/stack_config_properties_mapper.js -- diff --git a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js index 377095a..c062bf7 100644 --- a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js +++ b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js @@ -75,9 +75,14 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({ * @type {Object[]}; */ preDefinedSiteProperties: function () { -var file = App.get('isHadoop22Stack') ? require('data/HDP2.2/site_properties') : require('data/HDP2/site_properties'); -return fi
ambari git commit: AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows
Repository: ambari Updated Branches: refs/heads/trunk 7f542913b -> b392c6861 AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows Updating the drop tables script too Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b392c686 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b392c686 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b392c686 Branch: refs/heads/trunk Commit: b392c686171dcfdcc59a6813df1f137149c7107a Parents: 7f54291 Author: Florian Barca Authored: Fri Apr 17 13:55:11 2015 -0700 Committer: Florian Barca Committed: Fri Apr 17 13:55:11 2015 -0700 -- .../src/main/resources/Ambari-DDL-SQLServer-DROP.sql | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b392c686/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql index 06dca95..8cb3132 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql @@ -211,7 +211,13 @@ IF OBJECT_ID('adminprincipaltype', 'U') IS NOT NULL DROP TABLE adminprincipaltyp GO IF OBJECT_ID('repo_version', 'U') IS NOT NULL DROP TABLE repo_version GO +IF OBJECT_ID('widget_layout_user_widget', 'U') IS NOT NULL DROP TABLE widget_layout_user_widget +GO +IF OBJECT_ID('widget_layout', 'U') IS NOT NULL DROP TABLE widget_layout +GO +IF OBJECT_ID('widget', 'U') IS NOT NULL DROP TABLE widget +GO IF OBJECT_ID('artifact', 'U') IS NOT NULL DROP TABLE artifact GO IF OBJECT_ID('stack', 'U') IS NOT NULL DROP TABLE stack -GO \ No newline at end of file +GO
ambari git commit: AMBARI-10553. symlinks for libsnappy.so are not accurate for HDP-2.2
Repository: ambari Updated Branches: refs/heads/trunk e7643d5eb -> 7f542913b AMBARI-10553. symlinks for libsnappy.so are not accurate for HDP-2.2 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7f542913 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7f542913 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7f542913 Branch: refs/heads/trunk Commit: 7f542913bae6cd0a3fe4ead9d507a5e3858545f0 Parents: e7643d5 Author: Sumit Mohanty Authored: Fri Apr 17 13:23:08 2015 -0700 Committer: Sumit Mohanty Committed: Fri Apr 17 13:23:08 2015 -0700 -- .../src/test/python/resource_management/TestLinkResource.py| 2 +- .../src/test/python/resource_management/TestUserResource.py| 6 -- .../main/python/resource_management/core/providers/system.py | 4 ++-- .../stacks/HDP/2.0.6/hooks/before-START/scripts/params.py | 2 ++ .../2.0.6/hooks/before-START/scripts/shared_initialization.py | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7f542913/ambari-agent/src/test/python/resource_management/TestLinkResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestLinkResource.py b/ambari-agent/src/test/python/resource_management/TestLinkResource.py index 88a20a5..ceac076 100644 --- a/ambari-agent/src/test/python/resource_management/TestLinkResource.py +++ b/ambari-agent/src/test/python/resource_management/TestLinkResource.py @@ -62,7 +62,7 @@ class TestLinkResource(TestCase): self.fail("Must fail when directory or file with name /some_path exist") except Fail as e: -self.assertEqual("LinkProvider[Link['/some_path']] trying to create a symlink with the same name as an existing file or directory", +self.assertEqual("Link['/some_path'] trying to create a symlink with the same name as an existing file or directory", str(e)) @patch.object(sudo, "path_lexists") http://git-wip-us.apache.org/repos/asf/ambari/blob/7f542913/ambari-agent/src/test/python/resource_management/TestUserResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestUserResource.py b/ambari-agent/src/test/python/resource_management/TestUserResource.py index 4d83073..07b4e1e 100644 --- a/ambari-agent/src/test/python/resource_management/TestUserResource.py +++ b/ambari-agent/src/test/python/resource_management/TestUserResource.py @@ -17,7 +17,7 @@ limitations under the License. ''' from unittest import TestCase -from mock.mock import patch, MagicMock +from mock.mock import patch, MagicMock, PropertyMock from resource_management.core import Environment, Fail from resource_management.core.system import System @@ -170,11 +170,13 @@ class TestUserResource(TestCase): popen_mock.assert_called_with(['/bin/bash', '--login', '--noprofile', '-c', "ambari-sudo.sh PATH=/bin -H -E usermod -s /bin/bash -g 1 mapred"], shell=False, preexec_fn=None, stderr=-2, stdout=5, bufsize=1, env={'PATH': '/bin'}, cwd=None, close_fds=True) self.assertEqual(popen_mock.call_count, 1) + @patch('resource_management.core.providers.accounts.UserProvider.user_groups', new_callable=PropertyMock) @patch.object(subprocess, "Popen") @patch.object(pwd, "getpwnam") - def test_attribute_groups(self, getpwnam_mock, popen_mock): + def test_attribute_groups(self, getpwnam_mock, popen_mock, user_groups_mock): subproc_mock = MagicMock() subproc_mock.returncode = 0 +user_groups_mock.return_value = ['hadoop'] subproc_mock.stdout.readline = MagicMock(side_effect = ['OK']) popen_mock.return_value = subproc_mock getpwnam_mock.return_value = 1 http://git-wip-us.apache.org/repos/asf/ambari/blob/7f542913/ambari-common/src/main/python/resource_management/core/providers/system.py -- diff --git a/ambari-common/src/main/python/resource_management/core/providers/system.py b/ambari-common/src/main/python/resource_management/core/providers/system.py index 1e4ce90..6a41bc1 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/system.py +++ b/ambari-common/src/main/python/resource_management/core/providers/system.py @@ -208,7 +208,7 @@ class LinkProvider(Provider): return if not sudo.path_lexists(path): raise Fail( - "%s trying to create a symlink with the same name as an existing file or directory" % self) + "%s trying to create a symlink with the same name as an existing file or directory" % self.resource) Logger.info("%s replacing old symlink to %s" %
ambari git commit: AMBARI-10557. Integrate widgets comprising of a specific host component metrics. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 12d608141 -> e7643d5eb AMBARI-10557. Integrate widgets comprising of a specific host component metrics. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7643d5e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7643d5e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7643d5e Branch: refs/heads/trunk Commit: e7643d5eb34621c5fb1256aac8625b970c43dc8e Parents: 12d6081 Author: Jaimin Jetly Authored: Fri Apr 17 12:39:44 2015 -0700 Committer: Jaimin Jetly Committed: Fri Apr 17 12:39:44 2015 -0700 -- .../common-services/HDFS/2.1.0.2.0/metrics.json | 2 +- .../common-services/HDFS/2.1.0.2.0/widgets.json | 8 +-- ambari-web/app/mixins/common/widget_mixin.js| 71 +--- ambari-web/app/utils/ajax/ajax.js | 7 +- .../views/common/widget/graph_widget_view.js| 64 +++--- .../test/mixins/common/widget_mixin_test.js | 31 ++--- 6 files changed, 134 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e7643d5e/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metrics.json index 07f36bb..53575de 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metrics.json +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metrics.json @@ -622,7 +622,7 @@ }, "metrics/dfs/FSNamesystem/UnderReplicatedBlocks": { "metric": "dfs.FSNamesystem.UnderReplicatedBlocks", - "pointInTime": false, + "pointInTime": true, "temporal": true }, "metrics/rpcdetailed/sendHeartbeat_avg_time": { http://git-wip-us.apache.org/repos/asf/ambari/blob/e7643d5e/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json index 8332d25..622ee03 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json @@ -209,16 +209,16 @@ "is_visible": true, "metrics": [ { - "name": "Hadoop:service=DataNode,name=DataNode.CorruptBlocks", + "name": "Hadoop:service=NameNode,name=FSNamesystem.CorruptBlocks", "metric_path": "metrics/dfs/FSNamesystem/CorruptBlocks", "service_name": "HDFS", - "component_name": "DATANODE" + "component_name": "NAMENODE" } ], "values": [ { "name": "Corrupted Blocks", - "value": "${Hadoop:service=DataNode,name=DataNode.CorruptBlocks}" + "value": "${Hadoop:service=NameNode,name=FSNamesystem.CorruptBlocks}" } ], "properties": { @@ -234,7 +234,7 @@ "name": "Hadoop:service=NameNode,name=FSNamesystem.UnderReplicatedBlocks", "metric_path": "metrics/dfs/FSNamesystem/UnderReplicatedBlocks", "service_name": "HDFS", - "component_name": "DATANODE" + "component_name": "NAMENODE" } ], "values": [ http://git-wip-us.apache.org/repos/asf/ambari/blob/e7643d5e/ambari-web/app/mixins/common/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widget_mixin.js b/ambari-web/app/mixins/common/widget_mixin.js index a9a6d59..35b11b1 100644 --- a/ambari-web/app/mixins/common/widget_mixin.js +++ b/ambari-web/app/mixins/common/widget_mixin.js @@ -36,7 +36,7 @@ App.WidgetMixin = Ember.Mixin.create({ * @type {RegExp} * @const */ - VALUE_NAME_REGEX: /[\w\.\:\=\[\]]+/g, + VALUE_NAME_REGEX: /[\w\.\,\:\=\[\]]+/g, /** * common metrics container @@ -73,7 +73,7 @@ App.WidgetMixin = Ember.Mixin.create({ request = requestData[i]; requestCounter++; if (request.host_component_criteria) { -this.getHostComponentMetrics(request).complete(function () { +this.getHostComponentMetrics(request).always(function () { requestCounter--; if (requestCounter === 0) self.onMetricsLoaded(); }); @@ -92,11 +92,11 @@ App.WidgetMixin = Ember.Mixin.create({
ambari git commit: AMBARI-10483. Provide option to not install Kerberos Client packages (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk 8f253dfd3 -> 12d608141 AMBARI-10483. Provide option to not install Kerberos Client packages (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/12d60814 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/12d60814 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/12d60814 Branch: refs/heads/trunk Commit: 12d608141f6ea4f58c83c310b1f647e591455001 Parents: 8f253df Author: Robert Levas Authored: Fri Apr 17 15:25:43 2015 -0400 Committer: Robert Levas Committed: Fri Apr 17 15:25:48 2015 -0400 -- .../KERBEROS/1.10.3-10/configuration/kerberos-env.xml | 10 ++ .../KERBEROS/1.10.3-10/package/scripts/kerberos_client.py | 7 ++- ambari-web/app/data/HDP2/site_properties.js | 9 + 3 files changed, 25 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/12d60814/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml index 6d2bc56..682d675 100644 --- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml +++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml @@ -38,6 +38,16 @@ true + +install_packages + + Indicates whether Ambari should install the Kerberos client package(s) or not. If not, it is + expected that Kerberos utility programs (such as kadmin, kinit, klist, and kdestroy) are + compatible with MIT Kerberos 5 version 1.10.3 in command line options and behaviors. + +true + + ldap_url http://git-wip-us.apache.org/repos/asf/ambari/blob/12d60814/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py -- diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py index a05d64c..282915a 100644 --- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py +++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py @@ -22,7 +22,12 @@ from resource_management.libraries.functions.security_commons import cached_kini class KerberosClient(KerberosScript): def install(self, env): -self.install_packages(env, ['krb5-server', 'krb5-libs', 'krb5-auth-dialog', 'krb5', 'krb5-kdc', 'krb5-admin-server']) +install_packages = default('/configurations/kerberos-env/install_packages', "true") +if install_packages: + self.install_packages(env, ['krb5-server', 'krb5-libs', 'krb5-auth-dialog', 'krb5', 'krb5-kdc', 'krb5-admin-server']) +else: + print "Kerberos client packages are not being installed, manual installation is required." + self.configure(env) http://git-wip-us.apache.org/repos/asf/ambari/blob/12d60814/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 1eb73df..b5cfa77 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -1970,6 +1970,15 @@ var hdp2properties = [ }, { "id": "puppet var", +"name": "install_packages", +"displayName": "Install OS-specific Kerberos client package(s)", +"displayType": "checkbox", +"serviceName": "KERBEROS", +"filename": "kerberos-env.xml", +"category": "Advanced kerberos-env" + }, + { +"id": "puppet var", "name": "create_attributes_template", "displayName": "Attribute template", "serviceName": "KERBEROS",
ambari git commit: AMBARI-10575. RU: Oozie upgrade fails when using oracle DB (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk 672eee34d -> 8f253dfd3 AMBARI-10575. RU: Oozie upgrade fails when using oracle DB (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f253dfd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f253dfd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f253dfd Branch: refs/heads/trunk Commit: 8f253dfd366b0bef41d2cace978363e61e410796 Parents: 672eee3 Author: Lisnichenko Dmitro Authored: Fri Apr 17 22:18:00 2015 +0300 Committer: Lisnichenko Dmitro Committed: Fri Apr 17 22:18:30 2015 +0300 -- .../package/scripts/oozie_server_upgrade.py | 22 +++- 1 file changed, 21 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8f253dfd/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py index a14934b..c4a62ea 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py @@ -30,6 +30,8 @@ from resource_management.libraries.functions import Direction from resource_management.libraries.functions import format from resource_management.libraries.functions import compare_versions from resource_management.libraries.functions import format_hdp_stack_version +from resource_management.core.resources import File +from resource_management.core.source import DownloadSource BACKUP_TEMP_DIR = "oozie-upgrade-backup" BACKUP_CONF_ARCHIVE = "oozie-conf-backup.tar" @@ -100,7 +102,7 @@ def prepare_libext_directory(): """ Creates /usr/hdp/current/oozie/libext-customer and recursively sets 777 permissions on it and its parents. - :return: + Also, downloads jdbc driver and provides other staff """ import params @@ -151,6 +153,24 @@ def prepare_libext_directory(): Logger.info("Copying {0} to {1}".format(oozie_ext_zip_file, params.oozie_libext_customer_dir)) shutil.copy2(oozie_ext_zip_file, params.oozie_libext_customer_dir) + # Redownload jdbc driver to a new current location + if params.jdbc_driver_name=="com.mysql.jdbc.Driver" or \ + params.jdbc_driver_name == "com.microsoft.sqlserver.jdbc.SQLServerDriver" or \ + params.jdbc_driver_name=="oracle.jdbc.driver.OracleDriver": +File(params.downloaded_custom_connector, + content = DownloadSource(params.driver_curl_source), +) + +Execute(('cp', '--remove-destination', params.downloaded_custom_connector, params.target), +#creates=params.target, TODO: uncomment after ranger_hive_plugin will not provide jdbc +path=["/bin", "/usr/bin/"], +sudo = True) + +File ( params.target, + owner = params.oozie_user, + group = params.user_group +) + def upgrade_oozie(): """
[5/5] ambari git commit: AMBARI-10528. Hive View: Visual Explain, Error handling and bugfixes (alexantonenko)
AMBARI-10528. Hive View: Visual Explain, Error handling and bugfixes (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/672eee34 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/672eee34 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/672eee34 Branch: refs/heads/trunk Commit: 672eee34dce8200f7375f164c307d864b4f5ffd1 Parents: 2917d0d Author: Alex Antonenko Authored: Fri Apr 17 18:39:50 2015 +0300 Committer: Alex Antonenko Committed: Fri Apr 17 22:10:24 2015 +0300 -- contrib/views/hive/pom.xml | 11 +- .../ambari/view/hive/PropertyValidator.java | 109 + .../ambari/view/hive/client/Connection.java | 44 +- .../view/hive/client/ConnectionFactory.java | 7 +- .../apache/ambari/view/hive/client/Cursor.java | 22 +- .../ambari/view/hive/client/DDLDelegator.java | 2 +- .../hive/client/HiveErrorStatusException.java | 2 +- .../apache/ambari/view/hive/client/Utils.java | 2 +- .../view/hive/persistence/DataStoreStorage.java | 114 +++--- .../persistence/InstanceKeyValueStorage.java| 5 - .../hive/persistence/LocalKeyValueStorage.java | 5 - .../ambari/view/hive/persistence/Storage.java | 9 - .../hive/resources/CRUDResourceManager.java | 2 +- .../view/hive/resources/files/FileService.java | 36 +- .../view/hive/resources/jobs/Aggregator.java| 3 +- .../resources/jobs/ConnectionController.java| 15 +- .../view/hive/resources/jobs/JobService.java| 74 +++- .../jobs/NoOperationStatusSetException.java | 5 +- .../jobs/OperationHandleController.java | 45 ++- .../jobs/OperationHandleResourceManager.java| 2 +- .../jobs/ResultsPaginationController.java | 24 ++ .../resources/jobs/StoredOperationHandle.java | 2 +- .../hive/resources/jobs/atsJobs/ATSParser.java | 1 + .../jobs/atsJobs/ATSRequestsDelegate.java | 8 + .../jobs/atsJobs/ATSRequestsDelegateImpl.java | 24 +- .../resources/jobs/atsJobs/HiveQueryId.java | 2 + .../view/hive/resources/jobs/viewJobs/Job.java | 8 + .../resources/jobs/viewJobs/JobController.java | 1 + .../jobs/viewJobs/JobControllerImpl.java| 39 +- .../hive/resources/jobs/viewJobs/JobImpl.java | 28 +- .../ambari/view/hive/resources/udfs/UDF.java| 6 +- .../apache/ambari/view/hive/utils/HdfsApi.java | 6 +- .../apache/ambari/view/hive/utils/HdfsUtil.java | 8 +- .../utils/HiveClientFormattedException.java | 26 ++ .../src/main/resources/ui/hive-web/.bowerrc | 4 + .../main/resources/ui/hive-web/.editorconfig| 34 ++ .../src/main/resources/ui/hive-web/.ember-cli | 27 ++ .../src/main/resources/ui/hive-web/.travis.yml | 38 ++ .../src/main/resources/ui/hive-web/Brocfile.js | 5 + .../app/components/alert-message-widget.js | 16 +- .../app/components/collapsible-widget.js| 5 + .../ui/hive-web/app/components/modal-widget.js | 22 + .../ui/hive-web/app/components/notify-widget.js | 32 ++ .../app/components/number-range-widget.js | 36 +- .../ui/hive-web/app/components/query-tabs.js| 121 ++ .../hive-web/app/components/typeahead-widget.js | 49 ++- .../ui/hive-web/app/controllers/alerts.js | 47 --- .../ui/hive-web/app/controllers/databases.js| 56 ++- .../ui/hive-web/app/controllers/index.js| 188 +++-- .../controllers/index/history-query/explain.js | 36 +- .../app/controllers/index/history-query/logs.js | 22 +- .../controllers/index/history-query/results.js | 34 ++ .../ui/hive-web/app/controllers/messages.js | 33 ++ .../app/controllers/modal-save-query.js | 42 ++ .../ui/hive-web/app/controllers/open-queries.js | 120 -- .../ui/hive-web/app/controllers/queries.js | 11 +- .../ui/hive-web/app/controllers/settings.js | 63 ++- .../ui/hive-web/app/controllers/udf.js | 4 +- .../ui/hive-web/app/helpers/all-uppercase.js| 2 +- .../hive-web/app/helpers/preformatted-string.js | 28 ++ .../main/resources/ui/hive-web/app/index.html | 4 + .../ui/hive-web/app/initializers/i18n.js| 43 +- .../ui/hive-web/app/initializers/notify.js | 26 ++ .../resources/ui/hive-web/app/models/file.js| 2 +- .../resources/ui/hive-web/app/models/job.js | 5 + .../ui/hive-web/app/routes/application.js | 17 +- .../ui/hive-web/app/routes/index/index.js | 4 +- .../ui/hive-web/app/services/notify.js | 88 .../resources/ui/hive-web/app/styles/app.scss | 136 +-- .../ui/hive-web/app/styles/mixins.scss | 23 ++ .../ui/hive-web/app/styles/notifications.scss | 36 ++ .../ui/hive-web/app/styles/query-tabs.scss | 68 .../resources/ui/hive-web/app/styles/vars.scss | 20 + .../ui/hive-web/app/templates/alerts.hbs| 23 -- .../ui/hive-web/app/templates/appli
[3/5] ambari git commit: AMBARI-10528. Hive View: Visual Explain, Error handling and bugfixes (alexantonenko)
http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/alert-message-widget.hbs -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/alert-message-widget.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/alert-message-widget.hbs index 7106f0a..0901b30 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/alert-message-widget.hbs +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/alert-message-widget.hbs @@ -18,11 +18,11 @@ × - {{tb-helper message.title}} + {{tb-helper message.title}} {{#if message.isExpanded}} {{message.content}} {{/if}} - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs index f6af59b..230ec3b 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs @@ -18,7 +18,12 @@ {{heading}} + +{{#each control in controls}} + +{{/each}} + {{#if isExpanded}} {{yield}} -{{/if}} \ No newline at end of file +{{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/notify-widget.hbs -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/notify-widget.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/notify-widget.hbs new file mode 100644 index 000..5f905a8 --- /dev/null +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/notify-widget.hbs @@ -0,0 +1,21 @@ +{{! +* 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. +}} + +{{#each notification in notifications}} + {{view "notification" notification=notification}} +{{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/panel-widget.hbs -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/panel-widget.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/panel-widget.hbs index 45c4edf..1e29033 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/panel-widget.hbs +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/panel-widget.hbs @@ -16,7 +16,7 @@ * limitations under the License. }} - + {{#if heading}} {{#if menuItems}} @@ -34,6 +34,14 @@ {{/if}} + + {{#if iconActions}} +{{#each iconAction in iconActions}} + +{{/each}} + {{/if}} + {{heading}} {{#if isLoading}} @@ -43,4 +51,4 @@ {{yield}} - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/query-tabs.hbs -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/query-tabs.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/query-tabs.hbs new file mode 100644 index 000..f131367 --- /dev/null +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/query-tabs.hbs @@ -0,0 +1,29 @@ +{{! +* Licensed to the Apache Software Found
[1/5] ambari git commit: AMBARI-10528. Hive View: Visual Explain, Error handling and bugfixes (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 2917d0ded -> 672eee34d http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/view.xml -- diff --git a/contrib/views/hive/src/main/resources/view.xml b/contrib/views/hive/src/main/resources/view.xml index ac97d58..9c8b103 100644 --- a/contrib/views/hive/src/main/resources/view.xml +++ b/contrib/views/hive/src/main/resources/view.xml @@ -17,10 +17,12 @@ HIVE Hive -0.1.0 +0.2.0 1.7.* + org.apache.ambari.view.hive.PropertyValidator + webhdfs.url @@ -159,10 +161,6 @@ - org.apache.ambari.view.hive.persistence.DataStoreStorage$SmokeTestEntity -id - - org.apache.ambari.view.hive.resources.jobs.viewJobs.JobImpl id http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/ATSParserTest.java -- diff --git a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/ATSParserTest.java b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/ATSParserTest.java index d2ff02c..c5cc52b 100644 --- a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/ATSParserTest.java +++ b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/ATSParserTest.java @@ -70,6 +70,26 @@ public class ATSParserTest { protected static class ATSRequestsDelegateStub implements ATSRequestsDelegate { @Override +public String hiveQueryIdDirectUrl(String entity) { + return null; +} + +@Override +public String hiveQueryIdOperationIdUrl(String operationId) { + return null; +} + +@Override +public String tezDagDirectUrl(String entity) { + return null; +} + +@Override +public String tezDagNameUrl(String name) { + return null; +} + +@Override public JSONObject hiveQueryIdList(String username) { return (JSONObject) JSONValue.parse( "{ \"entities\" : [ { \"domain\" : \"DEFAULT\",\n" + @@ -409,4 +429,4 @@ public class ATSParserTest { ); } } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/AggregatorTest.java -- diff --git a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/AggregatorTest.java b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/AggregatorTest.java index 50642ac..10d052a 100644 --- a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/AggregatorTest.java +++ b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/jobs/AggregatorTest.java @@ -393,4 +393,4 @@ public class AggregatorTest { this.hiveQueryIds = hiveQueryIds; } } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/pom.xml -- diff --git a/pom.xml b/pom.xml index c703bcf..eb9b587 100644 --- a/pom.xml +++ b/pom.xml @@ -300,6 +300,7 @@ contrib/ambari-scom/metrics-sink/target/** contrib/views/*/target/** contrib/views/hive/src/main/resources/ui/hive-web/vendor/codemirror/** + contrib/views/hive/src/main/resources/ui/hive-web/.bowerrc contrib/views/files/src/main/resources/ui/bower_components/** contrib/views/files/src/main/resources/ui/node/** contrib/views/files/src/main/resources/ui/node_modules/**
[2/5] ambari git commit: AMBARI-10528. Hive View: Visual Explain, Error handling and bugfixes (alexantonenko)
http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/vendor/dagre.min.js -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/vendor/dagre.min.js b/contrib/views/hive/src/main/resources/ui/hive-web/vendor/dagre.min.js new file mode 100644 index 000..10a0471 --- /dev/null +++ b/contrib/views/hive/src/main/resources/ui/hive-web/vendor/dagre.min.js @@ -0,0 +1,27 @@ +/** + * @license + * Copyright (c) 2012-2014 Chris Pettitt + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o0;--i){entry=buckets[i].dequeue();if(entry){results=results.concat(removeNode(g,buckets,zeroIdx,entry,true));breakreturn results}function removeNode(g,buckets,zeroIdx,entry,collectPredecessors){var results=collectPredecessors?[]:undefined;_.each(g.inEdges(entry.v),function(edge){var weight=g.edge(edge),uEntry=g.node(edge.v);if(collectPredecessors){results.push({v:edge.v,w:edge.w})}uEntry.out-=weight;assignBucket(buckets,zeroIdx,uEntry)});_.each(g.outEdges(entry.v),function(edge){var weight=g.edge(edge),w=edge.w,wEntry=g.node(w);wEntry.in-=weight;assignBucket(buckets,zeroIdx,wEntry)});g.removeNode(entry.v);return results}function buildState(g,weightFn){var fasGraph=new Graph,maxIn=0,maxOut=0;_.each(g.nodes(),function(v){fasGraph.setNode(v,{v:v,"in":0,out:0})});_.each(g.edges(),function(e){var prevWeight=fasGraph.edge(e.v,e.w)||0,weight=weightFn(e),edgeWeight=prevWeight+weight;fasGraph.setEdge(e.v,e.w,edgeWeight);max Out=Math.max(maxOut,fasGraph.node(e.v).out+=weight);maxIn=Math.max(maxIn,fasGraph.node(e.w).in+=weight)});var buckets=_.range(maxOut+maxIn+3).map(function(){return new List});var zeroIdx=maxIn+1;_.each(fasGraph.nodes(),function(v){assignBucket(buckets,zeroIdx,fasGraph.node(v))});return{graph:fasGraph,buckets:buckets,zeroIdx:zeroIdx}}function assignBucket(buckets,zeroIdx,entry){if(!entry.out){buckets[0].enqueue(entry)}else if(!entry.in){buckets[buckets.length-1].enqueue(entry)}else{buckets[entry.out-entry.in+zeroIdx].enqueue(entry)}}},{"./data/list":5,graphlib:29,lodash:48}],8:[function(require,module,exports){"use strict";var _=require("lodash"),acyclic=require("./acyclic"),normalize=require("./normalize"),rank=require("./rank"),normalizeRanks=require("./util").normalizeRanks,parentDummyChains=require("./parent-dummy-chains"),removeEmptyRanks=require("./util").removeEmptyRanks,nestingGraph=require("./nesting-graph"),addBorderSegments=require("./add-border-segments"),order=require(". /order"),position=require("./position"),util=require("./util"),Graph=require("graphlib").Graph;module.exports=layout;function layout(g,opts){var time=opts&&opts.debugTiming?util.time:util.notime;time("layout",function(){var layoutGraph=time(" buildLayoutGraph",function(){return buildLayoutGraph(g)});time(" runLayout",function(){runLayout(layoutGraph,time)});time(" updateInputGraph",function(){updateInputGraph(g,layoutGraph)})})}function runLayout(g,time){time(" makeSpaceForEdgeLabels",function(){makeSpaceForEdgeLabels(g)});time(" removeSelfEdges",function(){removeSelfEdges(g)});time(" acyclic",function(){acyclic.run(g)});time(" nestingGraph.run",function(){nestingGraph.run(g)});time(" rank",function(){rank(util.asNonCompoundGraph(g))});time(" injectEdgeLabelProxies",function(){injectEdgeLabelProxies(g)});time(" removeEmptyRanks",function(){removeEmptyRanks(g)});time(" nestingGraph.cleanup",function(){nes
[4/5] ambari git commit: AMBARI-10528. Hive View: Visual Explain, Error handling and bugfixes (alexantonenko)
http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/.travis.yml -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/.travis.yml b/contrib/views/hive/src/main/resources/ui/hive-web/.travis.yml new file mode 100644 index 000..5d96e28 --- /dev/null +++ b/contrib/views/hive/src/main/resources/ui/hive-web/.travis.yml @@ -0,0 +1,38 @@ +# 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. + +--- +language: node_js +node_js: + - "0.12" + +sudo: false + +cache: + directories: +- node_modules + +before_install: + - "npm config set spin false" + - "npm install -g npm@^2" + +install: + - npm install -g bower + - npm install + - bower install + +script: + - npm test http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/Brocfile.js -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/Brocfile.js b/contrib/views/hive/src/main/resources/ui/hive-web/Brocfile.js index db65f1f..8a367c9 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/Brocfile.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/Brocfile.js @@ -25,9 +25,13 @@ var app = new EmberApp({ //valid values are `default`, `bootstrap2`, `bootstrap3` or false 'theme': 'bootstrap3' }, + vendorFiles: { +'handlebars.js': null + }, hinting: false }); +app.import('bower_components/ember/ember-template-compiler.js'); app.import('bower_components/bootstrap/dist/js/bootstrap.js'); app.import('bower_components/bootstrap/dist/css/bootstrap.css'); app.import('bower_components/bootstrap/dist/css/bootstrap.css.map', { @@ -42,5 +46,6 @@ app.import('vendor/codemirror/sql-hint.js'); app.import('vendor/codemirror/show-hint.js'); app.import('vendor/codemirror/codemirror.css'); app.import('vendor/codemirror/show-hint.css'); +app.import('vendor/dagre.min.js'); module.exports = app.toTree(); http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/app/components/alert-message-widget.js -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/alert-message-widget.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/alert-message-widget.js index fd8c1d7..df44c37 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/alert-message-widget.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/alert-message-widget.js @@ -19,17 +19,17 @@ import Ember from 'ember'; export default Ember.Component.extend({ - click: function () { -this.toggleProperty('message.isExpanded'); - -if (!this.get('message.isExpanded')) { - this.sendAction('removeLater', this.get('message')); -} - }, - actions: { remove: function () { this.sendAction('removeMessage', this.get('message')); +}, + +toggleMessage: function() { + this.toggleProperty('message.isExpanded'); + + if (!this.get('message.isExpanded')) { +this.sendAction('removeLater', this.get('message')); + } } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/672eee34/contrib/views/hive/src/main/resources/ui/hive-web/app/components/collapsible-widget.js -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/collapsible-widget.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/collapsible-widget.js index 4425b59..f2081f2 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/collapsible-widget.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/collapsible-widget.js @@ -28,6 +28,11 @@ export default Ember.Component.extend({ if (this.get('isExpanded')) { this.sendAction('expanded', this.get('heading'), this.get('toggledParam')); } +}, + +sendControlAction: function(action) { + this.set('controlAction', action
ambari git commit: AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows
Repository: ambari Updated Branches: refs/heads/trunk 4254fb4a1 -> 2917d0ded AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows Removed the syntax error artifacts. Added the missing tables. Added the missing records to the sequence table. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2917d0de Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2917d0de Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2917d0de Branch: refs/heads/trunk Commit: 2917d0dede140260ae01ece25a536fb894863e7c Parents: 4254fb4 Author: Florian Barca Authored: Fri Apr 17 10:31:05 2015 -0700 Committer: Florian Barca Committed: Fri Apr 17 10:31:05 2015 -0700 -- .../resources/Ambari-DDL-SQLServer-CREATE.sql | 155 --- 1 file changed, 98 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2917d0de/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index 0dc6dc7..835c23f 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -35,7 +35,7 @@ CREATE TABLE stack( stack_id BIGINT NOT NULL, stack_name VARCHAR(255) NOT NULL, stack_version VARCHAR(255) NOT NULL, - PRIMARY KEY (stack_id), + PRIMARY KEY CLUSTERED (stack_id), CONSTRAINT unq_stack UNIQUE(stack_name,stack_version) ); @@ -125,7 +125,7 @@ CREATE TABLE cluster_version ( start_time BIGINT NOT NULL, end_time BIGINT, user_name VARCHAR(255), - PRIMARY KEY (id) + PRIMARY KEY CLUSTERED (id) ); CREATE TABLE hostcomponentdesiredstate ( @@ -227,14 +227,14 @@ CREATE TABLE groups ( principal_id BIGINT NOT NULL, group_name VARCHAR(255) NOT NULL, ldap_group INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY (group_id) + PRIMARY KEY CLUSTERED (group_id) ); CREATE TABLE members ( member_id INTEGER, group_id INTEGER NOT NULL, user_id INTEGER NOT NULL, - PRIMARY KEY (member_id) + PRIMARY KEY CLUSTERED (member_id) ); CREATE TABLE execution_command ( @@ -379,7 +379,7 @@ CREATE TABLE configgroup ( description VARCHAR(1024), create_timestamp BIGINT NOT NULL, service_name VARCHAR(255), - PRIMARY KEY (group_id) + PRIMARY KEY CLUSTERED (group_id) ); CREATE TABLE confgroupclusterconfigmapping ( @@ -389,7 +389,7 @@ CREATE TABLE confgroupclusterconfigmapping ( version_tag VARCHAR(255) NOT NULL, user_name VARCHAR(255) DEFAULT '_db', create_timestamp BIGINT NOT NULL, - PRIMARY KEY ( + PRIMARY KEY CLUSTERED ( config_group_id, cluster_id, config_type @@ -399,7 +399,7 @@ CREATE TABLE confgroupclusterconfigmapping ( CREATE TABLE configgrouphostmapping ( config_group_id BIGINT NOT NULL, host_name VARCHAR(255) NOT NULL, - PRIMARY KEY ( + PRIMARY KEY CLUSTERED ( config_group_id, host_name ) @@ -425,7 +425,7 @@ CREATE TABLE requestschedule ( startTime VARCHAR(50), endTime VARCHAR(50), last_execution_status VARCHAR(255), - PRIMARY KEY (schedule_id) + PRIMARY KEY CLUSTERED (schedule_id) ); CREATE TABLE requestschedulebatchrequest ( @@ -438,7 +438,7 @@ CREATE TABLE requestschedulebatchrequest ( request_status VARCHAR(255), return_code SMALLINT, return_message TEXT, - PRIMARY KEY ( + PRIMARY KEY CLUSTERED ( schedule_id, batch_id ) @@ -447,7 +447,7 @@ CREATE TABLE requestschedulebatchrequest ( CREATE TABLE blueprint ( blueprint_name VARCHAR(255) NOT NULL, stack_id BIGINT NOT NULL, - PRIMARY KEY (blueprint_name), + PRIMARY KEY CLUSTERED (blueprint_name), FOREIGN KEY (stack_id) REFERENCES stack(stack_id) ); @@ -455,7 +455,7 @@ CREATE TABLE hostgroup ( blueprint_name VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, cardinality VARCHAR(255) NOT NULL, - PRIMARY KEY ( + PRIMARY KEY CLUSTERED ( blueprint_name, NAME ) @@ -465,7 +465,7 @@ CREATE TABLE hostgroup_component ( blueprint_name VARCHAR(255) NOT NULL, hostgroup_name VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, - PRIMARY KEY ( + PRIMARY KEY CLUSTERED ( blueprint_name, hostgroup_name, NAME @@ -477,7 +477,7 @@ CREATE TABLE blueprint_configuration ( type_name VARCHAR(255) NOT NULL, config_data TEXT NOT NULL, config_attributes VARCHAR(8000), - PRIMARY KEY ( + PRIMARY KEY CLUSTERED ( blueprint_name, type_name ) @@ -489,7 +489,7 @@ CREATE TABLE hostgroup_configuration ( type_name VARCHAR(255) NOT NULL, config_data TEXT NOT NULL, config_attributes TEXT, - PRIMARY KEY ( + PRIMARY KEY CLUSTERED (
[2/2] ambari git commit: AMBARI-10561. Improve YARN service check (vbrodetskyi via dlysnichenko)
AMBARI-10561. Improve YARN service check (vbrodetskyi via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4254fb4a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4254fb4a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4254fb4a Branch: refs/heads/trunk Commit: 4254fb4a1d5309b9a1b3133550f744419afc8533 Parents: 85aa856 Author: Lisnichenko Dmitro Authored: Fri Apr 17 20:03:48 2015 +0300 Committer: Lisnichenko Dmitro Committed: Fri Apr 17 20:05:41 2015 +0300 -- .../2.1.0.2.0/package/scripts/service_check.py | 30 ++-- .../2.0.6/YARN/test_yarn_service_check.py | 23 --- 2 files changed, 13 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4254fb4a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index 2eef667..547c687 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -19,6 +19,7 @@ Ambari Agent """ +from resource_management.libraries.functions.version import compare_versions from resource_management import * import sys from ambari_commons import OSConst @@ -78,29 +79,19 @@ class ServiceCheckDefault(ServiceCheck): import params env.set_params(params) -run_yarn_check_cmd = format("yarn --config {hadoop_conf_dir} node -list") - -component_type = 'rm' -if params.hadoop_ssl_enabled: - component_address = params.rm_webui_https_address +if params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.2') >= 0: + path_to_distributed_shell_jar = "/usr/hdp/current/hadoop-yarn-client/hadoop-yarn-applications-distributedshell.jar" else: - component_address = params.rm_webui_address + path_to_distributed_shell_jar = "/usr/lib/hadoop-yarn/hadoop-yarn-applications-distributedshell*.jar" -validateStatusFileName = "validateYarnComponentStatus.py" -validateStatusFilePath = format("{tmp_dir}/{validateStatusFileName}") -python_executable = sys.executable -validateStatusCmd = format("{python_executable} {validateStatusFilePath} {component_type} -p {component_address} -s {hadoop_ssl_enabled}") +yarn_distrubuted_shell_check_cmd = format("yarn org.apache.hadoop.yarn.applications.distributedshell.Client " +"-shell_command ls -jar {path_to_distributed_shell_jar}") if params.security_enabled: kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};") - smoke_cmd = format("{kinit_cmd} {validateStatusCmd}") + smoke_cmd = format("{kinit_cmd} {yarn_distrubuted_shell_check_cmd}") else: - smoke_cmd = validateStatusCmd - -File(validateStatusFilePath, - content=StaticFile(validateStatusFileName), - mode=0755 -) + smoke_cmd = yarn_distrubuted_shell_check_cmd Execute(smoke_cmd, tries=3, @@ -110,11 +101,6 @@ class ServiceCheckDefault(ServiceCheck): logoutput=True ) -Execute(run_yarn_check_cmd, -path=params.execute_path, -user=params.smokeuser -) - if __name__ == "__main__": ServiceCheck().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/4254fb4a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py index 7cde2cc..1376fef 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py @@ -36,21 +36,14 @@ class TestServiceCheck(RMFTestCase): hdp_stack_version = self.STACK_VERSION, target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('File', '/tmp/validateYarnComponentStatus.py', - content = StaticFile('validateYarnComponentStatus.py'), - mode = 0755, -) -self.assertResourceCalled('Execute', '/usr/bin/python2.6 /tmp/validateYarnComponentStatus.py rm -p c6402.ambari.apache.org:8088 -s False', +self.assertResourceCalled('Execute', 'yarn org.apache.h
[1/2] ambari git commit: Revert "AMBARI-10561. Improve YARN service check (dlysnichenko)"
Repository: ambari Updated Branches: refs/heads/trunk ac7507975 -> 4254fb4a1 Revert "AMBARI-10561. Improve YARN service check (dlysnichenko)" This reverts commit ac7507975ad450d2e39eb9459129f04fc1e5dbc8. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/85aa856b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/85aa856b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/85aa856b Branch: refs/heads/trunk Commit: 85aa856ba232ebd9836914b54585773c7a3d7d30 Parents: ac75079 Author: Lisnichenko Dmitro Authored: Fri Apr 17 20:05:24 2015 +0300 Committer: Lisnichenko Dmitro Committed: Fri Apr 17 20:05:24 2015 +0300 -- .../2.1.0.2.0/package/scripts/service_check.py | 30 ++-- .../2.0.6/YARN/test_yarn_service_check.py | 23 +++ 2 files changed, 40 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/85aa856b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index 547c687..2eef667 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -19,7 +19,6 @@ Ambari Agent """ -from resource_management.libraries.functions.version import compare_versions from resource_management import * import sys from ambari_commons import OSConst @@ -79,19 +78,29 @@ class ServiceCheckDefault(ServiceCheck): import params env.set_params(params) -if params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.2') >= 0: - path_to_distributed_shell_jar = "/usr/hdp/current/hadoop-yarn-client/hadoop-yarn-applications-distributedshell.jar" +run_yarn_check_cmd = format("yarn --config {hadoop_conf_dir} node -list") + +component_type = 'rm' +if params.hadoop_ssl_enabled: + component_address = params.rm_webui_https_address else: - path_to_distributed_shell_jar = "/usr/lib/hadoop-yarn/hadoop-yarn-applications-distributedshell*.jar" + component_address = params.rm_webui_address -yarn_distrubuted_shell_check_cmd = format("yarn org.apache.hadoop.yarn.applications.distributedshell.Client " -"-shell_command ls -jar {path_to_distributed_shell_jar}") +validateStatusFileName = "validateYarnComponentStatus.py" +validateStatusFilePath = format("{tmp_dir}/{validateStatusFileName}") +python_executable = sys.executable +validateStatusCmd = format("{python_executable} {validateStatusFilePath} {component_type} -p {component_address} -s {hadoop_ssl_enabled}") if params.security_enabled: kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};") - smoke_cmd = format("{kinit_cmd} {yarn_distrubuted_shell_check_cmd}") + smoke_cmd = format("{kinit_cmd} {validateStatusCmd}") else: - smoke_cmd = yarn_distrubuted_shell_check_cmd + smoke_cmd = validateStatusCmd + +File(validateStatusFilePath, + content=StaticFile(validateStatusFileName), + mode=0755 +) Execute(smoke_cmd, tries=3, @@ -101,6 +110,11 @@ class ServiceCheckDefault(ServiceCheck): logoutput=True ) +Execute(run_yarn_check_cmd, +path=params.execute_path, +user=params.smokeuser +) + if __name__ == "__main__": ServiceCheck().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/85aa856b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py index 1376fef..7cde2cc 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py @@ -36,14 +36,21 @@ class TestServiceCheck(RMFTestCase): hdp_stack_version = self.STACK_VERSION, target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('Execute', 'yarn org.apache.hadoop.yarn.applications.distributedshell.Client ' - '-shell_command ls -jar /usr/lib/hadoop-yarn/hadoop-yarn-applications-distributedshell*.jar', +self.assertResourceCalled(
ambari git commit: AMBARI-10561. Improve YARN service check (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk 4bb98e46f -> ac7507975 AMBARI-10561. Improve YARN service check (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ac750797 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac750797 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac750797 Branch: refs/heads/trunk Commit: ac7507975ad450d2e39eb9459129f04fc1e5dbc8 Parents: 4bb98e4 Author: Lisnichenko Dmitro Authored: Fri Apr 17 20:03:48 2015 +0300 Committer: Lisnichenko Dmitro Committed: Fri Apr 17 20:03:48 2015 +0300 -- .../2.1.0.2.0/package/scripts/service_check.py | 30 ++-- .../2.0.6/YARN/test_yarn_service_check.py | 23 --- 2 files changed, 13 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ac750797/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index 2eef667..547c687 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -19,6 +19,7 @@ Ambari Agent """ +from resource_management.libraries.functions.version import compare_versions from resource_management import * import sys from ambari_commons import OSConst @@ -78,29 +79,19 @@ class ServiceCheckDefault(ServiceCheck): import params env.set_params(params) -run_yarn_check_cmd = format("yarn --config {hadoop_conf_dir} node -list") - -component_type = 'rm' -if params.hadoop_ssl_enabled: - component_address = params.rm_webui_https_address +if params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.2') >= 0: + path_to_distributed_shell_jar = "/usr/hdp/current/hadoop-yarn-client/hadoop-yarn-applications-distributedshell.jar" else: - component_address = params.rm_webui_address + path_to_distributed_shell_jar = "/usr/lib/hadoop-yarn/hadoop-yarn-applications-distributedshell*.jar" -validateStatusFileName = "validateYarnComponentStatus.py" -validateStatusFilePath = format("{tmp_dir}/{validateStatusFileName}") -python_executable = sys.executable -validateStatusCmd = format("{python_executable} {validateStatusFilePath} {component_type} -p {component_address} -s {hadoop_ssl_enabled}") +yarn_distrubuted_shell_check_cmd = format("yarn org.apache.hadoop.yarn.applications.distributedshell.Client " +"-shell_command ls -jar {path_to_distributed_shell_jar}") if params.security_enabled: kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};") - smoke_cmd = format("{kinit_cmd} {validateStatusCmd}") + smoke_cmd = format("{kinit_cmd} {yarn_distrubuted_shell_check_cmd}") else: - smoke_cmd = validateStatusCmd - -File(validateStatusFilePath, - content=StaticFile(validateStatusFileName), - mode=0755 -) + smoke_cmd = yarn_distrubuted_shell_check_cmd Execute(smoke_cmd, tries=3, @@ -110,11 +101,6 @@ class ServiceCheckDefault(ServiceCheck): logoutput=True ) -Execute(run_yarn_check_cmd, -path=params.execute_path, -user=params.smokeuser -) - if __name__ == "__main__": ServiceCheck().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/ac750797/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py index 7cde2cc..1376fef 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py @@ -36,21 +36,14 @@ class TestServiceCheck(RMFTestCase): hdp_stack_version = self.STACK_VERSION, target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('File', '/tmp/validateYarnComponentStatus.py', - content = StaticFile('validateYarnComponentStatus.py'), - mode = 0755, -) -self.assertResourceCalled('Execute', '/usr/bin/python2.6 /tmp/validateYarnComponentStatus.py rm -p c6402.ambari.apache.org:8088 -s Fals
ambari git commit: AMBARI-10556: SQLServer-CREATE script is broken (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk affca503f -> 4bb98e46f AMBARI-10556: SQLServer-CREATE script is broken (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4bb98e46 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4bb98e46 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4bb98e46 Branch: refs/heads/trunk Commit: 4bb98e46f39b97ad0f86460fada8e2b9f9a3d883 Parents: affca50 Author: Jayush Luniya Authored: Fri Apr 17 09:13:11 2015 -0700 Committer: Jayush Luniya Committed: Fri Apr 17 09:13:11 2015 -0700 -- .../src/main/resources/Ambari-DDL-SQLServer-CREATE.sql| 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4bb98e46/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index a69e235..0dc6dc7 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -191,7 +191,7 @@ CREATE TABLE servicecomponentdesiredstate ( desired_state VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, PRIMARY KEY CLUSTERED (component_name, cluster_id, service_name), - FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id)); + FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id) ); CREATE TABLE servicedesiredstate ( @@ -203,7 +203,7 @@ CREATE TABLE servicedesiredstate ( maintenance_state VARCHAR(32) NOT NULL, security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', PRIMARY KEY CLUSTERED (cluster_id,service_name), - FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id)); + FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id) ); CREATE TABLE users ( @@ -214,6 +214,7 @@ CREATE TABLE users ( create_time DATETIME DEFAULT GETDATE(), user_password VARCHAR(255), active INTEGER NOT NULL DEFAULT 1, + active_widget_layouts VARCHAR(1024) DEFAULT NULL, PRIMARY KEY CLUSTERED (user_id), UNIQUE ( ldap_user, @@ -447,7 +448,7 @@ CREATE TABLE blueprint ( blueprint_name VARCHAR(255) NOT NULL, stack_id BIGINT NOT NULL, PRIMARY KEY (blueprint_name), - FOREIGN KEY (stack_id) REFERENCES stack(stack_id)); + FOREIGN KEY (stack_id) REFERENCES stack(stack_id) ); CREATE TABLE hostgroup (
ambari git commit: Revert "AMBARI-10533. Admin View About says 2.0.0 (and links to Admin View are hardcoded to 2.0.0) (alexantonenko)"
Repository: ambari Updated Branches: refs/heads/trunk 77e77010c -> affca503f Revert "AMBARI-10533. Admin View About says 2.0.0 (and links to Admin View are hardcoded to 2.0.0) (alexantonenko)" This reverts commit ecaf2d15f3657ca53625434bbfcce2c36fbaf4b4. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/affca503 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/affca503 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/affca503 Branch: refs/heads/trunk Commit: affca503f2521d009790d69e80c298e8f3ca3325 Parents: 77e7701 Author: Alex Antonenko Authored: Fri Apr 17 18:11:24 2015 +0300 Committer: Alex Antonenko Committed: Fri Apr 17 18:11:24 2015 +0300 -- .../assets/data/cluster/ambariServerInfo.json | 7 --- .../main/resources/ui/admin-web/app/index.html | 1 - .../app/scripts/controllers/mainCtrl.js | 23 .../admin-web/app/scripts/services/Component.js | 30 --- .../admin-web/app/views/modals/AboutModal.html | 4 +- .../test/unit/services/Component_test.js| 56 ambari-web/app/router.js| 28 +++--- .../main/admin/stack_upgrade/versions_view.js | 7 +-- ambari-web/test/router_test.js | 38 - .../admin/stack_upgrade/version_view_test.js| 14 + 10 files changed, 20 insertions(+), 188 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/affca503/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/cluster/ambariServerInfo.json -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/cluster/ambariServerInfo.json b/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/cluster/ambariServerInfo.json deleted file mode 100644 index bddc249..000 --- a/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/cluster/ambariServerInfo.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "RootServiceComponents" : { -"component_name" : "AMBARI_SERVER", -"component_version" : "2.0.0", -"service_name" : "AMBARI" - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/affca503/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 ca2ae8b..17a1dc9 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 @@ -146,7 +146,6 @@ - http://git-wip-us.apache.org/repos/asf/ambari/blob/affca503/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js index 1bdfe05..baec0cf 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js @@ -18,7 +18,7 @@ 'use strict'; angular.module('ambariAdminConsole') -.controller('MainCtrl',['$scope', '$window','Auth', 'Alert', '$modal', 'Cluster', 'Component', 'View', function($scope, $window, Auth, Alert, $modal, Cluster, Component, View) { +.controller('MainCtrl',['$scope', '$window','Auth', 'Alert', '$modal', 'Cluster', 'View', function($scope, $window, Auth, Alert, $modal, Cluster, View) { $scope.signOut = function() { var data = JSON.parse(localStorage.ambari); delete data.app.authenticated; @@ -31,19 +31,14 @@ angular.module('ambariAdminConsole') }; $scope.about = function() { -Component.getAmbariServer().then(function(component) { - var modalInstance = $modal.open({ -templateUrl:'views/modals/AboutModal.html', -controller: ['$scope', function($scope) { - $scope.component = component; - $scope.ok = function() { -modalInstance.close(); - }; -}] - }); -}).catch(function() { - Alert.error('Cannot load component status'); -}); + var modalInstance = $modal.open({ + templateUrl:'views/modals/AboutModal.html', + controller: ['$scope', function($scope) { + $scope.ok = function() { + modalInstance.close(); + }; + }] + }); }; $scope.currentUser = Auth.getCurrentUser(); http://git-wip-us.apache.org/repos/asf/ambari/blob
ambari git commit: AMBARI-10568. Rolling Restart: batch size is fixed and cannot be changed. (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk 51b2c338b -> 77e77010c AMBARI-10568. Rolling Restart: batch size is fixed and cannot be changed. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/77e77010 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/77e77010 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/77e77010 Branch: refs/heads/trunk Commit: 77e77010c8b142d6228a8cb4f8cf9e137f115abf Parents: 51b2c33 Author: Aleksandr Kovalenko Authored: Fri Apr 17 17:09:43 2015 +0300 Committer: Aleksandr Kovalenko Committed: Fri Apr 17 17:29:16 2015 +0300 -- ambari-web/app/messages.js | 1 + .../templates/common/rolling_restart_view.hbs | 11 - .../app/views/common/rolling_restart_view.js| 25 .../views/common/rolling_restart_view_test.js | 12 ++ 4 files changed, 44 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/77e77010/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 86a1b4b..28238ed 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2478,6 +2478,7 @@ Em.I18n.translations = { 'rollingrestart.dialog.err.invalid.batchsize': 'Invalid restart batch size: {0}', 'rollingrestart.dialog.err.invalid.waitTime': 'Invalid wait time between batches: {0}', 'rollingrestart.dialog.err.invalid.toleratesize': 'Invalid failure toleration count: {0}', + 'rollingrestart.dialog.warn.datanode.batch.size': 'Restarting more than one DataNode at a time is not recommended. Doing so can lead to data unavailability and/or possible loss of data being actively written to HFDS.', 'rollingrestart.dialog.msg.serviceNotInMM':'Note: This will trigger alerts. To suppress alerts, turn on Maintenance Mode for {0} prior to triggering a rolling restart', 'rollingrestart.dialog.msg.staleConfigsOnly': 'Only restart {0}s with stale configs', 'rollingrestart.rest.context': 'Rolling Restart of {0}s - batch {1} of {2}', http://git-wip-us.apache.org/repos/asf/ambari/blob/77e77010/ambari-web/app/templates/common/rolling_restart_view.hbs -- diff --git a/ambari-web/app/templates/common/rolling_restart_view.hbs b/ambari-web/app/templates/common/rolling_restart_view.hbs index d443376..93efdb5 100644 --- a/ambari-web/app/templates/common/rolling_restart_view.hbs +++ b/ambari-web/app/templates/common/rolling_restart_view.hbs @@ -71,7 +71,7 @@ {{/if}} {{#if view.errors}} - + {{#each error in view.errors}} {{error}} @@ -79,4 +79,13 @@ {{/if}} + {{#if view.warnings}} + + + {{#each warning in view.warnings}} +{{warning}} + {{/each}} + + + {{/if}} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/77e77010/ambari-web/app/views/common/rolling_restart_view.js -- diff --git a/ambari-web/app/views/common/rolling_restart_view.js b/ambari-web/app/views/common/rolling_restart_view.js index 652e94f..d84f9c6 100644 --- a/ambari-web/app/views/common/rolling_restart_view.js +++ b/ambari-web/app/views/common/rolling_restart_view.js @@ -92,13 +92,18 @@ App.RollingRestartView = Em.View.extend({ */ errors : [], /** + * List of warnings in batch-request properties, do not disable submit button + * @type {Array} + */ + warnings : [], + /** * Set initial values for batch-request properties */ initialize : function() { if (this.get('batchSize') == -1 && this.get('interBatchWaitTimeSeconds') == -1 && this.get('tolerateSize') == -1) { var restartCount = this.get('restartHostComponents.length'); var batchSize = 1; - if (restartCount > 10) { + if (restartCount > 10 && this.get('hostComponentName') !== 'DATANODE') { batchSize = Math.ceil(restartCount / 10); } var tolerateCount = batchSize; @@ -115,16 +120,27 @@ App.RollingRestartView = Em.View.extend({ */ validate : function() { var displayName = this.get('hostComponentDisplayName'); +var componentName = this.get('hostComponentName'); var totalCount = this.get('restartHostComponents.length'); var bs = this.get('batchSize'); var ts = this.get('tolerateSize'); var wait = this.get('interBatchWaitTimeSeconds'); var errors = []; +var warnings = []; +var bsError, tsError, waitError; if (totalCount < 1) { errors.push(Em.I18n.t('rollingrestart.dialog.msg.noRestartHosts').format(displayName)); } else { - var b
ambari git commit: AMBARI-10565. Alerts: test cases for python code, AlertSchedulerHandler (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk 52fe9f77f -> 51b2c338b AMBARI-10565. Alerts: test cases for python code, AlertSchedulerHandler (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/51b2c338 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/51b2c338 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/51b2c338 Branch: refs/heads/trunk Commit: 51b2c338bf1489dd0223a6e2bf105a737676495c Parents: 52fe9f7 Author: Lisnichenko Dmitro Authored: Fri Apr 17 16:05:25 2015 +0300 Committer: Lisnichenko Dmitro Committed: Fri Apr 17 16:05:25 2015 +0300 -- .../python/ambari_agent/alerts/base_alert.py| 4 +- .../python/ambari_agent/alerts/port_alert.py| 5 +- .../python/ambari_agent/TestAlertCollector.py | 205 +++ .../ambari_agent/TestAlertSchedulerHandler.py | 210 +++ .../test/python/ambari_agent/TestBaseAlert.py | 85 + .../test/python/ambari_agent/TestHeartbeat.py | 1 + .../test/python/ambari_agent/TestMetricAlert.py | 212 +++ .../test/python/ambari_agent/TestPortAlert.py | 361 +++ .../test/python/ambari_agent/TestScriptAlert.py | 67 .../resource_management/TestUserResource.py | 2 +- 10 files changed, 1148 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/51b2c338/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py index ec30570..08fb8a9 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py @@ -433,7 +433,9 @@ class BaseAlert(object): Low level function to collect alert data. The result is a tuple as: res[0] = the result code res[1] = the list of arguments supplied to the reporting text for the result code -""" +""" +#TODO: After implementation uncomment /src/test/python/ambari_agent/TestMetricAlert.py:194 +# and /src/test/python/ambari_agent/TestScriptAlert.py:52 raise NotImplementedError http://git-wip-us.apache.org/repos/asf/ambari/blob/51b2c338/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py index 1dbd450..848da65 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py @@ -118,7 +118,8 @@ class PortAlert(BaseAlert): if logger.isEnabledFor(logging.DEBUG): logger.debug("[Alert][{0}] Checking {1} on port {2}".format( self.get_name(), host, str(port))) - + +s = None try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(self.critical_timeout) @@ -163,4 +164,4 @@ class PortAlert(BaseAlert): if state == self.RESULT_OK or state == self.RESULT_WARNING: return 'TCP OK - {0:.4f} response on port {1}' -return 'Connection failed: {0} to {1}:{2}' \ No newline at end of file +return 'Connection failed: {0} to {1}:{2}' http://git-wip-us.apache.org/repos/asf/ambari/blob/51b2c338/ambari-agent/src/test/python/ambari_agent/TestAlertCollector.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestAlertCollector.py b/ambari-agent/src/test/python/ambari_agent/TestAlertCollector.py new file mode 100644 index 000..5ee1171 --- /dev/null +++ b/ambari-agent/src/test/python/ambari_agent/TestAlertCollector.py @@ -0,0 +1,205 @@ +#!/usr/bin/env python + +''' +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. +''' + +from ambari_agent.alerts.collector import AlertCollector + +from mock.mock import patch +from unittest import TestCa
ambari git commit: AMBARI-10563 Panel with depended configs doesn't hide after "Discard" clicked. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 7808566db -> 52fe9f77f AMBARI-10563 Panel with depended configs doesn't hide after "Discard" clicked. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52fe9f77 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52fe9f77 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52fe9f77 Branch: refs/heads/trunk Commit: 52fe9f77f2faded84ff3142cf89dd9e5660eca20 Parents: 7808566 Author: aBabiichuk Authored: Fri Apr 17 15:10:54 2015 +0300 Committer: aBabiichuk Committed: Fri Apr 17 15:29:57 2015 +0300 -- ambari-web/app/controllers/main/service/info/configs.js | 1 + ambari-web/test/controllers/main/service/info/config_test.js | 8 2 files changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/52fe9f77/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 e406d55..3628a7a 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -1185,6 +1185,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM */ doCancel: function () { this.set('preSelectedConfigVersion', null); +this.clearDependentConfigs(); Em.run.once(this, 'onConfigGroupChange'); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/52fe9f77/ambari-web/test/controllers/main/service/info/config_test.js -- diff --git a/ambari-web/test/controllers/main/service/info/config_test.js b/ambari-web/test/controllers/main/service/info/config_test.js index eabcb0f..26ec8de 100644 --- a/ambari-web/test/controllers/main/service/info/config_test.js +++ b/ambari-web/test/controllers/main/service/info/config_test.js @@ -330,6 +330,14 @@ describe("App.MainServiceInfoConfigsController", function () { mainServiceInfoConfigsController.doCancel(); expect(Em.run.once.calledWith(mainServiceInfoConfigsController, "onConfigGroupChange")).to.equal(true); }); + +it("should clear dependent configs", function() { + mainServiceInfoConfigsController.set('groupsToSave', { HDFS: 'my cool group'}); + mainServiceInfoConfigsController.set('_dependentConfigValues', Em.A([{name: 'prop_1'}])); + mainServiceInfoConfigsController.doCancel(); + expect(App.isEmptyObject(mainServiceInfoConfigsController.get('groupsToSave'))).to.be.true; + expect(App.isEmptyObject(mainServiceInfoConfigsController.get('_dependentConfigValues'))).to.be.true; +}); }); describe("#getMasterComponentHostValue", function () {
ambari git commit: AMBARI-10564. Combobox widget layout issues (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk f5b17aa50 -> 7808566db AMBARI-10564. Combobox widget layout issues (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7808566d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7808566d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7808566d Branch: refs/heads/trunk Commit: 7808566db8440aa32330da5a48785169c79a4e96 Parents: f5b17aa Author: Oleg Nechiporenko Authored: Fri Apr 17 15:25:00 2015 +0300 Committer: Oleg Nechiporenko Committed: Fri Apr 17 15:25:00 2015 +0300 -- ambari-web/app/assets/test/tests.js | 1 + .../service/configs/widget_popover_support.js | 11 ++- ambari-web/app/styles/widgets.less | 5 ++ .../configs/widgets/combo_config_widget.hbs | 2 +- .../configs/widgets/config_widget_view.js | 21 + .../configs/widget_popover_support_test.js | 91 6 files changed, 128 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7808566d/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 c5316ce..0e576bc 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -144,6 +144,7 @@ var files = ['test/init_model_test', 'test/mixins/common/table_server_view_mixin_test', 'test/mixins/common/widget_mixin_test', 'test/mixins/main/host/details/host_components/decommissionable_test', + 'test/mixins/main/service/configs/widget_popover_support_test', 'test/mixins/routers/redirections_test', 'test/mixins/wizard/addSeccurityConfigs_test', 'test/mixins/wizard/wizard_menu_view_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/7808566d/ambari-web/app/mixins/main/service/configs/widget_popover_support.js -- diff --git a/ambari-web/app/mixins/main/service/configs/widget_popover_support.js b/ambari-web/app/mixins/main/service/configs/widget_popover_support.js index 3ae1d6c..9855396 100644 --- a/ambari-web/app/mixins/main/service/configs/widget_popover_support.js +++ b/ambari-web/app/mixins/main/service/configs/widget_popover_support.js @@ -43,14 +43,21 @@ App.WidgetPopoverSupport = Em.Mixin.create({ */ popoverPlacement: function () { // popover to left if config is located at the right most sub-section of the right most section. +return this.get('isWidgetInTheRightColumn') ? 'left' : 'right'; + }.property('isWidgetInTheRightColumn'), + + /** + * Determines if widget is in the right column + * @type {boolean} + */ + isWidgetInTheRightColumn: function () { var secCI = this.get('section.columnIndex'); var secCS = this.get('section.columnSpan'); var tabCols = this.get('tab.columns'); var subsecCI = this.get('subSection.columnIndex'); var subsecCS = this.get('subSection.columnSpan'); var secCols = this.get('section.sectionColumns'); - -return ((secCI + secCS == tabCols) && (subsecCI + subsecCS == secCols))? 'left' : 'right'; +return ((secCI + secCS == tabCols) && (subsecCI + subsecCS == secCols)); }.property(), initPopover: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/7808566d/ambari-web/app/styles/widgets.less -- diff --git a/ambari-web/app/styles/widgets.less b/ambari-web/app/styles/widgets.less index 4c0706e..2df3619 100644 --- a/ambari-web/app/styles/widgets.less +++ b/ambari-web/app/styles/widgets.less @@ -319,6 +319,11 @@ border-radius: 0 3px 3px 0; } } + +ul.dropdown-menu { + z-index: 1100; // menu-items shouldn't be under popover +} + } .action-button { http://git-wip-us.apache.org/repos/asf/ambari/blob/7808566d/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs -- diff --git a/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs index 2e50ade..2e9315d 100644 --- a/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs +++ b/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs @@ -25,7 +25,7 @@ - + {{#each item in view.content.valuesList}} {{item.widgetValue}} http://git-wip-us.apache.org/repos/asf/ambari/blob/7808566d/ambari-web/app/views/common/configs/widgets/config_widget_view.js -- dif
ambari git commit: AMBARI-10560 When widget error messages show up, widget sizes should not increase. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 4f1607bb0 -> f5b17aa50 AMBARI-10560 When widget error messages show up, widget sizes should not increase. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f5b17aa5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f5b17aa5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f5b17aa5 Branch: refs/heads/trunk Commit: f5b17aa50e6ad73130c130fbab803d96f4aec342 Parents: 4f1607b Author: aBabiichuk Authored: Fri Apr 17 14:15:16 2015 +0300 Committer: aBabiichuk Committed: Fri Apr 17 14:30:22 2015 +0300 -- ambari-web/app/mixins/common/configs/enhanced_configs.js | 2 +- ambari-web/app/styles/widgets.less | 1 + ambari-web/app/templates/common/configs/widgets/controls.hbs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f5b17aa5/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index ae6ceee..6349fbf 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -274,7 +274,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({ /** setting dependent serviceNames (without current serviceName) **/ var dependentProperty = App.StackConfigProperty.find(dependent.name + "_" + tag); if (dependentProperty) { - if (!this.get('dependentServiceNames').contains(dependentProperty.get('serviceName')) && dependentProperty.get('serviceName') !== this.get('content.serviceName')) { + if (dependentProperty.get('serviceName') && !this.get('dependentServiceNames').contains(dependentProperty.get('serviceName')) && dependentProperty.get('serviceName') !== this.get('content.serviceName')) { this.get('dependentServiceNames').push(dependentProperty.get('serviceName')); } this._setDependentServicesAndFileNames(dependentProperty); http://git-wip-us.apache.org/repos/asf/ambari/blob/f5b17aa5/ambari-web/app/styles/widgets.less -- diff --git a/ambari-web/app/styles/widgets.less b/ambari-web/app/styles/widgets.less index c052bd2..4c0706e 100644 --- a/ambari-web/app/styles/widgets.less +++ b/ambari-web/app/styles/widgets.less @@ -55,6 +55,7 @@ margin-right: @undo-btn-margin; } .widget-config-controls { +float: right; display: inline-block; margin-left: 10px; .widget-action { http://git-wip-us.apache.org/repos/asf/ambari/blob/f5b17aa5/ambari-web/app/templates/common/configs/widgets/controls.hbs -- diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs b/ambari-web/app/templates/common/configs/widgets/controls.hbs index 3889ecc..1780906 100644 --- a/ambari-web/app/templates/common/configs/widgets/controls.hbs +++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs @@ -68,6 +68,8 @@ {{#if view.config.errorMessage}} {{view.config.errorMessage}} + {{else}} + {{/if}} {{#if view.isComparison}}
ambari git commit: AMBARI-10558 Create widget wizard: Integrate the wizard with backend API. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 55e31bb82 -> 4f1607bb0 AMBARI-10558 Create widget wizard: Integrate the wizard with backend API. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4f1607bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4f1607bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4f1607bb Branch: refs/heads/trunk Commit: 4f1607bb0f9a1b35a8ab7394bcf0c47ec75a8c1d Parents: 55e31bb Author: Andrii Tkach Authored: Fri Apr 17 13:33:19 2015 +0300 Committer: Andrii Tkach Committed: Fri Apr 17 14:05:12 2015 +0300 -- .../service/widgets/create/step3_controller.js | 51 +++- .../service/widgets/create/wizard_controller.js | 19 ambari-web/app/routes/add_widget.js | 5 +- .../service/widgets/create/step2_add_metric.hbs | 10 ++-- .../main/service/widgets/create/step3.hbs | 2 +- ambari-web/app/utils/ajax/ajax.js | 11 + .../service/widgets/create/expression_view.js | 3 ++ 7 files changed, 80 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4f1607bb/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js index b417afd..7d43b14 100644 --- a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js +++ b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js @@ -88,5 +88,54 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({ //TODO: Following computed propert needs to be implemented. Next button should be enabled when there is no validation error and all required fields are filled isSubmitDisabled: function () { return !this.get('widgetName'); - }.property('widgetName') + }.property('widgetName'), + + /** + * collect all needed data to create new widget + * @returns {{WidgetInfo: {cluster_name: *, widget_name: *, display_name: *, widget_type: *, description: *, scope: string, metrics: *, values: *, properties: *}}} + */ + collectWidgetData: function () { +return { + WidgetInfo: { +widget_name: this.get('widgetName'), +display_name: this.get('widgetName'), +widget_type: this.get('content.widgetType'), +description: this.get('widgetDescription'), +scope: this.get('widgetScope.name').toUpperCase(), +"metrics": this.get('widgetMetrics').map(function (metric) { + return { +"name": metric.name, +"service_name": metric.serviceName, +"component_name": metric.componentName + } +}), +values: this.get('widgetValues'), +properties: this.get('widgetProperties') + } +}; + }, + + /** + * post widget definition to server + * @returns {$.ajax} + */ + postWidgetDefinition: function () { +return App.ajax.send({ + name: 'widgets.wizard.add', + sender: this, + data: { +data: this.collectWidgetData() + }, + success: 'postWidgetDefinitionSuccessCallback' +}); + }, + + postWidgetDefinitionSuccessCallback: function() { + + }, + + complete: function () { +this.postWidgetDefinition(); +App.router.send('complete'); + } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/4f1607bb/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js -- diff --git a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js index cf37599..fac5300 100644 --- a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js +++ b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js @@ -212,7 +212,7 @@ App.WidgetWizardController = App.WizardController.extend({ }, callback: callback, success: 'loadAllMetricsFromServerCallback' -}) +}); }, /** @@ -224,12 +224,11 @@ App.WidgetWizardController = App.WizardController.extend({ var metrics = {}; if (json) { - var data = json.items[0].artifacts[0].artifact_data; - - for (var serviceName in data) { -for (var componentName in data[serviceName]) { - for (var level in data[serviceName][componentName]) { -metrics = data[serviceName][componentName][level][0]['metrics']['default']; + json.items.forEach(function (service) { +var data = service.artifacts[0].artifact_data[service.StackServices.service_name]; +
ambari git commit: AMBARI-10559 Add Service: Customize Service page broken after navigating from configs page with theme. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 04c986186 -> 55e31bb82 AMBARI-10559 Add Service: Customize Service page broken after navigating from configs page with theme. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/55e31bb8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/55e31bb8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/55e31bb8 Branch: refs/heads/trunk Commit: 55e31bb820fc80c264cf96b52a3caeb3ed069154 Parents: 04c9861 Author: aBabiichuk Authored: Fri Apr 17 13:33:19 2015 +0300 Committer: aBabiichuk Committed: Fri Apr 17 13:33:19 2015 +0300 -- ambari-web/app/config.js | 1 - .../views/common/configs/widgets/slider_config_widget_view.js| 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/55e31bb8/ambari-web/app/config.js -- diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js index 27471fb..440a1ea 100644 --- a/ambari-web/app/config.js +++ b/ambari-web/app/config.js @@ -68,7 +68,6 @@ App.supports = { autoRollbackHA: false, alwaysEnableManagedMySQLForHive: false, preKerberizeCheck: false, - automatedKerberos: true, customizeAgentUserAccount: false, installGanglia: false, opsDuringRollingUpgrade: false, http://git-wip-us.apache.org/repos/asf/ambari/blob/55e31bb8/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js -- diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js index 3e144bc..d1f0b05 100644 --- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js @@ -345,7 +345,9 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ * @method changeBoundaries */ changeBoundaries: function() { -Em.run.once(this, 'changeBoundariesOnce'); +if (this.get('config.stackConfigProperty.widget')) { + Em.run.once(this, 'changeBoundariesOnce'); +} }, /**
ambari git commit: Revert "AMBARI-10491 [WinTP2] Ambari server: Ensure the service can be configured to run under a domain account"
Repository: ambari Updated Branches: refs/heads/trunk 2ea37fbcd -> 04c986186 Revert "AMBARI-10491 [WinTP2] Ambari server: Ensure the service can be configured to run under a domain account" This reverts commit 962a8a006e35860d391d10781d0b911d7f602d9d. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/04c98618 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/04c98618 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/04c98618 Branch: refs/heads/trunk Commit: 04c986186cacb34bdfca3266215da9f00aa93a18 Parents: 2ea37fb Author: Jayush Luniya Authored: Thu Apr 16 22:34:30 2015 -0700 Committer: Jayush Luniya Committed: Thu Apr 16 22:34:30 2015 -0700 -- .../main/python/ambari_commons/os_windows.py| 12 +- ambari-server/src/main/python/ambari-server.py | 17 +-- .../python/ambari_server/serverConfiguration.py | 3 + .../main/python/ambari_server/serverSetup.py| 150 +++ .../src/main/python/ambari_windows_service.py | 17 ++- .../resources/Ambari-DDL-SQLServer-CREATE.sql | 1 - .../src/test/python/TestAmbariServer.py | 142 +- 7 files changed, 142 insertions(+), 200 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/04c98618/ambari-common/src/main/python/ambari_commons/os_windows.py -- diff --git a/ambari-common/src/main/python/ambari_commons/os_windows.py b/ambari-common/src/main/python/ambari_commons/os_windows.py index 38db310..edbcc7b 100644 --- a/ambari-common/src/main/python/ambari_commons/os_windows.py +++ b/ambari-common/src/main/python/ambari_commons/os_windows.py @@ -629,7 +629,7 @@ class WinService(win32serviceutil.ServiceFramework): installArgs.append("--perfmondll=" + perfMonDll) installArgs.append("install") -return win32serviceutil.HandleCommandLine(cls, classPath, installArgs) +win32serviceutil.HandleCommandLine(cls, classPath, installArgs) @classmethod def Start(cls, waitSecs = 30): @@ -740,16 +740,6 @@ class UserHelper(object): return UserHelper.ACTION_FAILED, e.strerror return UserHelper.ACTION_OK, "User created." - def find_user(self): -try: - user_info = win32net.NetUserGetInfo(self.dcName, self.userName, 0) -except pywintypes.error as e: - if e.winerror == 2221: -return False - else: -raise -return True - def add_user_privilege(self, privilege): try: acc_sid = win32security.LookupAccountName(self.dcName, self.userName)[0] http://git-wip-us.apache.org/repos/asf/ambari/blob/04c98618/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 749a965..f1f005d 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -69,6 +69,12 @@ class UserActionRestart(UserAction): self.need_restart = self.fn(*self.args, **self.kwargs) +def winsetup(options): + from ambari_windows_service import svcsetup + + setup(options) + svcsetup() + # # Starts the Ambari Server as a standalone process. # Ensures only one instance of the process is running. @@ -263,13 +269,6 @@ def restore(args): @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY) def init_parser_options(parser): - parser.add_option('-k', '--service-user-name', dest="svc_user", -default=None, -help="User account under which the Ambari Server service will run") - parser.add_option('-x', '--service-user-password', dest="svc_password", -default=None, -help="Password for the Ambari Server service user account") - parser.add_option('-f', '--init-script-file', dest="init_db_script_file", default="resources" + os.sep + "Ambari-DDL-SQLServer-CREATE.sql", help="File with database setup script") @@ -303,7 +302,7 @@ def init_parser_options(parser): help="Database user password") parser.add_option('--jdbc-driver', default=None, dest="jdbc_driver", help="Specifies the path to the JDBC driver JAR file") - # -b and -i the remaining available short options + # -b, -i, -k and -x the remaining available short options # -h reserved for help @OsFamilyFuncImpl(OsFamilyImpl.DEFAULT) @@ -476,7 +475,7 @@ def fix_database_options(options, parser): @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY) def create_user_action_map(args, options): action_map = { -SETUP_ACTION: UserAction(setup, options), +SETUP_ACTION: UserAction(winsetup, options), START_ACTION: UserAction(svcstart), P
ambari git commit: AMBARI-10555. Change API response structure for widget API. (Ivan via Jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 962a8a006 -> 2ea37fbcd AMBARI-10555. Change API response structure for widget API. (Ivan via Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ea37fbc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ea37fbc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ea37fbc Branch: refs/heads/trunk Commit: 2ea37fbcd7cacc38e388f89aa6bd55a79eecce53 Parents: 962a8a0 Author: Jaimin Jetly Authored: Thu Apr 16 21:24:46 2015 -0700 Committer: Jaimin Jetly Committed: Thu Apr 16 21:24:46 2015 -0700 -- .../ActiveWidgetLayoutResourceDefinition.java | 12 +++--- .../api/resources/WidgetResourceDefinition.java | 1 + .../ActiveWidgetLayoutResourceProvider.java | 23 +-- .../internal/WidgetResourceProvider.java| 24 ++-- .../src/main/resources/properties.json | 40 ++-- .../ActiveWidgetLayoutResourceProviderTest.java | 4 +- 6 files changed, 53 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2ea37fbc/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ActiveWidgetLayoutResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ActiveWidgetLayoutResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ActiveWidgetLayoutResourceDefinition.java index d6b4c6b..a867221 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ActiveWidgetLayoutResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ActiveWidgetLayoutResourceDefinition.java @@ -63,17 +63,17 @@ public class ActiveWidgetLayoutResourceDefinition extends BaseResourceDefinition TreeNode parent = resultNode.getParent(); for (TreeNode node : parent.getChildren()) { -if (node.getObject().getPropertiesMap().get("WidgetLayouts") != null) { - String layoutId = resultNode.getObject().getPropertyValue("WidgetLayouts/id").toString(); - String clusterName = resultNode.getObject().getPropertyValue("WidgetLayouts/cluster_name").toString(); +if (node.getObject().getPropertiesMap().get("WidgetLayoutInfo") != null) { + String layoutId = resultNode.getObject().getPropertyValue("WidgetLayoutInfo/id").toString(); + String clusterName = resultNode.getObject().getPropertyValue("WidgetLayoutInfo/cluster_name").toString(); String newHref = href.substring(0, href.indexOf("/users") + 1) + "clusters/" + clusterName + "/widget_layouts/" + layoutId; resultNode.setProperty("href", newHref); } -if (node.getObject().getPropertiesMap().get("WidgetLayouts") != null && - node.getObject().getPropertiesMap().get("WidgetLayouts").get("WidgetInfo") != null) { +if (node.getObject().getPropertiesMap().get("WidgetLayoutInfo") != null && + node.getObject().getPropertiesMap().get("WidgetLayoutInfo").get("WidgetInfo") != null) { - ArrayList widgetsList = (ArrayList) node.getObject().getPropertiesMap().get("WidgetLayouts").get("WidgetInfo"); + ArrayList widgetsList = (ArrayList) node.getObject().getPropertiesMap().get("WidgetLayoutInfo").get("WidgetInfo"); for (Object widgetObject : widgetsList) { HashMap widgetMap = (HashMap) widgetObject; String widgetId = ((WidgetResponse) widgetMap.get("Widget")).getId().toString(); http://git-wip-us.apache.org/repos/asf/ambari/blob/2ea37fbc/ambari-server/src/main/java/org/apache/ambari/server/api/resources/WidgetResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/WidgetResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/WidgetResourceDefinition.java index ee0eaf0..10f287c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/WidgetResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/WidgetResourceDefinition.java @@ -1,3 +1,4 @@ + /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file http://git-wip-us.apache.org/repos/asf/ambari/blob/2ea37fbc/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidg
ambari git commit: AMBARI-10554. Add selected widgets from Widget Browser to the widget layout.(XIWANG)
Repository: ambari Updated Branches: refs/heads/trunk a69d17fad -> 23f7428a0 AMBARI-10554. Add selected widgets from Widget Browser to the widget layout.(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/23f7428a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/23f7428a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/23f7428a Branch: refs/heads/trunk Commit: 23f7428a050d6c2a593d53d717875f75a5c2e614 Parents: a69d17f Author: Xi Wang Authored: Thu Apr 16 17:40:38 2015 -0700 Committer: Xi Wang Committed: Thu Apr 16 17:40:48 2015 -0700 -- .../controllers/main/service/info/summary.js| 83 +--- ambari-web/app/mixins/common/widget_mixin.js| 34 .../app/styles/enhanced_service_dashboard.less | 7 +- .../modal_popups/widget_browser_popup.hbs | 2 - ambari-web/app/utils/ajax/ajax.js | 11 +++ 5 files changed, 106 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/23f7428a/ambari-web/app/controllers/main/service/info/summary.js -- diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js index ad27c2d..49505e5 100644 --- a/ambari-web/app/controllers/main/service/info/summary.js +++ b/ambari-web/app/controllers/main/service/info/summary.js @@ -449,7 +449,7 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({ description: widget.Widgets.description, widgetType: widgetType, iconPath: "/img/widget-" + widgetType.toLowerCase() + ".png", -serviceName: widget.Widgets.metrics.mapProperty('service_name').uniq().join('-'), +serviceName: JSON.parse(widget.Widgets.metrics).mapProperty('service_name').uniq().join('-'), added: addedWidgetsNames.contains(widgetName), isShared: true }); @@ -498,7 +498,7 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({ description: widget.Widgets.description, widgetType: widgetType, iconPath: "/img/widget-" + widgetType.toLowerCase() + ".png", -serviceName: widget.Widgets.metrics.mapProperty('service_name').uniq().join('-'), +serviceName: JSON.parse(widget.Widgets.metrics).mapProperty('service_name').uniq().join('-'), added: addedWidgetsNames.contains(widgetName), isShared: false }); @@ -512,22 +512,81 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({ * add widgets, on click handler for "Add" */ addWidget: function (event) { -var widget = event.context; -var widgetName = widget.widgetName; -widget.set('added', !widget.added); -// add current widget to current layout +var widgetToAdd = event.context; +var activeLayout = this.get('activeWidgetLayout'); +var widgetIds = activeLayout.get('widgets').map(function(widget) { + return { +"id": widget.get("id") + } +}); +widgetIds.pushObject({ + "id": widgetToAdd.id +}) +var data = { + "WidgetLayoutInfo": { +"display_name": activeLayout.get("displayName"), +"id": activeLayout.get("id"), +"layout_name": activeLayout.get("layoutName"), +"scope": activeLayout.get("scope"), +"section_name": activeLayout.get("sectionName"), +"widgets": widgetIds + } +}; +widgetToAdd.set('added', !widgetToAdd.added); +return App.ajax.send({ + name: 'widget.layout.edit', + sender: this, + data: { +layoutId: activeLayout.get("id"), +data: data + }, + success: 'updateActiveLayout' +}); }, /** - * delete widgets, on click handler for "Added" + * hide widgets, on click handler for "Added" */ hideWidget: function (event) { -var widget = event.context; -var widgetName = widget.widgetName; -widget.set('added', !widget.added); -// hide current widget from current layout +var widgetToHide = event.context; +var activeLayout = this.get('activeWidgetLayout'); +var widgetIds = activeLayout.get('widgets').map(function(widget) { + return { +"id": widget.get("id") + } +}); +var data = { + "WidgetLayoutInfo": { +"display_name": activeLayout.get("displayName"), +"id": activeLayout.get("id"), +"layout_name": activeLayout.get("layoutName"), +"scope": activeLayout.get("scope"), +"section_name": activeLayout.get("sectionName"), +"widgets": widgetIds.filter(function(widget) { + return widget.id != widgetToHide.id; +}) + } +}; +widgetToHide.set('added'
ambari git commit: AMBARI-10552. Several ambari-server python unit tests fail because OS type is not mocked
Repository: ambari Updated Branches: refs/heads/trunk c7157e00f -> a69d17fad AMBARI-10552. Several ambari-server python unit tests fail because OS type is not mocked Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a69d17fa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a69d17fa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a69d17fa Branch: refs/heads/trunk Commit: a69d17fad8e76c45a182218724de19aae8173d2e Parents: c7157e0 Author: Sumit Mohanty Authored: Thu Apr 16 16:04:42 2015 -0700 Committer: Sumit Mohanty Committed: Thu Apr 16 16:04:42 2015 -0700 -- .../src/test/python/stacks/2.0.6/YARN/test_historyserver.py | 1 + .../src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py | 1 + .../test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py | 1 + ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py | 1 + .../src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py | 1 + ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py | 1 + .../src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py| 1 + .../src/test/python/stacks/2.1/YARN/test_apptimelineserver.py | 1 + 8 files changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a69d17fa/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py index 6117a6c..dc7fc11 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py @@ -22,6 +22,7 @@ from stacks.utils.RMFTestCase import * import os origin_exists = os.path.exists +@patch("platform.linux_distribution", new = MagicMock(return_value="Linux")) @patch.object(os.path, "exists", new=MagicMock( side_effect=lambda *args: origin_exists(args[0]) if args[0][-2:] == "j2" else True)) http://git-wip-us.apache.org/repos/asf/ambari/blob/a69d17fa/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py index 3cabf10..4fdc398 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py @@ -22,6 +22,7 @@ from stacks.utils.RMFTestCase import * import os origin_exists = os.path.exists +@patch("platform.linux_distribution", new = MagicMock(return_value="Linux")) @patch.object(os.path, "exists", new=MagicMock( side_effect=lambda *args: origin_exists(args[0]) if args[0][-2:] == "j2" else True)) http://git-wip-us.apache.org/repos/asf/ambari/blob/a69d17fa/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py index 3af8064..01073df 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py @@ -22,6 +22,7 @@ from stacks.utils.RMFTestCase import * import os origin_exists = os.path.exists +@patch("platform.linux_distribution", new = MagicMock(return_value="Linux")) @patch.object(os.path, "exists", new=MagicMock( side_effect=lambda *args: origin_exists(args[0]) if args[0][-2:] == "j2" else True)) http://git-wip-us.apache.org/repos/asf/ambari/blob/a69d17fa/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py index 9c88389..44ea312 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py @@ -24,6 +24,7 @@ from resource_management.core import shell import os origin_exists = os.path.exists +@patch("platform.linux_distribution", new = MagicMock(return_value="Linux")) @patch.object(os.path, "exists", new=MagicMock( side_effect=lambda *args: origin_exists(args[0]) if args[0][-2:] == "j2" else True)) http://git-wip-us.apache.org/repos/asf/ambari