> On May 20, 2016, 12:10 p.m., Nate Cole wrote: > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java, > > lines 1924-1938 > > <https://reviews.apache.org/r/47428/diff/3/?file=1386387#file1386387line1924> > > > > This is a bit rough on the eyes. There's nothing wrong with > > shortcutting-when-null and really helps readability and indenting > > Robert Levas wrote: > I happen to like the explict checking for null. What do you mean by > "shortcutting-when-null"? > > Like this? > > ``` > KerberosDescriptor kerberosDescriptor = new > KerberosDescriptorFactory().createInstance(data); > KerberosServiceDescriptor serviceDescriptor = (kerberosDescriptor==null) > ? null : kerberosDescriptor.getService("HBASE"); > KerberosComponentDescriptor componentDescriptor = > (serviceDescriptor==null) ? null : > serviceDescriptor.getComponent("PHOENIX_QUERY_SERVER"); > ... > ```
I was mostly following existing code-style in general that I've seen with UpgradeCatalog implementations. I'm happy to change it however you would prefer. - Josh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47428/#review134136 ----------------------------------------------------------- On May 20, 2016, 2:06 a.m., Josh Elser wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47428/ > ----------------------------------------------------------- > > (Updated May 20, 2016, 2:06 a.m.) > > > Review request for Ambari, Jonathan Hurley, Nate Cole, and Robert Levas. > > > Bugs: AMBARI-16171 > https://issues.apache.org/jira/browse/AMBARI-16171 > > > Repository: ambari > > > Description > ------- > > The up-coming version of Phoenix will contain some new functionality to > support Kerberos authentication of clients via SPNEGO with the Phoenix Query > Server (PQS). > > Presently, Ambari will configure PQS to use the hbase service keytab which > will result in the SPNEGO authentication failing as the RFC requires that the > "primary" component of the Kerberos principal for the server is "HTTP". Thus, > we need to ensure that we switch PQS over to use the spnego.service.keytab as > the keytab and "HTTP/_HOST@REALM" as the principal. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java > 2e857ed > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java > 41f538e > > ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json > c9536f8 > > ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java > 20fa50f > > Diff: https://reviews.apache.org/r/47428/diff/ > > > Testing > ------- > > Unit testing, verified upgrade from 2.2.2 > > > Thanks, > > Josh Elser > >