----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28753/#review64038 -----------------------------------------------------------
I have concerns with why INSTALLED should be an allowed ClusterVersion and HostVersion state. I believe they should only be CURRENT and UPGRADING. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java <https://reviews.apache.org/r/28753/#comment106421> The bootstrap should now create a repo version. e.g., stack is HDP-2.2 and repository_version is 2.2 So the exception handling is not needed. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java <https://reviews.apache.org/r/28753/#comment106440> This can now be removed since bootstrapping inserts a RepositoryVersion, e.g., stack is HDP-2.2 and version is 2.2 ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java <https://reviews.apache.org/r/28753/#comment106434> The initial state should instead be UPGRADING. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java <https://reviews.apache.org/r/28753/#comment106443> The initial state should be UPGRADING since a stack version cannot jump directly into INSTALLED. If the UI is using INSTALLED as a way to create dummy data, I suggest folks insert the data manually through the DB so that this code can lock-down. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java <https://reviews.apache.org/r/28753/#comment106435> Not needed any longer. ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java <https://reviews.apache.org/r/28753/#comment106444> Can now remove the exception handling. ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java <https://reviews.apache.org/r/28753/#comment106460> Again, INSTALLED should not be an acceptable start state. - Alejandro Fernandez On Dec. 5, 2014, 5:35 p.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28753/ > ----------------------------------------------------------- > > (Updated Dec. 5, 2014, 5:35 p.m.) > > > Review request for Ambari, Alejandro Fernandez and Nate Cole. > > > Bugs: AMBARI-8549 > https://issues.apache.org/jira/browse/AMBARI-8549 > > > Repository: ambari > > > Description > ------- > > for now cluster stack version resource contains all created repository > versions: (repo version filtering does not work correctly) > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java > 97d3bde > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java > a12bd29 > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java > 1b3eef8 > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java > c031ac1 > ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java > 125b71b > > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java > 5a9731a > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java > 0e8269f > > Diff: https://reviews.apache.org/r/28753/diff/ > > > Testing > ------- > > [INFO] Reactor Summary: > [INFO] > [INFO] Ambari Views ...................................... SUCCESS [3.225s] > [INFO] Ambari Server ..................................... SUCCESS > [27:27.658s] > [INFO] Ambari Agent ...................................... SUCCESS [8.468s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 27:40.036s > [INFO] Finished at: Fri Dec 05 20:29:41 FET 2014 > [INFO] Final Memory: 33M/323M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Dmitro Lisnichenko > >
