> 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 > >
