----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/27607/#review59958 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java <https://reviews.apache.org/r/27607/#comment101265> I don't think that ID columns should be updatable. ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java <https://reviews.apache.org/r/27607/#comment101272> I don't think it's necessary to put a length constraint on ID fields, but if you did want to (for databases like Oracle) then 19 is what is used. ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java <https://reviews.apache.org/r/27607/#comment101273> Updateable ID? ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java <https://reviews.apache.org/r/27607/#comment101274> For formatted documentation, if you use <pre> tags along with <br/> or <p/> (or any other HTML) it will retain formatting correctly when viewing in javadoc viewers. ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java <https://reviews.apache.org/r/27607/#comment101275> When adding a ton of new tables, maybe we should put them into a single method to keep executeDDLUpdates readable. ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql <https://reviews.apache.org/r/27607/#comment101264> I think that we should stop in-lining table definitions; they are very hard to read. Also, the table names should be separated by _ for improved readability, such as cluster_version ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql <https://reviews.apache.org/r/27607/#comment101270> When starting the sequence at 1, the initial value for cluster_version and host_version will be 2. I always disliked that. - Jonathan Hurley On Nov. 4, 2014, 11:30 p.m., Alejandro Fernandez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/27607/ > ----------------------------------------------------------- > > (Updated Nov. 4, 2014, 11:30 p.m.) > > > Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, > Sid Wagle, and Yurii Shylov. > > > Bugs: AMBARI-8148 > https://issues.apache.org/jira/browse/AMBARI-8148 > > > Repository: ambari > > > Description > ------- > > 1. Create new tables and populate during the installation of a new cluster. > > *clusterversion* table > Column | Type | Keys | Example > ----------|------------|------|--------------------------------------------- > id |BIGINT |PK |1 > cluster_id|BIGINT |FK |2 > stack |VARCHAR(255)| |HDP-2.2 > version |VARCHAR(255)| |HDP-2-2.0.1-885 > state |VARCHAR(32) | |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED > start_time|DATETIME | |2014-10-31 14:00:00 > end_time |DATETIME | |2014-10-31 15:00:00 > user_name |VARCHAR(32) | |admin > > *hostcomponentstate* table > Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", > "UPGRADE_FAILED") > > *hostversion* table > Column |Type |Keys |Example > ---------|------------|-------------|---------------------------------- > id |BIGINT |PK |1 > host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org > stack |VARCHAR(255)| |HDP-2.2 > version |VARCHAR(255)| |2.2.0.1-885 > state |VARCHAR(32) | |INSTALLED, CURRENT, NOT_INSTALLED > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java > b030ea1 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java > 7dce204 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java > a71fddb > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java > 3718556 > > ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java > bc97936 > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java > 14c385d > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 > ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql > ebc8f5c > ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb > ambari-server/src/test/python/TestAmbariServer.py c3651eb > > Diff: https://reviews.apache.org/r/27607/diff/ > > > Testing > ------- > > Ran unit tests > > ambari-server unit tests > ---------------------------------------------------------------------- > Total run:684 > Total errors:0 > Total failures:0 > OK > > > Thanks, > > Alejandro Fernandez > >