Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E885510C44 for ; Sun, 26 Jan 2014 02:03:58 +0000 (UTC) Received: (qmail 65837 invoked by uid 500); 26 Jan 2014 02:03:58 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 65771 invoked by uid 500); 26 Jan 2014 02:03:58 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 65760 invoked by uid 99); 26 Jan 2014 02:03:58 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jan 2014 02:03:58 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id A03601D462B; Sun, 26 Jan 2014 02:03:56 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5934364923216201019==" MIME-Version: 1.0 Subject: Re: Review Request 17334: Add Passive state for Service, Host, HostComponent From: "Sumit Mohanty" To: "Sumit Mohanty" , "Sid Wagle" Cc: "Nate Cole" , "Ambari" Date: Sun, 26 Jan 2014 02:03:56 -0000 Message-ID: <20140126020356.19581.66424@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Sumit Mohanty" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/17334/ X-Sender: "Sumit Mohanty" References: <20140124224216.19581.97387@reviews.apache.org> In-Reply-To: <20140124224216.19581.97387@reviews.apache.org> Reply-To: "Sumit Mohanty" X-ReviewRequest-Repository: ambari --===============5934364923216201019== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/17334/#review32791 ----------------------------------------------------------- ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java * I think we should throw error on an attempt to set PassiveState.IMPLIED. Currently, the call will not throw an error if the existing state is PassiveState.IMPLIED. Essentially, trying to set anything but ACTIVE/PASSIVE is an error. What happens on upgrade - do we fill in PASSIVE for all or leave the column empty? When a Service/Host/HostComponent is created (for a new cluster) do we set the initial value to be empty or PassiveState.PASSIVE? Should values of passive_state be PASSIVE, IMPLIED_PASSIVE, ACTIVE? I was wondering if IMPLIED can be understood as IMPLIED_ACTIVE. We may also need to block CUSTOM_COMMANDs and ACTIONS when target resource is PASSIVE. Feel free to open a JIRA against me as I need to make changes related DECOMMISSION and setting passive state when being decommissioned. ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java * Not sure, why we need a passivity-map here? AFAIK, a host can only belong to a single cluster. - Sumit Mohanty On Jan. 24, 2014, 10:42 p.m., Nate Cole wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/17334/ > ----------------------------------------------------------- > > (Updated Jan. 24, 2014, 10:42 p.m.) > > > Review request for Ambari, Sumit Mohanty and Sid Wagle. > > > Bugs: AMBARI-4419 > https://issues.apache.org/jira/browse/AMBARI-4419 > > > Repository: ambari > > > Description > ------- > > Add ability set a new state on Service, Host, HostComponent - a Passive State. > Passive State is used to maintain control of a unit in Ambari, but skip operations that include an item. Examples: > If a Service is Passive, a call to restart all Services should skip a passive one. > However, said Service can be acted upon, if it is a direct target. > A restart of a Service will ignore Hosts that are Passive. > A restart of a Service will ignore HostComponents that are Passive. > Rolling restarts do not affect items that are marked Passive > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java 26a02a4 > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java a9b6364 > ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java 12dd0f6 > ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java 616a1ea > ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java 6b673b0 > ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java a776ac2 > ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java 03ea6a9 > ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java 82b61e8 > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java dbc81a2 > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java 1759826 > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java 6387255 > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java 7f04c51 > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostStateEntity.java 35b9a4d > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java 1af9406 > ambari-server/src/main/java/org/apache/ambari/server/state/Host.java 832de26 > ambari-server/src/main/java/org/apache/ambari/server/state/PassiveState.java PRE-CREATION > ambari-server/src/main/java/org/apache/ambari/server/state/Service.java 5fe2d71 > ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 4ce632a > ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 0e978ea > ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java f8bf36e > ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java d9135c0 > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 4f6068e > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b2c255e > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql f15ccd1 > ambari-server/src/main/resources/Ambari-DDL-Postgres-REMOTE-CREATE.sql 0586ba3 > ambari-server/src/main/resources/properties.json 1e555c2 > ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-MySQL-UPGRADE.sql 702a8d4 > ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Oracle-UPGRADE.sql 4edd1a2 > ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql ae2e02f > ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java bc2039e > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java 9bf0c94 > ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java f9658fa > ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java 272a448 > ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java da3e3e1 > > Diff: https://reviews.apache.org/r/17334/diff/ > > > Testing > ------- > > Change tests: > org.apache.ambari.server.controller.AmbariManagementControllerTest > org.apache.ambari.server.controller.internal.HostResourceProviderTest > org.apache.ambari.server.state.ServiceTest > org.apache.ambari.server.state.host.HostTest > org.apache.ambari.server.state.svccomphost.ServiceComponentHostTest > > All tests > --------- > Results : > > Tests run: 1287, Failures: 0, Errors: 0, Skipped: 7 > > [INFO] > > > Thanks, > > Nate Cole > > --===============5934364923216201019==--