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 8AADB18527 for ; Thu, 21 May 2015 04:12:23 +0000 (UTC) Received: (qmail 23782 invoked by uid 500); 21 May 2015 04:12:23 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 23752 invoked by uid 500); 21 May 2015 04:12:23 -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 23731 invoked by uid 99); 21 May 2015 04:12:23 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2015 04:12:23 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id E6D131DD5EF; Thu, 21 May 2015 04:12:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3065165497894839244==" MIME-Version: 1.0 Subject: Re: Review Request 34496: AMBARI-11279 : Ranger installation fails on HDP 2.2 From: "Gautam Borad" To: "Mahadev Konar" , "Selvamohan Neethiraj" , "Yusaku Sako" , "Jonathan Hurley" , "Nate Cole" , "Velmurugan Periasamy" Cc: "Gautam Borad" , "Ambari" Date: Thu, 21 May 2015 04:12:22 -0000 Message-ID: <20150521041222.17212.79230@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Gautam Borad" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/34496/ X-Sender: "Gautam Borad" References: <20150520213547.17474.85091@reviews.apache.org> In-Reply-To: <20150520213547.17474.85091@reviews.apache.org> Reply-To: "Gautam Borad" X-ReviewRequest-Repository: ambari --===============3065165497894839244== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On May 20, 2015, 9:35 p.m., Nate Cole wrote: > > Do you have any unit tests? Also, more of a clarification point for me: how is it that these properties are checking for the xml-type configurations, but not for the older ones. For example, this line: > > > > xa_audit_db_is_enabled = config['configurations']['ranger-hbase-audit']['xasecure.audit.db.is.enabled'] if xml_configurations_supported else None > > > > Why isn't the default config['configurations']['ranger-hbase-plugin-properties']['XAAUDIT.DB.IS_ENABLED'] ? > > > > Without that, how does any HDP-2.2 build correctly read that property? Same with all the keystore/trustore properties too as defined in the spreadsheet. > > Jonathan Hurley wrote: > Yes, I'd also expect the non-XML properties to be a defaulted value instead of None. I'd assume this would break on an existing installed instance of Ranger with HDP 2.2. > > Gautam Borad wrote: > @Nate, will add unit test cases as a priority. A Jira is already raised for that. > xml_configurations_supported is only for HDP > 2.3 and the name of many properties have changed, hence if xml_configurations_supported is not defined we can safely set it to None, since they wont be used. >Without that, how does any HDP-2.2 build correctly read that property? This works because of lazy failing concept implemented, meaning it wont fail until first request to use var. This helps in keeping the code clean in the sense that we dont have to write lots of if HDP-2.2 , if HDP-2.3 etc. That is why all other new propertes of 2.3 worked as is. But these three failed in 2.2 because we are using functions on them, like config()/unicode(). For such case we have to write the if condition. Hard coding of if based on HDP version is also not a good design. So i introducded a property xml_configurationx_supported, which will be set to true only in stacks which support the new Ranger xml design. Hope that clarifies. Please let me know if you need further details. - Gautam ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34496/#review84590 ----------------------------------------------------------- On May 20, 2015, 8:45 p.m., Gautam Borad wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34496/ > ----------------------------------------------------------- > > (Updated May 20, 2015, 8:45 p.m.) > > > Review request for Ambari, Jonathan Hurley, Mahadev Konar, Nate Cole, Selvamohan Neethiraj, Velmurugan Periasamy, and Yusaku Sako. > > > Bugs: AMBARI-11279 > https://issues.apache.org/jira/browse/AMBARI-11279 > > > Repository: ambari > > > Description > ------- > > Fix breakage in HDP 2.2 by setting None values for properties that are not used in HDP 2.2 > > > Diffs > ----- > > ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py 7d83550 > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py 6a8a47a > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py 11b439b > ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py af312b1 > ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py f73a839 > ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py 508262f > ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py da7b9b4 > > Diff: https://reviews.apache.org/r/34496/diff/ > > > Testing > ------- > > Tested HDP 2.2 with patch on 3 node centos6 cluster with HDFS/HIVE/HBASE/KNOX/RANGER > Tested HDP 2.3 with patch on 3 node centos6 cluster with HDFS/HIVE/HBASE/KNOX/RANGER > > > Thanks, > > Gautam Borad > > --===============3065165497894839244==--