----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21403/#review43052 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java <https://reviews.apache.org/r/21403/#comment77071> Might consider throwing IllegalARgumentException, which will result in 400 Bad Request. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java <https://reviews.apache.org/r/21403/#comment77072> Should be a safety check for NPE, not all API users will provide a provisioning state. ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java <https://reviews.apache.org/r/21403/#comment77073> It is good to Log level info here to make it a part of the list of upgrade steps. - Sid Wagle On May 14, 2014, 5:58 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21403/ > ----------------------------------------------------------- > > (Updated May 14, 2014, 5:58 p.m.) > > > Review request for Ambari, Nate Cole and Sid Wagle. > > > Bugs: AMBARI-5749 > https://issues.apache.org/jira/browse/AMBARI-5749 > > > Repository: ambari > > > Description > ------- > > Clients have requested to have the state of cluster provisioning defined in a > more structured manner. They currently use the /persist endpoint to store the > state of cluster provisioning, which if it becomes corrupted, can place the > Ambari Web Client in a bad state. > > We have now exposed a "provisioning_state" property on the cluster resource > so allow the client to mark a cluster as being either INIT or INSTALLED. > There are no in-between states and once a cluster is marked as INSTALLED, it > cannot be reverted back to INIT. > > - New tests added to cover provisioned_state lifecycle states > - Database scripts updated > - Database upgrade steps added > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java > b2151f5 > > ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java > 1eaf7c7 > > ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java > 557cf6e > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java > 8b6c39a > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java > b9e18cf > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterStateEntity.java > d955a95 > ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java > 8955347 > > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java > 4717498 > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java > 51d64d3 > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java > 8b4a199 > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql ce01146 > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql c0472bd > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 5792556 > ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql > 8c07e63 > ambari-server/src/main/resources/properties.json a529950 > > ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java > f2dd4c9 > > ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterRequestTest.java > c1ce0f3 > > ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java > 67924a1 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java > 6f4a74c > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java > f8bb351 > > ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java > 24bb6d1 > > ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java > 415951f > > Diff: https://reviews.apache.org/r/21403/diff/ > > > Testing > ------- > > Results : > > Tests run: 1607, Failures: 0, Errors: 0, Skipped: 14 > > OK > ---------------------------------------------------------------------- > Total run:554 > Total errors:0 > Total failures:0 > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 13:35.615s > [INFO] Finished at: Wed May 14 13:56:57 EDT 2014 > [INFO] Final Memory: 22M/123M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Jonathan Hurley > >
