ambari git commit: AMBARI-16419: PXF should be collocated with NAMENODE even if NAMENODE is moved to another host (mithmatt)
Repository: ambari Updated Branches: refs/heads/trunk fb9455562 -> b86507829 AMBARI-16419: PXF should be collocated with NAMENODE even if NAMENODE is moved to another host (mithmatt) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b8650782 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b8650782 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b8650782 Branch: refs/heads/trunk Commit: b86507829d11eb8a16b9046a9458879881e3ab4e Parents: fb94555 Author: MattAuthored: Wed May 11 19:30:13 2016 -0700 Committer: Matt Committed: Wed May 11 19:30:13 2016 -0700 -- .../main/service/reassign/step6_controller.js | 18 ambari-web/app/messages.js | 1 + .../service/reassign/step6_controller_test.js | 95 3 files changed, 114 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b8650782/ambari-web/app/controllers/main/service/reassign/step6_controller.js -- diff --git a/ambari-web/app/controllers/main/service/reassign/step6_controller.js b/ambari-web/app/controllers/main/service/reassign/step6_controller.js index f718d46..113686b 100644 --- a/ambari-web/app/controllers/main/service/reassign/step6_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step6_controller.js @@ -42,6 +42,20 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro } else { this.set('hostComponents', [this.get('content.reassign.component_name')]); } + +if (App.Service.find().someProperty('serviceName', 'PXF') && this.get('content.reassign.component_name') === 'NAMENODE') { + var pxfHosts = App.HostComponent.find().filterProperty('componentName', 'PXF').mapProperty('hostName'); + var dataNodeHosts = App.HostComponent.find().filterProperty('componentName', 'DATANODE').mapProperty('hostName'); + + // If NAMENODE is being moved and source host does not have DATANODE, PXF should be removed from source host + if (pxfHosts.contains(this.get('content.reassignHosts.source')) && !dataNodeHosts.contains(this.get('content.reassignHosts.source'))) +this.get('hostComponents').push('PXF'); + + // If NAMENODE is being moved and target host does not have PXF, PXF should be added to target host + if (!pxfHosts.contains(this.get('content.reassignHosts.target'))) + this.get('commands').splice(this.get('commands').indexOf('startAllServices'), 0, 'installPxf'); +} + this._super(); }, @@ -118,6 +132,10 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro } }, + installPxf: function () { +this.createInstallComponentTask('PXF', this.get('content.reassignHosts.target'), "PXF"); + }, + startAllServices: function () { this.startServices(true); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/b8650782/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index e388526..910bed7 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2231,6 +2231,7 @@ Em.I18n.translations = { 'services.reassign.step6.tasks.putHostComponentsInMaintenanceMode.title':'Disable {0}', 'services.reassign.step6.tasks.deleteHostComponents.title': 'Delete disabled {0}', 'services.reassign.step6.tasks.startAllServices.title': 'Start All Services', + 'services.reassign.step6.tasks.installPxf.title': 'Install PXF on NameNode', 'services.reassign.step6.tasks.stopMysqlService.title': 'Stop Mysql Server', 'services.reassign.step6.tasks.stopHostComponentsInMaintenanceMode.title': 'Stop {0}', 'services.reassign.step6.status.success': 'Successfully moved {0} from {1} host to {2} host.', http://git-wip-us.apache.org/repos/asf/ambari/blob/b8650782/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js -- diff --git a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js index 89e2325..f5029a8 100644 --- a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js +++ b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js @@ -138,6 +138,101 @@ describe('App.ReassignMasterWizardStep6Controller', function () { }); }); + describe('#loadStep() for reassign NameNode with PXF service installed', function () { + +var serviceStub, hostComponentStub, pxfHosts, dataNodeHosts; + +var commands = [ + 'stopMysqlService',
ambari git commit: AMBARI-16463. Change Falcon startup properties to specify actimq-all.jar instead of active-mq for 2.5 version of the HDP stack (Venkat Ranganathan via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk b9ed455d5 -> fb9455562 AMBARI-16463. Change Falcon startup properties to specify actimq-all.jar instead of active-mq for 2.5 version of the HDP stack (Venkat Ranganathan via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb945556 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb945556 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb945556 Branch: refs/heads/trunk Commit: fb9455562ab17188765a7163dd444bd2d9a598a8 Parents: b9ed455 Author: Sumit MohantyAuthored: Wed May 11 14:24:02 2016 -0700 Committer: Sumit Mohanty Committed: Wed May 11 14:24:02 2016 -0700 -- .../configuration/falcon-startup.properties.xml | 29 1 file changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb945556/ambari-server/src/main/resources/stacks/HDP/2.5/services/configuration/falcon-startup.properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/configuration/falcon-startup.properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/configuration/falcon-startup.properties.xml new file mode 100644 index 000..77dd386 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/configuration/falcon-startup.properties.xml @@ -0,0 +1,29 @@ + + + + + +*.shared.libs + activemq-all,ant,geronimo-j2ee-management,jms,json-simple,oozie-client,spring-jms,commons-lang3,commons-el + + + +
ambari git commit: AMBARI-16417: More information for Standby sync alert
Repository: ambari Updated Branches: refs/heads/trunk 9c5122aaf -> b9ed455d5 AMBARI-16417: More information for Standby sync alert Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b9ed455d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b9ed455d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b9ed455d Branch: refs/heads/trunk Commit: b9ed455d5df1c5cec968234e0e6c7019413b68c8 Parents: 9c5122a Author: Jun AokiAuthored: Wed May 11 14:20:28 2016 -0700 Committer: Jun Aoki Committed: Wed May 11 14:20:28 2016 -0700 -- .../2.0.0/package/alerts/alert_sync_status.py | 24 .../stacks/2.3/HAWQ/test_alert_sync_status.py | 8 +++ 2 files changed, 18 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b9ed455d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py index c94be9e..e916f07 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py @@ -60,11 +60,12 @@ def execute(configurations={}, parameters={}, host_name=None): return (RESULT_STATE_SKIPPED, ['HAWQSTANDBY is not installed.']) try: -sync_status = get_sync_status(configurations[HAWQMASTER_PORT]) -if sync_status in ('Synchronized', 'Synchronizing'): +summary_state, error_message = get_sync_status(configurations[HAWQMASTER_PORT]) + +if summary_state in ('Synchronized', 'Synchronizing'): return (RESULT_STATE_OK, ['HAWQSTANDBY is in sync with HAWQMASTER.']) -elif sync_status == 'Not Synchronized': - return (RESULT_STATE_WARNING, ['HAWQSTANDBY is not in sync with HAWQMASTER.']) +elif summary_state == 'Not Synchronized': + return (RESULT_STATE_WARNING, ['HAWQSTANDBY is not in sync with HAWQMASTER. ERROR: ' + error_message]) except Exception, e: logger.exception('[Alert] Retrieving HAWQSTANDBY sync status from HAWQMASTER fails on host, {0}:'.format(host_name)) logger.exception(str(e)) @@ -78,14 +79,17 @@ def get_sync_status(port): Gets the sync status of HAWQSTANDBY from HAWQMASTER by running a SQL command. summary_state can be of the following values: ('Synchronized', 'Synchronizing', 'Not Synchronized', 'None', 'Not Configured', 'Unknown') """ - query = "SELECT summary_state FROM gp_master_mirroring" - cmd = "source {0} && psql -p {1} -t -d template1 -c \"{2};\"".format(HAWQ_GREENPLUM_PATH_FILE, port, query) + + query = "SELECT summary_state, error_message FROM gp_master_mirroring" + cmd = "source {0} && psql -p {1} -t --no-align -d template1 -c \"{2};\"".format(HAWQ_GREENPLUM_PATH_FILE, port, query) - returncode, output = call(cmd, -user=HAWQ_USER, -timeout=60) + returncode, output = call(cmd, user=HAWQ_USER, timeout=60) if returncode: raise - return output.strip() + split_output = output.split("|") + summary_state = split_output[0].strip() + error_message = split_output[1].strip() + + return (summary_state, error_message) http://git-wip-us.apache.org/repos/asf/ambari/blob/b9ed455d/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py index 7d030dc..fd4f474 100644 --- a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py +++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py @@ -91,7 +91,7 @@ class TestAlertSyncStatus(RMFTestCase): } # Mock calls -get_sync_status_mock.return_value = 'Synchronized' +get_sync_status_mock.return_value = ('Synchronized', "") [status, messages] = alert_sync_status.execute(configurations=configs) self.assertEqual(status, RESULT_STATE_OK) @@ -110,7 +110,7 @@ class TestAlertSyncStatus(RMFTestCase): } # Mock calls -get_sync_status_mock.return_value = 'Synchronizing' +get_sync_status_mock.return_value = ('Synchronizing', "") [status, messages] = alert_sync_status.execute(configurations=configs) self.assertEqual(status, RESULT_STATE_OK) @@ -129,12 +129,12 @@ class TestAlertSyncStatus(RMFTestCase): } # Mock calls -
ambari git commit: AMBARI-16095. Storm Ambari View (Sriharsha Chintalapani via srimanth)
Repository: ambari Updated Branches: refs/heads/trunk 80040e0f2 -> 9c5122aaf AMBARI-16095. Storm Ambari View (Sriharsha Chintalapani via srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c5122aa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c5122aa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c5122aa Branch: refs/heads/trunk Commit: 9c5122aaf333089a466440c371d924634e544bb8 Parents: 80040e0 Author: Srimanth GunturiAuthored: Wed May 11 14:17:55 2016 -0700 Committer: Srimanth Gunturi Committed: Wed May 11 14:17:55 2016 -0700 -- .../storm/src/main/resources/images/icon-bolt.png | Bin 0 -> 2157 bytes .../src/main/resources/images/icon-spout.png | Bin 0 -> 2620 bytes .../storm/src/main/resources/images/loader.gif| Bin 0 -> 15017 bytes .../fonts/glyphicons-halflings-regular.eot| Bin 0 -> 20127 bytes .../fonts/glyphicons-halflings-regular.ttf| Bin 0 -> 45404 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes .../resources/libs/Bootstrap/images/clear.png | Bin 0 -> 509 bytes .../resources/libs/Bootstrap/images/loading.gif | Bin 0 -> 1849 bytes .../libs/Font-Awesome/fonts/FontAwesome.otf | Bin 0 -> 109688 bytes .../Font-Awesome/fonts/fontawesome-webfont.eot| Bin 0 -> 70807 bytes .../Font-Awesome/fonts/fontawesome-webfont.ttf| Bin 0 -> 142072 bytes .../Font-Awesome/fonts/fontawesome-webfont.woff | Bin 0 -> 83588 bytes .../Font-Awesome/fonts/fontawesome-webfont.woff2 | Bin 0 -> 66624 bytes 14 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9c5122aa/contrib/views/storm/src/main/resources/images/icon-bolt.png -- diff --git a/contrib/views/storm/src/main/resources/images/icon-bolt.png b/contrib/views/storm/src/main/resources/images/icon-bolt.png new file mode 100644 index 000..f3eb3db Binary files /dev/null and b/contrib/views/storm/src/main/resources/images/icon-bolt.png differ http://git-wip-us.apache.org/repos/asf/ambari/blob/9c5122aa/contrib/views/storm/src/main/resources/images/icon-spout.png -- diff --git a/contrib/views/storm/src/main/resources/images/icon-spout.png b/contrib/views/storm/src/main/resources/images/icon-spout.png new file mode 100644 index 000..9153d26 Binary files /dev/null and b/contrib/views/storm/src/main/resources/images/icon-spout.png differ http://git-wip-us.apache.org/repos/asf/ambari/blob/9c5122aa/contrib/views/storm/src/main/resources/images/loader.gif -- diff --git a/contrib/views/storm/src/main/resources/images/loader.gif b/contrib/views/storm/src/main/resources/images/loader.gif new file mode 100644 index 000..766329d Binary files /dev/null and b/contrib/views/storm/src/main/resources/images/loader.gif differ http://git-wip-us.apache.org/repos/asf/ambari/blob/9c5122aa/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.eot -- diff --git a/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.eot b/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 000..b93a495 Binary files /dev/null and b/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.eot differ http://git-wip-us.apache.org/repos/asf/ambari/blob/9c5122aa/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.ttf -- diff --git a/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.ttf b/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 000..1413fc6 Binary files /dev/null and b/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.ttf differ http://git-wip-us.apache.org/repos/asf/ambari/blob/9c5122aa/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.woff -- diff --git a/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.woff b/contrib/views/storm/src/main/resources/libs/Bootstrap/fonts/glyphicons-halflings-regular.woff new file mode 100644 index
ambari git commit: AMBARI-16441: RBAC UI Edits #6 (rzang)
Repository: ambari Updated Branches: refs/heads/trunk 63ede8195 -> 80040e0f2 AMBARI-16441: RBAC UI Edits #6 (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/80040e0f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/80040e0f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/80040e0f Branch: refs/heads/trunk Commit: 80040e0f2cb53fe8296a7cf5d4898d7a2eab7003 Parents: 63ede81 Author: Richard ZangAuthored: Wed May 11 13:19:01 2016 -0700 Committer: Richard Zang Committed: Wed May 11 13:19:40 2016 -0700 -- .../controllers/clusters/ClustersManageAccessCtrl.js| 11 ++- .../scripts/controllers/clusters/UserAccessListCtrl.js | 12 +--- .../admin-web/app/scripts/services/RoleDetailsModal.js | 8 .../ui/admin-web/app/views/clusters/userAccessList.html | 3 ++- .../ui/admin-web/app/views/modals/RoleDetailsModal.html | 3 ++- 5 files changed, 23 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/80040e0f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js index c92374b..ff255ef 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js @@ -91,14 +91,7 @@ angular.module('ambariAdminConsole') $scope.showHelpPage = function() { Cluster.getRolesWithAuthorizations().then(function(roles) { - RoleDetailsModal.show(roles.map(function(role) { -role.authorizations = role.authorizations.map(function(authorization) { - return authorization.AuthorizationInfo; -}); -var r = role.PermissionInfo; -r.authorizations = role.authorizations; -return r; - })); + RoleDetailsModal.show(roles); }); - } + }; }]); http://git-wip-us.apache.org/repos/asf/ambari/blob/80040e0f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js index 32f46c1..11a73f6 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js @@ -18,8 +18,8 @@ 'use strict'; angular.module('ambariAdminConsole') -.controller('UserAccessListCtrl',['$scope', '$location', 'Cluster', '$modal', '$rootScope', '$routeParams', 'PermissionSaver', 'Alert', '$translate', -function($scope, $location, Cluster, $modal, $rootScope, $routeParams, PermissionSaver, Alert, $translate) { +.controller('UserAccessListCtrl',['$scope', '$location', 'Cluster', '$modal', '$rootScope', '$routeParams', 'PermissionSaver', 'Alert', '$translate', 'RoleDetailsModal', +function($scope, $location, Cluster, $modal, $rootScope, $routeParams, PermissionSaver, Alert, $translate, RoleDetailsModal) { var $t = $translate.instant; $scope.constants = { users: $t('common.users').toLowerCase(), @@ -242,5 +242,11 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio $scope.switchToBlock = function() { $location.url('/clusters/' + $routeParams.id + '/manageAccess'); - } + }; + + $scope.showHelpPage = function() { +Cluster.getRolesWithAuthorizations().then(function(roles) { + RoleDetailsModal.show(roles); +}); + }; }]); http://git-wip-us.apache.org/repos/asf/ambari/blob/80040e0f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/RoleDetailsModal.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/RoleDetailsModal.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/RoleDetailsModal.js index eced664..7c03f4d 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/RoleDetailsModal.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/RoleDetailsModal.js @@ -21,6 +21,14 @@ angular.module('ambariAdminConsole') .factory('RoleDetailsModal',
ambari git commit: Revert "AMBARI-16230. Sporadic errors when deploying the cluster (oleewere)"
Repository: ambari Updated Branches: refs/heads/trunk 40823388e -> 63ede8195 Revert "AMBARI-16230. Sporadic errors when deploying the cluster (oleewere)" This reverts commit 84c3e7f06e1fb2e55d37f046ec584407c0b5c8eb. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/63ede819 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/63ede819 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/63ede819 Branch: refs/heads/trunk Commit: 63ede81959381698ecffe035c00a050fbb08316b Parents: 4082338 Author: Jonathan HurleyAuthored: Wed May 11 16:01:00 2016 -0400 Committer: Jonathan Hurley Committed: Wed May 11 16:05:01 2016 -0400 -- .../controller/internal/ServiceResourceProvider.java | 1 + .../org/apache/ambari/server/state/ServiceImpl.java | 3 --- .../ambari/server/state/cluster/ClusterImpl.java | 15 ++- .../org/apache/ambari/server/events/EventsTest.java | 1 + .../org/apache/ambari/server/orm/OrmTestHelper.java | 2 ++ .../server/state/alerts/AlertEventPublisherTest.java | 1 + .../server/state/alerts/InitialAlertEventTest.java | 1 + 7 files changed, 16 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/63ede819/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java index 56196c1..47342f3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java @@ -356,6 +356,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider s.setDesiredState(state); s.setDesiredStackVersion(cluster.getDesiredStackVersion()); s.persist(); + cluster.addService(s); // Initialize service widgets getManagementController().initializeWidgetsAndLayouts(cluster, s); } http://git-wip-us.apache.org/repos/asf/ambari/blob/63ede819/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java index c47bbbc..487489b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java @@ -475,7 +475,6 @@ public class ServiceImpl implements Service { // publish the service installed event StackId stackId = cluster.getDesiredStackVersion(); - cluster.addService(this); ServiceInstalledEvent event = new ServiceInstalledEvent( getClusterId(), stackId.getStackName(), @@ -485,8 +484,6 @@ public class ServiceImpl implements Service { } else { saveIfPersisted(); } - } catch (AmbariException e) { -LOG.error("Adding service '{}' is failed before publishing service installed event.", getName(), e); } finally { readWriteLock.writeLock().unlock(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/63ede819/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java index 85ca2c7..108732f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java @@ -172,7 +172,7 @@ public class ClusterImpl implements Cluster { private volatile boolean desiredStackVersionSet = true; - private Map services = null; + private volatile Map services = null; /** * [ Config Type -> [ Config Version Tag -> Config ] ] @@ -322,8 +322,6 @@ public class ClusterImpl implements Cluster { loadServiceConfigTypes(); } -loadServices(); - // register to receive stuff eventPublisher.register(this); this.eventPublisher = eventPublisher; @@ -376,6 +374,7 @@ public class ClusterImpl implements Cluster { * We need this for live status
ambari git commit: AMBARI-16460. ambari-server start failed (Vitalyi Brodetskyi via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 559894b7e -> 40823388e AMBARI-16460. ambari-server start failed (Vitalyi Brodetskyi via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40823388 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40823388 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40823388 Branch: refs/heads/trunk Commit: 40823388e273f5a35769c716e663837f54d732f6 Parents: 559894b Author: Sumit MohantyAuthored: Wed May 11 11:53:25 2016 -0700 Committer: Sumit Mohanty Committed: Wed May 11 11:53:25 2016 -0700 -- ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/40823388/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql index 22413e0..f6ee1e7 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql @@ -1076,7 +1076,7 @@ INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES ('blueprint_setting_id_seq', 0), ('ambari_operation_history_id_seq', 0), ('remote_cluster_id_seq', 0), - ('remote_cluster_service_id_seq', 0),; + ('remote_cluster_service_id_seq', 0); INSERT INTO adminresourcetype (resource_type_id, resource_type_name) VALUES (1, 'AMBARI'),
ambari git commit: AMBARI-16453. [Move Master][History Server] Service check fails after moving HistoryServer to another host.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 95fb3a16c -> 559894b7e AMBARI-16453. [Move Master][History Server] Service check fails after moving HistoryServer to another host.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/559894b7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/559894b7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/559894b7 Branch: refs/heads/trunk Commit: 559894b7eff3e0575fab2b703bbe1cece45d8451 Parents: 95fb3a1 Author: Vitaly BrodetskyiAuthored: Wed May 11 18:35:27 2016 +0300 Committer: Vitaly Brodetskyi Committed: Wed May 11 18:35:27 2016 +0300 -- .../src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml | 4 .../src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml | 4 2 files changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/559894b7/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml index 40e05ff..dacc1fb 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml @@ -46,6 +46,10 @@ should_install_lzo + hadooplzo_${stack_version}-native + should_install_lzo + + hadoop_${stack_version}-libhdfs http://git-wip-us.apache.org/repos/asf/ambari/blob/559894b7/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml index 0ea7da9..0edbaac 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml @@ -77,6 +77,10 @@ should_install_lzo + hadooplzo_${stack_version}-native + should_install_lzo + + hadoop_${stack_version}-libhdfs
ambari git commit: AMBARI-16439 - Restarting Upgraded Component During a Paused Upgrade Downgrades Component To Old Version (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk a4e72f648 -> 95fb3a16c AMBARI-16439 - Restarting Upgraded Component During a Paused Upgrade Downgrades Component To Old Version (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/95fb3a16 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/95fb3a16 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/95fb3a16 Branch: refs/heads/trunk Commit: 95fb3a16cfaf542b5fe221cecaa3cbeb68528852 Parents: a4e72f6 Author: Jonathan HurleyAuthored: Tue May 10 19:34:32 2016 -0400 Committer: Jonathan Hurley Committed: Wed May 11 13:42:38 2016 -0400 -- .../ambari/server/agent/ExecutionCommand.java | 11 +- .../ambari/server/agent/HeartbeatProcessor.java | 5 +- .../AmbariManagementControllerImpl.java | 9 +- .../listeners/upgrade/StackVersionListener.java | 13 +- .../org/apache/ambari/server/state/Cluster.java | 45 ++- .../server/state/cluster/ClusterImpl.java | 73 ++--- .../upgrade/StackVersionListenerTest.java | 37 +++ .../cluster/ClusterEffectiveVersionTest.java| 283 +++ 8 files changed, 412 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/95fb3a16/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java index 34a0918..bdb5fb1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java @@ -374,6 +374,7 @@ public class ExecutionCommand extends AgentCommand { String COMMAND_RETRY_ENABLED = "command_retry_enabled"; String AGENT_STACK_RETRY_ON_UNAVAILABILITY = "agent_stack_retry_on_unavailability"; String AGENT_STACK_RETRY_COUNT = "agent_stack_retry_count"; + /** * Comma separated list of config-types whose tags have be refreshed * at runtime before being executed. If all config-type tags have to be @@ -383,6 +384,7 @@ public class ExecutionCommand extends AgentCommand { String SERVICE_CHECK = "SERVICE_CHECK"; // TODO: is it standard command? maybe add it to RoleCommand enum? String CUSTOM_COMMAND = "custom_command"; + /** * The key indicating that the package_version string is available */ @@ -392,11 +394,14 @@ public class ExecutionCommand extends AgentCommand { * The key indicating that there is an un-finalized upgrade which is suspended. */ String UPGRADE_SUSPENDED = "upgrade_suspended"; + /** - * When installing packages, optionally provide the row id the version is for in - * order to precisely match response data. + * When installing packages, optionally provide the row id the version is + * for in order to precisely match response data. + * + * The agent will return this value back in its response so the repository + * can be looked up and possibly have its version updated. */ String REPO_VERSION_ID = "repository_version_id"; } - } http://git-wip-us.apache.org/repos/asf/ambari/blob/95fb3a16/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java index c587e9f..c6036c2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java @@ -39,6 +39,7 @@ import org.apache.ambari.server.ServiceNotFoundException; import org.apache.ambari.server.actionmanager.ActionManager; import org.apache.ambari.server.actionmanager.HostRoleCommand; import org.apache.ambari.server.actionmanager.HostRoleStatus; +import org.apache.ambari.server.agent.ExecutionCommand.KeyNames; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.controller.MaintenanceStateHelper; import org.apache.ambari.server.events.ActionFinalReportReceivedEvent; @@ -664,7 +665,7 @@ public class HeartbeatProcessor extends AbstractService{ } } - this.heartbeatMonitor.getAgentRequests() + heartbeatMonitor.getAgentRequests() .setExecutionDetailsRequest(hostname, componentName,
ambari git commit: Revert "AMBARI-16360. RM fails to start after adding services in Kerb'd cluster"
Repository: ambari Updated Branches: refs/heads/trunk a23fbd763 -> a4e72f648 Revert "AMBARI-16360. RM fails to start after adding services in Kerb'd cluster" This reverts commit f83e258dad0e5417d816f0d41d8189fedac1efe7. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a4e72f64 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a4e72f64 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a4e72f64 Branch: refs/heads/trunk Commit: a4e72f648357a58987fcfab1d078feb1e3558e3f Parents: a23fbd7 Author: Robert LevasAuthored: Wed May 11 12:47:41 2016 -0400 Committer: Robert Levas Committed: Wed May 11 12:47:41 2016 -0400 -- .../YARN/2.1.0.2.0/package/scripts/resourcemanager.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a4e72f64/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py index 2166202..7ca54cc 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py @@ -235,7 +235,10 @@ class ResourcemanagerDefault(Resourcemanager): ignored_dfs_dirs = HdfsResourceProvider.get_ignored_resources_list(params.hdfs_resource_ignore_file) if params.security_enabled: - Execute(format("{yarn_timelineservice_kinit_cmd}"), user=params.yarn_user) + Execute( +format("{rm_kinit_cmd}") +, user=params.yarn_user + ) for dir_path in dirs: self.wait_for_dfs_directory_created(dir_path, ignored_dfs_dirs)
ambari git commit: AMBARI-16451. Takeover script configs results in conflict message that look wrong (aonishuk via srimanth)
Repository: ambari Updated Branches: refs/heads/trunk 41aa24740 -> a23fbd763 AMBARI-16451. Takeover script configs results in conflict message that look wrong (aonishuk via srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a23fbd76 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a23fbd76 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a23fbd76 Branch: refs/heads/trunk Commit: a23fbd7639373fd1f2bfb5d643871a094e302329 Parents: 41aa247 Author: Srimanth GunturiAuthored: Wed May 11 09:43:32 2016 -0700 Committer: Srimanth Gunturi Committed: Wed May 11 09:43:32 2016 -0700 -- .../resources/scripts/takeover_config_merge.py | 79 +--- 1 file changed, 70 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a23fbd76/ambari-server/src/main/resources/scripts/takeover_config_merge.py -- diff --git a/ambari-server/src/main/resources/scripts/takeover_config_merge.py b/ambari-server/src/main/resources/scripts/takeover_config_merge.py index 1432e4b..f940f27 100644 --- a/ambari-server/src/main/resources/scripts/takeover_config_merge.py +++ b/ambari-server/src/main/resources/scripts/takeover_config_merge.py @@ -28,7 +28,6 @@ import base64 import time import xml import xml.etree.ElementTree as ET -import yaml import StringIO import ConfigParser @@ -42,20 +41,54 @@ Example: "c6401.ambari.apache.org/etc/hive/conf/log4j.properties" : "hive-log4j"} """ +LICENSE = """ + +# 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. + +""" + + class Parser: pass +class ShParser(Parser): + def read_data_to_map(self, path): +with open(path, 'r') as file: + file_content = file.read() +return {"content" : file_content}, None + class YamlParser(Parser): # Used Yaml parser to read data into a map def read_data_to_map(self, path): +try: + import yaml +except ImportError: + logger.error("Module PyYAML not installed. Please try to execute \"pip install pyyaml\" for installing PyYAML module.") + sys.exit(1) + configurations = {} with open(path, 'r') as file: try: for name, value in yaml.load(file).iteritems(): if name != None: configurations[name] = str(value) - except yaml.YAMLError: -logger.exception("Yaml parser error: ") -return None + except: +logger.error("Couldn't parse {0} file. Skipping ...".format(path)) +return None, None return configurations, None @@ -121,13 +154,20 @@ class ConfigMerge: OUTPUT_DIR = '/tmp' OUT_FILENAME = 'ambari_takeover_config_merge.out' JSON_FILENAME = 'ambari_takeover_config_merge.json' - PARSER_BY_EXTENSIONS = {'.xml' : XmlParser(), '.yaml' : YamlParser(), '.properties' : PropertiesParser()} - SUPPORTED_EXTENSIONS = ['.xml', '.yaml', '.properties'] + PARSER_BY_EXTENSIONS = {'.xml' : XmlParser(), '.yaml' : YamlParser(), '.properties' : PropertiesParser(), '.sh' : ShParser()} + SUPPORTED_EXTENSIONS = ['.xml', '.yaml', '.properties', '.sh'] + SUPPORTED_FILENAME_ENDINGS = {".sh" : "-env"} UNKNOWN_FILES_MAPPING_FILE = None SERVICE_TO_AMBARI_CONFIG_NAME = { -"storm.yaml": "storm-site" +"storm.yaml": "storm-site", +"runtime.properties" : "falcon-runtime", +"startup.properties" : "falcon-startup", +"flume-conf.properties" : "flume-conf", +"pig.properties" : "pig-properties" } + CONFIGS_WITH_CONTENT = ['pig-properties', '-log4j'] + NOT_MAPPED_FILES = ['log4j.properties'] @@ -144,7 +184,9 @@ class ConfigMerge: root, ext = os.path.splitext(file) if ext in extensions: file_path = os.path.join(dirName, file) - + if ext in ConfigMerge.SUPPORTED_FILENAME_ENDINGS and not ConfigMerge.SUPPORTED_FILENAME_ENDINGS[ext] in root: +logger.warn("File {0} is not configurable by Ambari. Skipping...".format(file_path)) +
[2/2] ambari git commit: AMBARI-16305. Lowercase log level filter and add zkHosts (oleewere)
AMBARI-16305. Lowercase log level filter and add zkHosts (oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/41aa2474 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/41aa2474 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/41aa2474 Branch: refs/heads/trunk Commit: 41aa24740e06accc9faf9a591ec09505106f4f1b Parents: 3861add Author: oleewereAuthored: Wed May 11 16:33:51 2016 +0200 Committer: oleewere Committed: Wed May 11 16:33:51 2016 +0200 -- .../common-services/LOGSEARCH/0.5.0/package/scripts/params.py | 2 +- .../LOGSEARCH/0.5.0/package/templates/logfeeder.properties.j2 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/41aa2474/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py index 183425a..8bc82e9 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py @@ -262,7 +262,7 @@ logfeeder_log4j_content = config['configurations']['logfeeder-log4j']['content'] logfeeder_checkpoint_folder = default('/configurations/logfeeder-env/logfeeder.checkpoint.folder', '/etc/ambari-logsearch-logfeeder/conf/checkpoints') -logfeeder_log_filter_enable = default('/configurations/logfeeder-properties/logfeeder.log.filter.enable', True) +logfeeder_log_filter_enable = str(default('/configurations/logfeeder-properties/logfeeder.log.filter.enable', True)).lower() logfeeder_solr_config_interval = default('/configurations/logfeeder-properties/logfeeder.solr.config.interval', 5) logfeeder_supported_services = ['accumulo', 'ambari', 'ams', 'atlas', 'falcon', 'hbase', 'hdfs', 'hive', 'kafka', http://git-wip-us.apache.org/repos/asf/ambari/blob/41aa2474/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logfeeder.properties.j2 -- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logfeeder.properties.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logfeeder.properties.j2 index bd93846..c6d73ea 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logfeeder.properties.j2 +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logfeeder.properties.j2 @@ -19,6 +19,7 @@ config.files={{logfeeder_config_files}} logfeeder.log.filter.enable={{logfeeder_log_filter_enable}} logfeeder.solr.config.interval={{logfeeder_solr_config_interval}} logfeeder.solr.core.history=history +logfeeder.solr.zkhosts={{zookeeper_quorum}}{{logsearch_solr_znode}} # Custom properties {% for key, value in logfeeder_custom_properties.items() %}
[1/2] ambari git commit: AMBARI-16381. Support LOGSEARCH starting HDP-2.2 (Miklos Gergely via oleewere)
Repository: ambari Updated Branches: refs/heads/trunk 84c3e7f06 -> 41aa24740 AMBARI-16381. Support LOGSEARCH starting HDP-2.2 (Miklos Gergely via oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3861add9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3861add9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3861add9 Branch: refs/heads/trunk Commit: 3861add9b8ceaceb94d019dfcf97db43da2567ac Parents: 84c3e7f Author: oleewereAuthored: Wed May 11 15:44:27 2016 +0200 Committer: oleewere Committed: Wed May 11 15:44:27 2016 +0200 -- .../server/controller/StackVersionResponse.java | 12 ++--- .../ambari/server/stack/ComponentModule.java| 56 +++- .../server/stack/ConfigurationDirectory.java| 4 +- .../ambari/server/stack/ConfigurationInfo.java | 8 +-- .../server/stack/ConfigurationModule.java | 18 +++ .../stack/QuickLinksConfigurationModule.java| 8 +-- .../ambari/server/stack/ServiceDirectory.java | 2 +- .../ambari/server/stack/ServiceModule.java | 23 +--- .../ambari/server/stack/StackDirectory.java | 4 +- .../ambari/server/stack/StackManager.java | 2 +- .../apache/ambari/server/stack/StackModule.java | 40 +++--- .../apache/ambari/server/stack/ThemeModule.java | 8 +-- .../apache/ambari/server/stack/Validable.java | 4 +- .../apache/ambari/server/state/ServiceInfo.java | 12 ++--- .../apache/ambari/server/state/StackInfo.java | 8 +-- .../server/state/stack/ConfigurationXml.java| 9 ++-- .../server/state/stack/RepositoryXml.java | 8 +-- .../server/state/stack/ServiceMetainfoXml.java | 8 +-- .../server/state/stack/StackMetainfoXml.java| 8 +-- .../HDP/2.2/services/LOGSEARCH/metainfo.xml | 26 + .../services/LOGSEARCH/role_command_order.json | 8 +++ .../stacks/HDP/2.2/services/stack_advisor.py| 27 +- .../HDP/2.3.ECS/services/HBASE/metainfo.xml | 6 --- .../HDP/2.3.ECS/services/YARN/metainfo.xml | 30 --- .../HDP/2.3/services/LOGSEARCH/metainfo.xml | 26 - .../services/LOGSEARCH/role_command_order.json | 8 --- .../stacks/HDP/2.3/services/stack_advisor.py| 27 +- .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 6 --- .../stacks/HDP/2.5/services/HIVE/metainfo.xml | 6 --- .../ambari/server/stack/ServiceModuleTest.java | 2 +- 30 files changed, 202 insertions(+), 212 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3861add9/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java index b14826a..53414e7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java @@ -76,7 +76,7 @@ public class StackVersionResponse implements Validable{ Map >> configTypes, File stackKerberosDescriptorFile, Collection serviceKerberosDescriptorFiles, - Set upgradePacks, boolean valid, Collection errorSet, String minJdk, String maxJdk) { + Set upgradePacks, boolean valid, Collection errorSet, String minJdk, String maxJdk) { setStackVersion(stackVersion); setMinUpgradeVersion(minUpgradeVersion); setActive(active); @@ -86,7 +86,7 @@ public class StackVersionResponse implements Validable{ setServiceKerberosDescriptorFiles(serviceKerberosDescriptorFiles); setUpgradePacks(upgradePacks); setValid(valid); -setErrors(errorSet); +addErrors(errorSet); setMinJdk(minJdk); setMaxJdk(maxJdk); } @@ -104,18 +104,18 @@ public class StackVersionResponse implements Validable{ private Set errorSet = new HashSet(); @Override - public void setErrors(String error) { + public void addError(String error) { errorSet.add(error); } @Override - public Collection getErrors() { + public Collection getErrors() { return errorSet; } @Override - public void setErrors(Collection error) { -this.errorSet.addAll(error); + public void addErrors(Collection errors) { +this.errorSet.addAll(errors); } public String getStackName() {
ambari git commit: AMBARI-16230. Sporadic errors when deploying the cluster (oleewere)
Repository: ambari Updated Branches: refs/heads/trunk 3d99b680c -> 84c3e7f06 AMBARI-16230. Sporadic errors when deploying the cluster (oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/84c3e7f0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/84c3e7f0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/84c3e7f0 Branch: refs/heads/trunk Commit: 84c3e7f06e1fb2e55d37f046ec584407c0b5c8eb Parents: 3d99b68 Author: oleewereAuthored: Wed May 11 11:48:06 2016 +0200 Committer: oleewere Committed: Wed May 11 14:42:45 2016 +0200 -- .../controller/internal/ServiceResourceProvider.java | 1 - .../org/apache/ambari/server/state/ServiceImpl.java | 3 +++ .../ambari/server/state/cluster/ClusterImpl.java | 15 +-- .../org/apache/ambari/server/events/EventsTest.java | 1 - .../org/apache/ambari/server/orm/OrmTestHelper.java | 2 -- .../server/state/alerts/AlertEventPublisherTest.java | 1 - .../server/state/alerts/InitialAlertEventTest.java | 1 - 7 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/84c3e7f0/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java index 47342f3..56196c1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java @@ -356,7 +356,6 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider s.setDesiredState(state); s.setDesiredStackVersion(cluster.getDesiredStackVersion()); s.persist(); - cluster.addService(s); // Initialize service widgets getManagementController().initializeWidgetsAndLayouts(cluster, s); } http://git-wip-us.apache.org/repos/asf/ambari/blob/84c3e7f0/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java index 487489b..c47bbbc 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java @@ -475,6 +475,7 @@ public class ServiceImpl implements Service { // publish the service installed event StackId stackId = cluster.getDesiredStackVersion(); + cluster.addService(this); ServiceInstalledEvent event = new ServiceInstalledEvent( getClusterId(), stackId.getStackName(), @@ -484,6 +485,8 @@ public class ServiceImpl implements Service { } else { saveIfPersisted(); } + } catch (AmbariException e) { +LOG.error("Adding service '{}' is failed before publishing service installed event.", getName(), e); } finally { readWriteLock.writeLock().unlock(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/84c3e7f0/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java index f38c25a..cd0812b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java @@ -172,7 +172,7 @@ public class ClusterImpl implements Cluster { private volatile boolean desiredStackVersionSet = true; - private volatile Map services = null; + private Map services = null; /** * [ Config Type -> [ Config Version Tag -> Config ] ] @@ -325,6 +325,8 @@ public class ClusterImpl implements Cluster { // Load any active stack upgrades. loadStackUpgrade(); +loadServices(); + // register to receive stuff eventPublisher.register(this); this.eventPublisher = eventPublisher; @@ -395,7 +397,6 @@ public class ClusterImpl implements Cluster { * We need this for live status checks. */ public void loadServiceHostComponents() { -
ambari git commit: AMBARI-16433. Tried to nav away during edit user, broken dialog (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 50c3d816a -> 3d99b680c AMBARI-16433. Tried to nav away during edit user, broken dialog (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d99b680 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d99b680 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d99b680 Branch: refs/heads/trunk Commit: 3d99b680c438b6bbbe0b7a36c47fda3c367358ef Parents: 50c3d81 Author: Alex AntonenkoAuthored: Wed May 11 13:54:24 2016 +0300 Committer: Alex Antonenko Committed: Wed May 11 15:14:00 2016 +0300 -- .../src/main/resources/ui/admin-web/app/scripts/i18n.config.js| 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d99b680/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js index c74ed77..6acf6c5 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js @@ -145,7 +145,8 @@ angular.module('ambariAdminConsole') 'tooLong': 'Too long', 'onlyText': 'Only lowercase alphanumeric characters are allowed.', 'onlyAnScore': 'Invalid input, only alphanumerics allowed eg: My_default_view', -'passwordRequired':'Password Required' +'passwordRequired':'Password Required', +'unsavedChanges': 'You have unsaved changes. Save changes or discard?' } },
ambari git commit: AMBARI-16287 BGOperations is taking very long time to finish. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 9207fa3c4 -> 50c3d816a AMBARI-16287 BGOperations is taking very long time to finish. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/50c3d816 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/50c3d816 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/50c3d816 Branch: refs/heads/trunk Commit: 50c3d816af1eedc71379c35ed157739e2439b9eb Parents: 9207fa3 Author: Andrii TkachAuthored: Wed May 11 11:11:22 2016 +0300 Committer: Andrii Tkach Committed: Wed May 11 13:45:32 2016 +0300 -- ambari-web/app/styles/application.less | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/50c3d816/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 0abfc7d..6d9ed46 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -1873,6 +1873,7 @@ a:focus { line-height: 14px; font-size: 11px; font-family: monospace; +word-break: normal; } }
ambari git commit: AMBARI-16420. LogFeeder not using fully qualified domain name (Bosco Durai via oleewere)
Repository: ambari Updated Branches: refs/heads/trunk c150f0ded -> 9207fa3c4 AMBARI-16420. LogFeeder not using fully qualified domain name (Bosco Durai via oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9207fa3c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9207fa3c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9207fa3c Branch: refs/heads/trunk Commit: 9207fa3c45b923bfc6b796ba358af1de54b22685 Parents: c150f0d Author: oleewereAuthored: Wed May 11 11:39:44 2016 +0200 Committer: oleewere Committed: Wed May 11 11:40:22 2016 +0200 -- .../main/java/org/apache/ambari/logfeeder/OutputMgr.java | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9207fa3c/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/OutputMgr.java -- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/OutputMgr.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/OutputMgr.java index 5b70bca..8413878 100644 --- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/OutputMgr.java +++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/OutputMgr.java @@ -53,7 +53,16 @@ public class OutputMgr { try { InetAddress ip = InetAddress.getLocalHost(); ipAddress = ip.getHostAddress(); - hostName = ip.getHostName(); + String getHostName = ip.getHostName(); + String getCanonicalHostName = ip.getCanonicalHostName(); + if (!getCanonicalHostName.equalsIgnoreCase(ipAddress)) { +logger.info("Using getCanonicalHostName()=" + getCanonicalHostName); +hostName = getCanonicalHostName; + } else { +logger.info("Using getHostName()=" + getHostName); +hostName = getHostName; + } + logger.info("ipAddress=" + ipAddress + ", getHostName=" + getHostName + ", getCanonicalHostName=" + getCanonicalHostName + ", hostName=" + hostName); } catch (UnknownHostException e) { logger.error("Error getting hostname.", e); }
[2/4] ambari git commit: AMBARI-16274. Views: Simplify View Configuration for Remote Ambari Managed Cluster. (Gaurav Nagar via dipayanb)
http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java b/ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java index bb6a93c..f63c962 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java @@ -123,6 +123,12 @@ public class ViewConfig { private String dataVersion; /** + * Enable views to display cluster options in case of no cluster config properties. + */ + @XmlElement(name="cluster-config-options") + private String clusterConfigOptions; + + /** * The view class. */ private Class dataMigratorClass = null; @@ -450,4 +456,13 @@ public class ViewConfig { public List getPermissions() { return permissions == null ? Collections.emptyList() : permissions; } + + /** + * Enables views to display cluster options in case of no cluster config properties + * + * @return clusterConfigOptions + */ + public String getClusterConfigOptions() { +return clusterConfigOptions; + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql index 415e06b..d77a0b3 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql @@ -567,6 +567,7 @@ CREATE TABLE viewinstance ( xml_driven CHAR(1), alter_names SMALLINT NOT NULL DEFAULT 1, cluster_handle VARCHAR(255), + cluster_type VARCHAR(100) NOT NULL DEFAULT 'LOCAL_AMBARI', short_url BIGINT, CONSTRAINT PK_viewinstance PRIMARY KEY (view_instance_id), CONSTRAINT FK_instance_url_id FOREIGN KEY (short_url) REFERENCES viewurl(url_id), @@ -601,7 +602,7 @@ CREATE TABLE viewparameter ( label VARCHAR(255), placeholder VARCHAR(255), default_value VARCHAR(2000), - cluster_config VARCHAR(255), + cluster_config VARCHAR(255) , required CHAR(1), masked CHAR(1), CONSTRAINT PK_viewparameter PRIMARY KEY (view_name, name), @@ -778,6 +779,26 @@ CREATE TABLE setting ( CONSTRAINT PK_setting PRIMARY KEY (id) ); +-- Remote Cluster table + +CREATE TABLE remoteambaricluster( + cluster_id BIGINT NOT NULL, + name VARCHAR(255) NOT NULL, + username VARCHAR(255) NOT NULL, + url VARCHAR(255) NOT NULL, + password VARCHAR(255) NOT NULL, + CONSTRAINT PK_remote_ambari_cluster PRIMARY KEY (cluster_id), + CONSTRAINT unq_remote_ambari_cluster UNIQUE (name)); + +CREATE TABLE remoteambariclusterservice( + id BIGINT NOT NULL, + cluster_id BIGINT NOT NULL, + service_name VARCHAR(255) NOT NULL, + CONSTRAINT PK_remote_ambari_service PRIMARY KEY (id), + CONSTRAINT FK_remote_ambari_cluster_id FOREIGN KEY (cluster_id) REFERENCES remoteambaricluster(cluster_id) +); + +-- Remote Cluster table ends -- upgrade tables CREATE TABLE upgrade ( @@ -1094,7 +1115,11 @@ INSERT INTO ambari_sequences (sequence_name, sequence_value) union all select 'blueprint_setting_id_seq', 0 FROM SYSIBM.SYSDUMMY1 union all - select 'ambari_operation_history_id_seq', 0 FROM SYSIBM.SYSDUMMY1; + select 'ambari_operation_history_id_seq', 0 FROM SYSIBM.SYSDUMMY1 + union all + select 'remote_cluster_id_seq', 0 FROM SYSIBM.SYSDUMMY1 + union all + select 'remote_cluster_service_id_seq', 0 FROM SYSIBM.SYSDUMMY1; INSERT INTO adminresourcetype (resource_type_id, resource_type_name) http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql index e3ce816..22413e0 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql @@ -575,6 +575,7 @@ CREATE TABLE viewinstance ( xml_driven CHAR(1), alter_names TINYINT(1) NOT NULL DEFAULT 1, cluster_handle VARCHAR(255), + cluster_type VARCHAR(100) NOT NULL DEFAULT 'LOCAL_AMBARI', short_url BIGINT, CONSTRAINT PK_viewinstance PRIMARY KEY (view_instance_id), CONSTRAINT FK_instance_url_id FOREIGN KEY (short_url) REFERENCES viewurl(url_id), @@ -785,6 +786,26 @@ CREATE TABLE setting ( CONSTRAINT PK_setting PRIMARY KEY (id) ); +-- Remote Cluster table + +CREATE TABLE remoteambaricluster( + cluster_id BIGINT NOT NULL, + name VARCHAR(255) NOT
[3/4] ambari git commit: AMBARI-16274. Views: Simplify View Configuration for Remote Ambari Managed Cluster. (Gaurav Nagar via dipayanb)
http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/modals/changePassword.html -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/modals/changePassword.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/modals/changePassword.html new file mode 100644 index 000..a05e13d --- /dev/null +++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/modals/changePassword.html @@ -0,0 +1,46 @@ + + + {{'users.updateCredentials' | translate}} + + + + + + {{'users.roles.clusterUser' | translate}} + + +{{'users.alerts.usernameRequired' | translate}} + + + + + {{'users.password' | translate}} + + +{{'users.alerts.passwordRequired' | translate}} +{{'users.alerts.wrongPassword' | translate}} + + + + + + + {{'common.controls.cancel' | translate}} + {{'common.controls.ok' | translate}} + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/remoteClusterPage.html -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/remoteClusterPage.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/remoteClusterPage.html new file mode 100644 index 000..0f82360 --- /dev/null +++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/remoteClusterPage.html @@ -0,0 +1,66 @@ + + + {{'common.remoteClusters' | translate}} + {{'common.register' | translate}} + + + + + +{{'views.clusterName' | translate}} + + + {{'common.alerts.fieldIsRequired' | translate}} + {{'views.alerts.noSpecialChars' | translate}} + + + + +{{'users.ambariClusterURL' | translate}} + + http://ambari.server:8080/api/v1/clusters/c1; ng-model="cluster.cluster_url" required autocomplete="off"> + {{'common.alerts.fieldIsRequired' | translate}} + + + + + {{'users.roles.clusterUser' | translate}} + + + {{'common.alerts.fieldIsRequired' | translate}} + + + + +{{'users.password' | translate}} + + + Wrong Password + {{'common.alerts.passwordRequired' | translate}} + + + + + + {{'common.controls.save' | translate}} + {{'common.controls.cancel' | translate}} + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RemoteClusterResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RemoteClusterResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RemoteClusterResourceDefinition.java new file mode 100644 index 000..b656a30 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RemoteClusterResourceDefinition.java @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.api.resources; + +import org.apache.ambari.server.controller.spi.Resource; + + +/** + * Remote Cluster resource definition. + */ +public class RemoteClusterResourceDefinition extends BaseResourceDefinition { + + // - Constructors -- + + /** + * Construct a view resource definition. + */ + public RemoteClusterResourceDefinition() { +super(Resource.Type.RemoteCluster); + } + + + // - ResourceDefinition + + @Override + public String getPluralName() { +return "remote_clusters"; + } + + @Override + public String getSingularName() { +return "remote_cluster"; + } + +}
[1/4] ambari git commit: AMBARI-16274. Views: Simplify View Configuration for Remote Ambari Managed Cluster. (Gaurav Nagar via dipayanb)
Repository: ambari Updated Branches: refs/heads/trunk bc82a6eca -> c150f0ded http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/AuthConfigurationBuilder.java -- diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/AuthConfigurationBuilder.java b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/AuthConfigurationBuilder.java index c8ca6cd..4911455 100644 --- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/AuthConfigurationBuilder.java +++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/AuthConfigurationBuilder.java @@ -54,13 +54,11 @@ public class AuthConfigurationBuilder { String auth; auth = context.getProperties().get("webhdfs.auth"); -if (auth == null || auth.isEmpty()) { - try { -auth = getConfigurationFromAmbari(); - } catch (NoClusterAssociatedException e) { -auth = "auth=SIMPLE"; -LOG.warn(String.format("HDFS090 Authentication parameters could not be determined. %s assumed.", auth)); - } +if ((auth == null || auth.isEmpty()) && context.getCluster() != null) { + auth = getConfigurationFromAmbari(); +} else { + auth = "auth=SIMPLE"; + LOG.warn(String.format("HDFS090 Authentication parameters could not be determined. %s assumed.", auth)); } parseAuthString(auth); @@ -81,7 +79,7 @@ public class AuthConfigurationBuilder { * Determine configuration from Ambari. */ private String getConfigurationFromAmbari() throws NoClusterAssociatedException { -String authMethod = ambariApi.getCluster().getConfigurationValue( +String authMethod = context.getCluster().getConfigurationValue( "core-site", "hadoop.security.authentication"); return String.format("auth=%s", authMethod); } http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java -- diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java index 4518ac6..8b45cd6 100644 --- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java +++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java @@ -121,9 +121,10 @@ public class ConfigurationBuilder { private String getProperty(String type, String key, String instanceProperty) { String value; -try { - value = ambariApi.getCluster().getConfigurationValue(type, key); -} catch (NoClusterAssociatedException e) { + +if(context.getCluster() != null) { + value = context.getCluster().getConfigurationValue(type, key); +} else { value = context.getProperties().get(instanceProperty); } return value; @@ -131,15 +132,16 @@ public class ConfigurationBuilder { private void copyPropertyIfExists(String type, String key) { String value; -try { - value = ambariApi.getCluster().getConfigurationValue(type, key); + +if(context.getCluster() != null) { + value = context.getCluster().getConfigurationValue(type, key); if (value != null) { conf.set(key, value); LOG.debug("set " + key + " = " + value); } else { LOG.debug("No such property " + type + "/" + key); } -} catch (NoClusterAssociatedException e) { +} else { LOG.debug("No such property " + type + "/" + key); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/c150f0de/contrib/views/utils/src/test/java/org/apache/ambari/view/utils/ambari/RemoteClusterTest.java -- diff --git a/contrib/views/utils/src/test/java/org/apache/ambari/view/utils/ambari/RemoteClusterTest.java b/contrib/views/utils/src/test/java/org/apache/ambari/view/utils/ambari/RemoteClusterTest.java deleted file mode 100644 index ec4df7d..000 --- a/contrib/views/utils/src/test/java/org/apache/ambari/view/utils/ambari/RemoteClusterTest.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under
[4/4] ambari git commit: AMBARI-16274. Views: Simplify View Configuration for Remote Ambari Managed Cluster. (Gaurav Nagar via dipayanb)
AMBARI-16274. Views: Simplify View Configuration for Remote Ambari Managed Cluster. (Gaurav Nagar via dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c150f0de Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c150f0de Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c150f0de Branch: refs/heads/trunk Commit: c150f0ded83c0a2f4eac1d5bf12a0fbb643c9610 Parents: bc82a6e Author: Dipayan BhowmickAuthored: Wed May 11 14:22:34 2016 +0530 Committer: Dipayan Bhowmick Committed: Wed May 11 14:22:34 2016 +0530 -- .../main/resources/ui/admin-web/app/index.html | 280 .../ambariViews/CreateViewInstanceCtrl.js | 70 +++- .../controllers/ambariViews/ViewsEditCtrl.js| 86 +++-- .../remoteClusters/RemoteClustersCreateCtrl.js | 63 .../remoteClusters/RemoteClustersEditCtrl.js| 159 + .../remoteClusters/RemoteClustersListCtrl.js| 106 ++ .../ui/admin-web/app/scripts/i18n.config.js | 20 +- .../ui/admin-web/app/scripts/routes.js | 17 + .../app/scripts/services/RemoteCluster.js | 118 +++ .../ui/admin-web/app/scripts/services/View.js | 3 +- .../resources/ui/admin-web/app/styles/main.css | 25 ++ .../admin-web/app/views/ambariViews/create.html | 38 ++- .../admin-web/app/views/ambariViews/edit.html | 50 ++- .../ui/admin-web/app/views/leftNavbar.html | 13 +- .../remoteClusters/editRemoteClusterPage.html | 77 + .../app/views/remoteClusters/list.html | 80 + .../remoteClusters/modals/changePassword.html | 46 +++ .../views/remoteClusters/remoteClusterPage.html | 66 .../RemoteClusterResourceDefinition.java| 51 +++ .../resources/ResourceInstanceFactoryImpl.java | 4 + .../api/services/RemoteClustersService.java | 139 .../internal/DefaultProviderModule.java | 2 + .../internal/RemoteClusterResourceProvider.java | 327 +++ .../internal/ViewInstanceResourceProvider.java | 9 + .../ambari/server/controller/spi/Resource.java | 4 +- .../server/orm/dao/RemoteAmbariClusterDAO.java | 101 ++ .../orm/entities/RemoteAmbariClusterEntity.java | 201 .../RemoteAmbariClusterServiceEntity.java | 108 ++ .../ambari/server/orm/entities/ViewEntity.java | 9 + .../server/orm/entities/ViewInstanceEntity.java | 29 ++ .../server/upgrade/UpgradeCatalog240.java | 37 +++ .../ambari/server/view/RemoteAmbariCluster.java | 190 +++ .../view/RemoteAmbariClusterRegistry.java | 116 +++ .../RemoteAmbariConfigurationReadException.java | 29 ++ .../server/view/RemoteAmbariStreamProvider.java | 118 +++ .../server/view/ViewAmbariStreamProvider.java | 51 +-- .../ambari/server/view/ViewContextImpl.java | 23 +- .../apache/ambari/server/view/ViewRegistry.java | 50 ++- .../server/view/configuration/ViewConfig.java | 15 + .../main/resources/Ambari-DDL-Derby-CREATE.sql | 29 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 25 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 23 ++ .../resources/Ambari-DDL-Postgres-CREATE.sql| 25 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 29 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 23 ++ .../resources/Ambari-DDL-SQLServer-CREATE.sql | 25 +- .../src/main/resources/META-INF/persistence.xml | 2 + .../RemoteClusterResourceProviderTest.java | 193 +++ .../server/upgrade/UpgradeCatalog240Test.java | 30 ++ .../server/view/RemoteAmbariClusterTest.java| 90 + .../view/ViewAmbariStreamProviderTest.java | 8 +- .../view/configuration/ViewConfigTest.java | 7 + .../view/AmbariClusterStreamProvider.java | 90 + .../apache/ambari/view/AmbariHttpException.java | 41 +++ .../ambari/view/AmbariStreamProvider.java | 6 +- .../org/apache/ambari/view/ClusterType.java | 40 +++ .../org/apache/ambari/view/ViewContext.java | 8 + .../ambari/view/ViewInstanceDefinition.java | 8 + ambari-views/src/main/resources/view.xsd| 5 + .../capacityscheduler/ConfigurationService.java | 43 +-- .../src/main/resources/view.xml | 25 +- .../ConfigurationServiceTest.java | 5 - .../hive/resources/uploads/UploadService.java | 2 +- .../view/slider/rest/client/BaseHttpClient.java | 28 +- .../ambari/view/utils/ambari/AmbariApi.java | 177 ++ .../ambari/view/utils/ambari/RemoteCluster.java | 104 -- .../ambari/view/utils/ambari/Services.java | 8 +- .../ambari/URLStreamProviderBasicAuth.java | 122 --- .../utils/hdfs/AuthConfigurationBuilder.java| 14 +- .../view/utils/hdfs/ConfigurationBuilder.java | 14 +- .../view/utils/ambari/RemoteClusterTest.java| 137
ambari git commit: AMBARI-16432. Give user visual feedback while we do background request and next button is disabled (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk 58badf8d6 -> bc82a6eca AMBARI-16432. Give user visual feedback while we do background request and next button is disabled (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bc82a6ec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bc82a6ec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bc82a6ec Branch: refs/heads/trunk Commit: bc82a6eca1ea9062d184add0d3acd099c6893434 Parents: 58badf8 Author: Oleg NechiporenkoAuthored: Tue May 10 17:19:34 2016 +0300 Committer: Oleg Nechiporenko Committed: Wed May 11 11:13:20 2016 +0300 -- .../app/controllers/wizard/step4_controller.js | 26 .../app/controllers/wizard/step6_controller.js | 29 + .../app/controllers/wizard/step7_controller.js | 68 ++-- ambari-web/app/routes/add_host_routes.js| 3 + ambari-web/app/routes/add_service_routes.js | 3 +- .../app/routes/high_availability_routes.js | 21 +++--- ambari-web/app/routes/installer.js | 8 ++- .../common/assign_master_components.hbs | 11 ++-- .../admin/highAvailability/nameNode/step3.hbs | 3 + ambari-web/app/templates/wizard/step6.hbs | 3 + ambari-web/app/templates/wizard/step7.hbs | 3 + ambari-web/app/views/common/global/spinner.js | 6 +- ambari-web/test/controllers/installer_test.js | 12 .../kerberos/kerberos_wizard_controler_test.js | 4 +- .../admin/kerberos/step1_controller_test.js | 1 - .../admin/kerberos/step2_controller_test.js | 12 ++-- .../service/reassign/step4_controller_test.js | 2 +- .../views/main/service/services/hive_test.js| 5 -- 18 files changed, 109 insertions(+), 111 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bc82a6ec/ambari-web/app/controllers/wizard/step4_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step4_controller.js b/ambari-web/app/controllers/wizard/step4_controller.js index 56bf435..0575f07 100644 --- a/ambari-web/app/controllers/wizard/step4_controller.js +++ b/ambari-web/app/controllers/wizard/step4_controller.js @@ -17,7 +17,6 @@ */ var App = require('app'); -var stringUtils = require('utils/string_utils'); App.WizardStep4Controller = Em.ArrayController.extend({ @@ -37,11 +36,10 @@ App.WizardStep4Controller = Em.ArrayController.extend({ if (arguments.length > 1) { this.filterProperty('isInstalled', false).setEach('isSelected', value); return value; -} else { - return this.filterProperty('isInstalled', false). -filterProperty('isHiddenOnSelectServicePage', false). -everyProperty('isSelected', true); } +return this.filterProperty('isInstalled', false). + filterProperty('isHiddenOnSelectServicePage', false). + everyProperty('isSelected', true); }.property('@each.isSelected'), /** @@ -75,8 +73,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({ * @method multipleDFSs */ multipleDFSs: function () { -var dfsServices = this.filterProperty('isDFS',true).filterProperty('isSelected',true); - return dfsServices.length > 1; +return this.filterProperty('isDFS',true).filterProperty('isSelected',true).length > 1; }, /** @@ -114,7 +111,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({ sparkValidation: function (callback) { var sparkService = this.findProperty('serviceName', 'SPARK'); if (sparkService && !sparkService.get('isInstalled') && - App.get('currentStackName') == 'HDP' && App.get('currentStackVersionNumber') == '2.2') { + App.get('currentStackName') === 'HDP' && App.get('currentStackVersionNumber') === '2.2') { if(sparkService.get('isSelected')) { this.addValidationError({ id: 'sparkWarning', @@ -147,7 +144,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({ this.unSelectServices(); this.setGroupedServices(); if (this.validate()) { -App.router.nextBtnClickInProgress = true; +App.set('router.nextBtnClickInProgress', true); this.set('errorStack', []); App.router.send('next'); } @@ -189,7 +186,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({ this.rangerValidation(callback); this.sparkValidation(callback); if (!!this.get('errorStack').filterProperty('isShown', false).length) { - var firstError = this.get('errorStack').findProperty('isShown', false); + var firstError = this.get('errorStack').findProperty('isShown', false); this.showError(firstError); result = false; } else { @@ -237,9 +234,8 @@
ambari git commit: AMBARI-16271. Increase retry count for ranger functions.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 19aaa641c -> 58badf8d6 AMBARI-16271. Increase retry count for ranger functions.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/58badf8d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/58badf8d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/58badf8d Branch: refs/heads/trunk Commit: 58badf8d6a0d86d32cbd17a4e3fdc68c4afe90aa Parents: 19aaa64 Author: Vitaly BrodetskyiAuthored: Wed May 11 08:45:46 2016 +0300 Committer: Vitaly Brodetskyi Committed: Wed May 11 08:45:46 2016 +0300 -- .../resource_management/libraries/functions/ranger_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/58badf8d/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py index 40f75f7..48ae225 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py @@ -222,7 +222,7 @@ class Rangeradmin: except TimeoutError: raise Fail("Connection to Ranger Admin failed. Reason - timeout") - @safe_retry(times=5, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=None) + @safe_retry(times=75, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=None) def get_policy_by_repo_name(self, name, component, status, usernamepassword): """ :param name: repository name @@ -255,7 +255,7 @@ class Rangeradmin: except TimeoutError: raise Fail("Connection to Ranger Admin failed. Reason - timeout") - @safe_retry(times=5, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=None) + @safe_retry(times=75, sleep_time=8, backoff_factor=1.5, err_class=Fail, return_on_fail=None) def update_ranger_policy(self, policyId, data, usernamepassword): """ :param policyId: policy id which needs to be updated