Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CABA1963B for ; Tue, 29 Mar 2016 18:37:09 +0000 (UTC) Received: (qmail 70309 invoked by uid 500); 29 Mar 2016 18:37:09 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 70281 invoked by uid 500); 29 Mar 2016 18:37:09 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 70267 invoked by uid 99); 29 Mar 2016 18:37:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2016 18:37:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DC8B8DFC8E; Tue, 29 Mar 2016 18:37:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rzang@apache.org To: commits@ambari.apache.org Message-Id: <571c34be85234220a68ac6b0e9fefe2c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-15611. Moving masters causes services to be shut down unnecessarily, causing downtime that's avoidable (rzang) Date: Tue, 29 Mar 2016 18:37:08 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk a672d4028 -> 0808f2cb5 AMBARI-15611. Moving masters causes services to be shut down unnecessarily, causing downtime that's avoidable (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0808f2cb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0808f2cb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0808f2cb Branch: refs/heads/trunk Commit: 0808f2cb5bac1862fd1d8aea37f9edfc195a40eb Parents: a672d40 Author: Richard Zang Authored: Tue Mar 29 11:36:12 2016 -0700 Committer: Richard Zang Committed: Tue Mar 29 11:36:12 2016 -0700 ---------------------------------------------------------------------- .../main/service/reassign/step4_controller.js | 28 ++++++++++---------- .../service/reassign/step4_controller_test.js | 4 +-- 2 files changed, 16 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0808f2cb/ambari-web/app/controllers/main/service/reassign/step4_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js index 1d28834..f27b4f5 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -75,18 +75,18 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro componentsWithoutReconfiguration: ['METRICS_COLLECTOR'], /** - * Map with lists of unrelated services. + * Map with lists of related services. * Used to define list of services to stop/start. */ - unrelatedServicesMap: { - 'JOBTRACKER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'], - 'RESOURCEMANAGER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'], - 'APP_TIMELINE_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'], - 'OOZIE_SERVER': ['ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM', 'HIVE'], - 'WEBHCAT_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'], - 'HIVE_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'], - 'HIVE_METASTORE': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'], - 'MYSQL_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'] + relatedServicesMap: { + 'JOBTRACKER': ['PIG', 'OOZIE'], + 'RESOURCEMANAGER': ['YARN', 'MAPREDUCE2', 'TEZ', 'PIG', 'OOZIE', 'SLIDER', 'SPARK'], + 'APP_TIMELINE_SERVER': ['YARN', 'MAPREDUCE2', 'TEZ', 'OOZIE', 'SLIDER', 'SPARK'], + 'HIVE_SERVER': ['HIVE', 'FALCON', 'ATLAS', 'OOZIE'], + 'HIVE_METASTORE': ['HIVE', 'PIG', 'FALCON', 'ATLAS', 'OOZIE'], + 'WEBHCAT_SERVER': ['HIVE'], + 'OOZIE_SERVER': ['OOZIE', 'FALCON', 'KNOX'], + 'MYSQL_SERVER': ['HIVE', 'OOZIE', 'RANGER', 'RANGER_KMS'] }, dbPropertyMap: { @@ -470,7 +470,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro * make server call to stop services */ stopRequiredServices: function () { - this.stopServices(this.get('unrelatedServicesMap')[this.get('content.reassign.component_name')]); + this.stopServices(this.get('relatedServicesMap')[this.get('content.reassign.component_name')], true); }, createHostComponents: function () { @@ -914,9 +914,9 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro * make server call to start services */ startRequiredServices: function () { - var unrelatedServices = this.get('unrelatedServicesMap')[this.get('content.reassign.component_name')]; - if (unrelatedServices) { - this.startServices(false, unrelatedServices); + var relatedServices = this.get('relatedServicesMap')[this.get('content.reassign.component_name')]; + if (relatedServices) { + this.startServices(false, relatedServices, true); } else { this.startServices(true); } http://git-wip-us.apache.org/repos/asf/ambari/blob/0808f2cb/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js index 4406bb0..cccd7d1 100644 --- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js +++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js @@ -320,7 +320,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () { it('stopServices is called with valid list of services', function() { controller.set('content.reassign.component_name', 'JOBTRACKER'); controller.stopRequiredServices(); - expect(controller.stopServices.calledWith(['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'])).to.be.true; + expect(controller.stopServices.calledWith(['PIG', 'OOZIE'], true)).to.be.true; }); }); @@ -1215,7 +1215,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () { it("component has related services", function() { controller.set('content.reassign.component_name', 'JOBTRACKER'); controller.startRequiredServices(); - expect(controller.startServices.calledWith(false, ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'])).to.be.true; + expect(controller.startServices.calledWith(false, ['PIG', 'OOZIE'], true)).to.be.true; }); it("component does not have related services", function() { controller.set('content.reassign.component_name', 'C1');