> On May 9, 2017, 5:18 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml > > Line 351 (original) > > <https://reviews.apache.org/r/59095/diff/1/?file=1711501#file1711501line351> > > > > How do we capture this dependency only when HA is enabled? > > Tim Thorpe wrote: > There are several options: > > 1) We don't. The UI already has an explicit check for ZOOKEEPER when > attempting to enable NameNode HA. This is the option I implemented. > 2) We could add in a conditional dependency section. > > <conditionalServices> > <service>ZOOKEEPER</service> > </conditionalServices> > > 3) We could add the conditional dependency section but be more explicit > about how/when it applies: > > <conditionalServices> > <service> > <name>ZOOKEEPER</name> > <conditions> > <condition xsi:type="propertyExists"> > <configType>hdfs-site</configType> > <property>dfs.nameservices</property> > </condition> > </conditions> > </service> > </conditionalServices> > > 4) We add this into the stack/service advisor code. Either this could be > added by using the information from 3 above or by hard coding it. By hard > coding it, I mean that during configuration validation we'd check to see if > the dfs.nameservices exists and if so whether zookeeper is installed. > > Mostly I opened this JIRA and review board to get opinions on the issue > and possible solutions. > > As a side note, I just attempted to add YARN to my HDFS only cluster and > noticed that there were 2 configuration issues because > yarn.resourcemanager.zk-address and hadoop.registry.zk.quorum are both blank. > Both of these settings should be fine so long as > yarn.resourcemanager.ha.enabled and hadoop.registry.rm.enabled respectively > are set to false. YARN doesn't specify a dependency on ZOOKEEPER because it > has a dependency on HDFS and relies on HDFS's dependency on ZOOKEEPER.
Hi Tim, I think this should be stack-driven. I like option #3 - Alejandro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59095/#review174341 ----------------------------------------------------------- On May 9, 2017, 2:39 p.m., Tim Thorpe wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59095/ > ----------------------------------------------------------- > > (Updated May 9, 2017, 2:39 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Di Li, Jonathan Hurley, > Jayush Luniya, and Nate Cole. > > > Bugs: AMBARI-20967 > https://issues.apache.org/jira/browse/AMBARI-20967 > > > Repository: ambari > > > Description > ------- > > HDFS has a static dependency on Zookeeper even though it is only needed when > NameNode HA is enabled. The check for Zookeeper should be done before > enabling HA rather than enforcing it at installation time. > > > Diffs > ----- > > > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml > 3026938 > > > Diff: https://reviews.apache.org/r/59095/diff/1/ > > > Testing > ------- > > mvn clean test > > Manual testing - installed HDFS only cluster and attempted to enable NameNode > HA. This is prevented with the same error you'd see if ZooKeeper was enabled > but you had fewer than 3 ZooKeeper servers configured. > > > Thanks, > > Tim Thorpe > >