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 73E021733C for ; Wed, 1 Apr 2015 19:39:14 +0000 (UTC) Received: (qmail 30265 invoked by uid 500); 1 Apr 2015 19:39:14 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 30233 invoked by uid 500); 1 Apr 2015 19:39:14 -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 41193 invoked by uid 99); 1 Apr 2015 19:12:34 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 19:12:34 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 793CA1D703F; Wed, 1 Apr 2015 19:12:33 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1028987284655520989==" MIME-Version: 1.0 Subject: Re: Review Request 32710: Views: Ability for a view instance to be associated to a cluster for configuration From: "Jonathan Hurley" To: "Nate Cole" , "Jonathan Hurley" Cc: "Tom Beerbower" , "Ambari" Date: Wed, 01 Apr 2015 19:12:33 -0000 Message-ID: <20150401191233.16792.52541@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Jonathan Hurley" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/32710/ X-Sender: "Jonathan Hurley" References: <20150401022239.16792.74657@reviews.apache.org> In-Reply-To: <20150401022239.16792.74657@reviews.apache.org> Reply-To: "Jonathan Hurley" X-ReviewRequest-Repository: ambari --===============1028987284655520989== 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/32710/#review78566 ----------------------------------------------------------- Ship it! Ship It! - Jonathan Hurley On March 31, 2015, 10:22 p.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32710/ > ----------------------------------------------------------- > > (Updated March 31, 2015, 10:22 p.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: AMBARI-10306 > https://issues.apache.org/jira/browse/AMBARI-10306 > > > Repository: ambari > > > Description > ------- > > Ability for a view instance to be associated to a cluster for configuration (so the view can have access to cluster config information via view context). This enables the view instance to be configured w/o the admin having to wire-up properties. Whether the view is auto instantiated or instantiated manually, the Ambari Admin should have an option to relate an instance of a cluster to the view instance. This make the cluster config information available to the view so the view can "auto-configure". Therefore, in addition to today's manual configure option, need to add options for picking a cluster in same ambari, or picking remote ambari server to "auto-configure". Based on the configuration option the user chooses, the way the user gets configuration changes. If the user chooses today mode of config, they can use the same ViewContext.getProperties() as they do today. If they choose a local cluster, they need a way to get access to all cluster configurations. For remote cluster, ma ybe we just provide convenient method way to get rest endpoint to the cluster resource to limit scope? In any of the three cases, the view developer needs to know how he is to get his configurations (custom, local or remote), and have a way to get access via ViewContext. Also, need ability to flag properties as cluster "configuration" or "setting" so the UI can organize properties that can be derived from cluster configuration properties vs. settings props related to the view itself. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 28e5e12 > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java 95703fd > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java f77c97e > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java d55f949 > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewParameterEntity.java a8ddcdb > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java ba4dd2d > ambari-server/src/main/java/org/apache/ambari/server/view/ClusterImpl.java PRE-CREATION > ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java b7a48a8 > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 419ba02 > ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ParameterConfig.java e983609 > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 26ff9bb > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 13e8939 > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 622fca3 > ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 9fe9cd7 > ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql a722d2a > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 31c65c3 > ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java a9ceb93 > ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java 07b8410 > ambari-server/src/test/java/org/apache/ambari/server/view/ClusterImplTest.java PRE-CREATION > ambari-server/src/test/java/org/apache/ambari/server/view/ViewContextImplTest.java 84794e8 > ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ParameterConfigTest.java 278e441 > ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java 75ab10a > ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 432babb > ambari-views/src/main/java/org/apache/ambari/view/ViewInstanceDefinition.java ff9090b > ambari-views/src/main/java/org/apache/ambari/view/cluster/Cluster.java PRE-CREATION > ambari-views/src/main/resources/view.xsd e994faf > > Diff: https://reviews.apache.org/r/32710/diff/ > > > Testing > ------- > > Manual testing. > > New unit tests. > > All pass. > > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 37:16 min > [INFO] Finished at: 2015-03-31T21:38:06-04:00 > [INFO] Final Memory: 44M/531M > [INFO] ------------------------------------------------------------------------ > > > Thanks, > > Tom Beerbower > > --===============1028987284655520989==--