----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57966/#review170261 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/topology/validators/HiveServiceValidator.java Lines 42 (patched) <https://reviews.apache.org/r/57966/#comment243061> HIVE_DB_DEFAULT.equals() is safer to avoid any NPE. - Sebastian Toader On March 27, 2017, 10:12 p.m., Laszlo Puskas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57966/ > ----------------------------------------------------------- > > (Updated March 27, 2017, 10:12 p.m.) > > > Review request for Ambari, Attila Doroszlai, Robert Levas, Robert Nettleton, > and Sebastian Toader. > > > Bugs: AMBARI-20594 > https://issues.apache.org/jira/browse/AMBARI-20594 > > > Repository: ambari > > > Description > ------- > > Problem: > On blueprint deployments when the HIVE service is configured with default > values the cluster provisioning fails if the MYSQL_SERVER component is not > explicitly listed in the blueprint. The failure happens during the cluster > provisioning and the root cause is hard to be detected. > > Solution: > When the cluster template is posted (so that all the configuration is > together) the cluster topology is validated: > > * if HIVE service is required > * if the default hive database is to be used (internal mysql database) > * if the MYSQL_SERVER is not listed in the blueprint > > then the cluster creation is interrupted and appropriate error is returned. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java > a63013a > > ambari-server/src/main/java/org/apache/ambari/server/topology/validators/HiveServiceValidator.java > PRE-CREATION > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java > d92193f > > ambari-server/src/test/java/org/apache/ambari/server/topology/validators/HiveServiceValidatorTest.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/57966/diff/2/ > > > Testing > ------- > > Added unit tests. > Unit tests successfully ran. > Manually tested on local cluster: > - blueprint with HIVE, default configuration, *no* MYSQL_SERVER listed - > validation failed > - blueprint with HIVE, default configuration, MYSQL_SERVER listed - > validation passed > - blueprint with HIVE, hive-env/hive_database set to custom value - > validation passed > > > Thanks, > > Laszlo Puskas > >