----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47627/#review134325 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java (line 3086) <https://reviews.apache.org/r/47627/#comment199130> Since this method is called for every property, we should optimize the performance by reaching the decision faster in 99% of cases where the conditions do not apply. If setOfHawqPropertyNamesNonHA.contains(propertyName) operation is less expensive (O(1) for the set) then topology.getHostGroupsForComponent(HAWQSTANDBY).size() (which might search for component inside each host group), then maybe contains() operation should be the first check in the if condition. Also, merging 2 ifs into 1 with && will be more readable. - Alexander Denissov On May 20, 2016, 10:11 p.m., bhuvnesh chaudhary wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47627/ > ----------------------------------------------------------- > > (Updated May 20, 2016, 10:11 p.m.) > > > Review request for Ambari, Alexander Denissov, Matt, and Robert Nettleton. > > > Bugs: AMBARI-16786 > https://issues.apache.org/jira/browse/AMBARI-16786 > > > Repository: ambari > > > Description > ------- > > hawq_standby_address_host property should be removed from configuration if > HAWQSTANDBY component does not exist in BP > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java > 1ddc4e1 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java > 5c6aeaf > > Diff: https://reviews.apache.org/r/47627/diff/ > > > Testing > ------- > > yes. test case added. > > > Thanks, > > bhuvnesh chaudhary > >