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 8E27E18D61 for ; Tue, 27 Oct 2015 06:39:58 +0000 (UTC) Received: (qmail 29484 invoked by uid 500); 27 Oct 2015 06:39:58 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 29441 invoked by uid 500); 27 Oct 2015 06:39: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 29426 invoked by uid 99); 27 Oct 2015 06:39:57 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Oct 2015 06:39:57 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 657E628E41E; Tue, 27 Oct 2015 06:39:57 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6889005243199911562==" MIME-Version: 1.0 Subject: Re: Review Request 39619: AMBARI-13556. Stop-and-Start Upgrade: API to show available Upgrade options from Current stack to Desired stack. From: "Alejandro Fernandez" To: "Alejandro Fernandez" , "Nate Cole" , "Jonathan Hurley" Cc: "Swapan Shridhar" , "Ambari" Date: Tue, 27 Oct 2015 06:39:57 -0000 Message-ID: <20151027063957.22462.33505@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Alejandro Fernandez" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/39619/ X-Sender: "Alejandro Fernandez" References: <20151027010324.22462.60340@reviews.apache.org> In-Reply-To: <20151027010324.22462.60340@reviews.apache.org> Reply-To: "Alejandro Fernandez" X-ReviewRequest-Repository: ambari --===============6889005243199911562== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39619/#review104143 ----------------------------------------------------------- ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProvider.java (line 122) Let's remove this debug statement. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProvider.java (line 125) We can make a stronger assertion that repositoryVersionEntity.getId() will always be unique, since today the version is only unique due to business logic. Let's add that to the key instead. - Alejandro Fernandez On Oct. 27, 2015, 1:03 a.m., Swapan Shridhar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39619/ > ----------------------------------------------------------- > > (Updated Oct. 27, 2015, 1:03 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole. > > > Bugs: AMBARI-13556 > https://issues.apache.org/jira/browse/AMBARI-13556 > > > Repository: ambari > > > Description > ------- > > AMBARI-13556. Stop-and-Start Upgrade: API to show available Upgrade options from Current stack to Desired stack. > > Description: > =========== > For most cases, UI will allow both RU and EU. > However, for HDP 2.1->2.3, only EU is supported, this means we cannot show the button for RU. Hence, the UI has to either remove/disable the RU option. > > With this change, UI will be able to remove/disable the upgdrade option(s) based on the "upgrade type" supported. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersion.java PRE-CREATION > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProvider.java 2a1092b > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java ab06a5c > > Diff: https://reviews.apache.org/r/39619/diff/ > > > Testing > ------- > > * Unit Testing : > =============== > > Updated and ran ambari/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java : PASSED > > > * Installed AMBARI SREVER. O/Ps: > ============================== > > > - Screenshot of Admin -> Stacks and Versions -> Versions showing 1 version for 2.2 and 2 versions for 2.3 > > - Current version : 2.2 and installed 2 repos for HDP 2.3. > > BEFORE change: > ============= > > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2", > "Versions" : { > "active" : true, > "min_upgrade_version" : null, > "parent_stack_version" : "2.1", > "stack-errors" : [ ], > "stack_name" : "HDP", > "stack_version" : "2.2", > "upgrade_packs" : [ > "non_rolling_2.3", > "non_rolling_2.2", > "upgrade-2.3", > "upgrade-2.2" > ], > "valid" : true, > "config_types" : { > "cluster-env" : { > "supports" : { } > } > } > }, > > "compatible_repository_versions" : [ > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1", > "CompatibleRepositoryVersions" : { > "id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > }, > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > ], > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "id" : 3, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > > > > AFTER change: (Check for "upgrade_types"). > ============ > > > "compatible_repository_versions" : [ > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1", > "CompatibleRepositoryVersions" : { > "id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > } > }, > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > } > }, > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3", > "CompatibleRepositoryVersions" : { > "id" : 3, > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > } > } > ], > > > > > URL : http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1 O/P : > ================================================================================================================== > > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1", > "CompatibleRepositoryVersions" : { > "display_name" : "HDP-2.2.9.0-3310", > "id" : 1, > "repository_version" : "2.2.9.0-3310", > "stack_name" : "HDP", > "stack_version" : "2.2", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > }, > "operating_systems" : [ > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1/operating_systems/redhat6", > "OperatingSystems" : { > "os_type" : "redhat6", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > }, > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1/operating_systems/suse11", > "OperatingSystems" : { > "os_type" : "suse11", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > }, > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1/operating_systems/ubuntu12", > "OperatingSystems" : { > "os_type" : "ubuntu12", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > } > ] > } > > > URL : http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2 > =========================================================================================== > > > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "display_name" : "HDP-2.3.0.0-2557", > "id" : 2, > "repository_version" : "2.3.0.0-2557", > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > }, > "operating_systems" : [ > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2/operating_systems/redhat6", > "OperatingSystems" : { > "os_type" : "redhat6", > "repository_version_id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > ] > } > > > URL : http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3 > =========================================================================================== > > > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3", > "CompatibleRepositoryVersions" : { > "display_name" : "HDP-2.3.3.0-3008", > "id" : 3, > "repository_version" : "2.3.3.0-3008", > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > }, > "operating_systems" : [ > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3/operating_systems/redhat6", > "OperatingSystems" : { > "os_type" : "redhat6", > "repository_version_id" : 3, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > ] > } > > > File Attachments > ---------------- > > 3 repo versions (1 for 2.2 and 2 for 2.3) > https://reviews.apache.org/media/uploaded/files/2015/10/27/43d053af-71c3-4714-b849-33be2aca8beb__Screen_Shot_2015-10-26_at_5.05.43_PM.png > 3 repos - 2 for 2.3 and 1 for 2.2 > https://reviews.apache.org/media/uploaded/files/2015/10/27/ee570465-7e9f-4c34-a2cb-f766ea642af2__Screen_Shot_2015-10-26_at_5.05.43_PM.png > > > Thanks, > > Swapan Shridhar > > --===============6889005243199911562==--